@opengis/cms 0.0.12 → 0.0.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/cms.js +3518 -3375
- package/dist/cms.umd.cjs +12 -12
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/server/routes/site/controllers/listMedia.js +23 -10
package/dist/cms.umd.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
(function(o,Ce){typeof exports=="object"&&typeof module<"u"?module.exports=Ce(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Ce):(o=typeof globalThis<"u"?globalThis:o||self,o.cms=Ce(o.Vue))})(this,function(o){"use strict";function Ce(e,t){return function(){return e.apply(t,arguments)}}const{toString:Es}=Object.prototype,{getPrototypeOf:Ft}=Object,{iterator:st,toStringTag:Tr}=Symbol,ot=(e=>t=>{const r=Es.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),X=e=>(e=e.toLowerCase(),t=>ot(t)===e),at=e=>t=>typeof t===e,{isArray:Me}=Array,Ie=at("undefined");function Ds(e){return e!==null&&!Ie(e)&&e.constructor!==null&&!Ie(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Vr=X("ArrayBuffer");function Ns(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Vr(e.buffer),t}const Os=at("string"),z=at("function"),Rr=at("number"),it=e=>e!==null&&typeof e=="object",Cs=e=>e===!0||e===!1,lt=e=>{if(ot(e)!=="object")return!1;const t=Ft(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Tr in e)&&!(st in e)},Ms=X("Date"),Ts=X("File"),Vs=X("Blob"),Rs=X("FileList"),Bs=e=>it(e)&&z(e.pipe),Ps=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||z(e.append)&&((t=ot(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))},$s=X("URLSearchParams"),[Ys,As,Fs,vs]=["ReadableStream","Request","Response","Headers"].map(X),Ls=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function je(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),Me(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let l;for(n=0;n<i;n++)l=a[n],t.call(null,e[l],l,e)}}function Br(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const ke=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pr=e=>!Ie(e)&&e!==ke;function vt(){const{caseless:e}=Pr(this)&&this||{},t={},r=(n,s)=>{const a=e&&Br(t,s)||s;lt(t[a])&<(n)?t[a]=vt(t[a],n):lt(n)?t[a]=vt({},n):Me(n)?t[a]=n.slice():t[a]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&je(arguments[n],r);return t}const Us=(e,t,r,{allOwnKeys:n}={})=>(je(t,(s,a)=>{r&&z(s)?e[a]=Ce(s,r):e[a]=s},{allOwnKeys:n}),e),Is=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),js=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Ws=(e,t,r,n)=>{let s,a,i;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)i=s[a],(!n||n(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=r!==!1&&Ft(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Hs=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},zs=e=>{if(!e)return null;if(Me(e))return e;let t=e.length;if(!Rr(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},qs=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ft(Uint8Array)),Gs=(e,t)=>{const n=(e&&e[st]).call(e);let s;for(;(s=n.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},Zs=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Js=X("HTMLFormElement"),Ks=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),$r=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Qs=X("RegExp"),Yr=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};je(r,(s,a)=>{let i;(i=t(s,a,e))!==!1&&(n[a]=i||s)}),Object.defineProperties(e,n)},Xs=e=>{Yr(e,(t,r)=>{if(z(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(z(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},eo=(e,t)=>{const r={},n=s=>{s.forEach(a=>{r[a]=!0})};return Me(e)?n(e):n(String(e).split(t)),r},to=()=>{},ro=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function no(e){return!!(e&&z(e.append)&&e[Tr]==="FormData"&&e[st])}const so=e=>{const t=new Array(10),r=(n,s)=>{if(it(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[s]=n;const a=Me(n)?[]:{};return je(n,(i,l)=>{const d=r(i,s+1);!Ie(d)&&(a[l]=d)}),t[s]=void 0,a}}return n};return r(e,0)},oo=X("AsyncFunction"),ao=e=>e&&(it(e)||z(e))&&z(e.then)&&z(e.catch),Ar=((e,t)=>e?setImmediate:t?((r,n)=>(ke.addEventListener("message",({source:s,data:a})=>{s===ke&&a===r&&n.length&&n.shift()()},!1),s=>{n.push(s),ke.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",z(ke.postMessage)),io=typeof queueMicrotask<"u"?queueMicrotask.bind(ke):typeof process<"u"&&process.nextTick||Ar,h={isArray:Me,isArrayBuffer:Vr,isBuffer:Ds,isFormData:Ps,isArrayBufferView:Ns,isString:Os,isNumber:Rr,isBoolean:Cs,isObject:it,isPlainObject:lt,isReadableStream:Ys,isRequest:As,isResponse:Fs,isHeaders:vs,isUndefined:Ie,isDate:Ms,isFile:Ts,isBlob:Vs,isRegExp:Qs,isFunction:z,isStream:Bs,isURLSearchParams:$s,isTypedArray:qs,isFileList:Rs,forEach:je,merge:vt,extend:Us,trim:Ls,stripBOM:Is,inherits:js,toFlatObject:Ws,kindOf:ot,kindOfTest:X,endsWith:Hs,toArray:zs,forEachEntry:Gs,matchAll:Zs,isHTMLForm:Js,hasOwnProperty:$r,hasOwnProp:$r,reduceDescriptors:Yr,freezeMethods:Xs,toObjectSet:eo,toCamelCase:Ks,noop:to,toFiniteNumber:ro,findKey:Br,global:ke,isContextDefined:Pr,isSpecCompliantForm:no,toJSONObject:so,isAsyncFn:oo,isThenable:ao,setImmediate:Ar,asap:io,isIterable:e=>e!=null&&z(e[st])};function N(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}h.inherits(N,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.status}}});const Fr=N.prototype,vr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vr[e]={value:e}}),Object.defineProperties(N,vr),Object.defineProperty(Fr,"isAxiosError",{value:!0}),N.from=(e,t,r,n,s,a)=>{const i=Object.create(Fr);return h.toFlatObject(e,i,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),N.call(i,e.message,t,r,n,s),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const lo=null;function Lt(e){return h.isPlainObject(e)||h.isArray(e)}function Lr(e){return h.endsWith(e,"[]")?e.slice(0,-2):e}function Ur(e,t,r){return e?e.concat(t).map(function(s,a){return s=Lr(s),!r&&a?"["+s+"]":s}).join(r?".":""):t}function co(e){return h.isArray(e)&&!e.some(Lt)}const uo=h.toFlatObject(h,{},null,function(t){return/^is[A-Z]/.test(t)});function ct(e,t,r){if(!h.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=h.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,f){return!h.isUndefined(f[_])});const n=r.metaTokens,s=r.visitor||u,a=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(t);if(!h.isFunction(s))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(h.isDate(g))return g.toISOString();if(!d&&h.isBlob(g))throw new N("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(g)||h.isTypedArray(g)?d&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,_,f){let p=g;if(g&&!f&&typeof g=="object"){if(h.endsWith(_,"{}"))_=n?_:_.slice(0,-2),g=JSON.stringify(g);else if(h.isArray(g)&&co(g)||(h.isFileList(g)||h.endsWith(_,"[]"))&&(p=h.toArray(g)))return _=Lr(_),p.forEach(function(y,P){!(h.isUndefined(y)||y===null)&&t.append(i===!0?Ur([_],P,a):i===null?_:_+"[]",c(y))}),!1}return Lt(g)?!0:(t.append(Ur(f,_,a),c(g)),!1)}const m=[],w=Object.assign(uo,{defaultVisitor:u,convertValue:c,isVisitable:Lt});function k(g,_){if(!h.isUndefined(g)){if(m.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));m.push(g),h.forEach(g,function(p,b){(!(h.isUndefined(p)||p===null)&&s.call(t,p,h.isString(b)?b.trim():b,_,w))===!0&&k(p,_?_.concat(b):[b])}),m.pop()}}if(!h.isObject(e))throw new TypeError("data must be an object");return k(e),t}function Ir(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ut(e,t){this._pairs=[],e&&ct(e,this,t)}const jr=Ut.prototype;jr.append=function(t,r){this._pairs.push([t,r])},jr.toString=function(t){const r=t?function(n){return t.call(this,n,Ir)}:Ir;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function fo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wr(e,t,r){if(!t)return e;const n=r&&r.encode||fo;h.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let a;if(s?a=s(t,r):a=h.isURLSearchParams(t)?t.toString():new Ut(t,r).toString(n),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Hr{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h.forEach(this.handlers,function(n){n!==null&&t(n)})}}const zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ho={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ut,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},It=typeof window<"u"&&typeof document<"u",jt=typeof navigator=="object"&&navigator||void 0,mo=It&&(!jt||["ReactNative","NativeScript","NS"].indexOf(jt.product)<0),po=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yo=It&&window.location.href||"http://localhost",j={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:It,hasStandardBrowserEnv:mo,hasStandardBrowserWebWorkerEnv:po,navigator:jt,origin:yo},Symbol.toStringTag,{value:"Module"})),...ho};function _o(e,t){return ct(e,new j.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,a){return j.isNode&&h.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function go(e){return h.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function wo(e){const t={},r=Object.keys(e);let n;const s=r.length;let a;for(n=0;n<s;n++)a=r[n],t[a]=e[a];return t}function qr(e){function t(r,n,s,a){let i=r[a++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),d=a>=r.length;return i=!i&&h.isArray(s)?s.length:i,d?(h.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!l):((!s[i]||!h.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],a)&&h.isArray(s[i])&&(s[i]=wo(s[i])),!l)}if(h.isFormData(e)&&h.isFunction(e.entries)){const r={};return h.forEachEntry(e,(n,s)=>{t(go(n),s,r,0)}),r}return null}function xo(e,t,r){if(h.isString(e))try{return(t||JSON.parse)(e),h.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const We={transitional:zr,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,a=h.isObject(t);if(a&&h.isHTMLForm(t)&&(t=new FormData(t)),h.isFormData(t))return s?JSON.stringify(qr(t)):t;if(h.isArrayBuffer(t)||h.isBuffer(t)||h.isStream(t)||h.isFile(t)||h.isBlob(t)||h.isReadableStream(t))return t;if(h.isArrayBufferView(t))return t.buffer;if(h.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return _o(t,this.formSerializer).toString();if((l=h.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ct(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(r.setContentType("application/json",!1),xo(t)):t}],transformResponse:[function(t){const r=this.transitional||We.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(h.isResponse(t)||h.isReadableStream(t))return t;if(t&&h.isString(t)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?N.from(l,N.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],e=>{We.headers[e]={}});const ko=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bo=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(i){
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Gr]=this[Gr]={accessors:{}}).accessors,s=this.prototype;function a(i){const l=He(i);n[l]||(No(s,i),n[l]=!0)}return h.isArray(t)?t.forEach(a):a(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.reduceDescriptors(q.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),h.freezeMethods(q);function Ht(e,t){const r=this||We,n=t||r,s=q.from(n.headers);let a=n.data;return h.forEach(e,function(l){a=l.call(r,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Zr(e){return!!(e&&e.__CANCEL__)}function Te(e,t,r){N.call(this,e??"canceled",N.ERR_CANCELED,t,r),this.name="CanceledError"}h.inherits(Te,N,{__CANCEL__:!0});function Jr(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new N("Request failed with status code "+r.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Oo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Co(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const c=Date.now(),u=n[a];i||(i=c),r[s]=d,n[s]=c;let m=a,w=0;for(;m!==s;)w+=r[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),c-i<t)return;const k=u&&c-u;return k?Math.round(w*1e3/k):void 0}}function Mo(e,t){let r=0,n=1e3/t,s,a;const i=(c,u=Date.now())=>{r=u,s=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),m=u-r;m>=n?i(c,u):(s=c,a||(a=setTimeout(()=>{a=null,i(s)},n-m)))},()=>s&&i(s)]}const ut=(e,t,r=3)=>{let n=0;const s=Co(50,250);return Mo(a=>{const i=a.loaded,l=a.lengthComputable?a.total:void 0,d=i-n,c=s(d),u=i<=l;n=i;const m={loaded:i,total:l,progress:l?i/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&u?(l-i)/c:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},r)},Kr=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Qr=e=>(...t)=>h.asap(()=>e(...t)),To=j.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,j.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(j.origin),j.navigator&&/(msie|trident)/i.test(j.navigator.userAgent)):()=>!0,Vo=j.hasStandardBrowserEnv?{write(e,t,r,n,s,a){const i=[e+"="+encodeURIComponent(t)];h.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),h.isString(n)&&i.push("path="+n),h.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ro(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Bo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xr(e,t,r){let n=!Ro(t);return e&&(n||r==!1)?Bo(e,t):t}const en=e=>e instanceof q?{...e}:e;function be(e,t){t=t||{};const r={};function n(c,u,m,w){return h.isPlainObject(c)&&h.isPlainObject(u)?h.merge.call({caseless:w},c,u):h.isPlainObject(u)?h.merge({},u):h.isArray(u)?u.slice():u}function s(c,u,m,w){if(h.isUndefined(u)){if(!h.isUndefined(c))return n(void 0,c,m,w)}else return n(c,u,m,w)}function a(c,u){if(!h.isUndefined(u))return n(void 0,u)}function i(c,u){if(h.isUndefined(u)){if(!h.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,m){if(m in t)return n(c,u);if(m in e)return n(void 0,c)}const d={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(c,u,m)=>s(en(c),en(u),m,!0)};return h.forEach(Object.keys(Object.assign({},e,t)),function(u){const m=d[u]||s,w=m(e[u],t[u],u);h.isUndefined(w)&&m!==l||(r[u]=w)}),r}const tn=e=>{const t=be({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:a,headers:i,auth:l}=t;t.headers=i=q.from(i),t.url=Wr(Xr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(h.isFormData(r)){if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[c,...u]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...u].join("; "))}}if(j.hasStandardBrowserEnv&&(n&&h.isFunction(n)&&(n=n(t)),n||n!==!1&&To(t.url))){const c=s&&a&&Vo.read(a);c&&i.set(s,c)}return t},Po=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const s=tn(e);let a=s.data;const i=q.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:c}=s,u,m,w,k,g;function _(){k&&k(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function p(){if(!f)return;const y=q.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),$={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:y,config:e,request:f};Jr(function(U){r(U),_()},function(U){n(U),_()},$),f=null}"onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(n(new N("Request aborted",N.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new N("Network Error",N.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const $=s.transitional||zr;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),n(new N(P,$.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,f)),f=null},a===void 0&&i.setContentType(null),"setRequestHeader"in f&&h.forEach(i.toJSON(),function(P,$){f.setRequestHeader($,P)}),h.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),l&&l!=="json"&&(f.responseType=s.responseType),c&&([w,g]=ut(c,!0),f.addEventListener("progress",w)),d&&f.upload&&([m,k]=ut(d),f.upload.addEventListener("progress",m),f.upload.addEventListener("loadend",k)),(s.cancelToken||s.signal)&&(u=y=>{f&&(n(!y||y.type?new Te(null,e,f):y),f.abort(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const b=Oo(s.url);if(b&&j.protocols.indexOf(b)===-1){n(new N("Unsupported protocol "+b+":",N.ERR_BAD_REQUEST,e));return}f.send(a||null)})},$o=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const a=function(c){if(!s){s=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof N?u:new Te(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new N(`timeout ${t} of ms exceeded`,N.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:d}=n;return d.unsubscribe=()=>h.asap(l),d}},Yo=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Ao=async function*(e,t){for await(const r of Fo(e))yield*Yo(r,t)},Fo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},rn=(e,t,r,n)=>{const s=Ao(e,t);let a=0,i,l=d=>{i||(i=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:c,value:u}=await s.next();if(c){l(),d.close();return}let m=u.byteLength;if(r){let w=a+=m;r(w)}d.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(d){return l(d),s.return()}},{highWaterMark:2})},ft=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",nn=ft&&typeof ReadableStream=="function",vo=ft&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),sn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Lo=nn&&sn(()=>{let e=!1;const t=new Request(j.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),on=64*1024,zt=nn&&sn(()=>h.isReadableStream(new Response("").body)),ht={stream:zt&&(e=>e.body)};ft&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ht[t]&&(ht[t]=h.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new N(`Response type '${t}' is not supported`,N.ERR_NOT_SUPPORT,n)})})})(new Response);const Uo=async e=>{if(e==null)return 0;if(h.isBlob(e))return e.size;if(h.isSpecCompliantForm(e))return(await new Request(j.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(h.isArrayBufferView(e)||h.isArrayBuffer(e))return e.byteLength;if(h.isURLSearchParams(e)&&(e=e+""),h.isString(e))return(await vo(e)).byteLength},Io=async(e,t)=>{const r=h.toFiniteNumber(e.getContentLength());return r??Uo(t)},qt={http:lo,xhr:Po,fetch:ft&&(async e=>{let{url:t,method:r,data:n,signal:s,cancelToken:a,timeout:i,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:u,withCredentials:m="same-origin",fetchOptions:w}=tn(e);c=c?(c+"").toLowerCase():"text";let k=$o([s,a&&a.toAbortSignal()],i),g;const _=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let f;try{if(d&&Lo&&r!=="get"&&r!=="head"&&(f=await Io(u,n))!==0){let $=new Request(t,{method:"POST",body:n,duplex:"half"}),H;if(h.isFormData(n)&&(H=$.headers.get("content-type"))&&u.setContentType(H),$.body){const[U,Le]=Kr(f,ut(Qr(d)));n=rn($.body,on,U,Le)}}h.isString(m)||(m=m?"include":"omit");const p="credentials"in Request.prototype;g=new Request(t,{...w,signal:k,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:p?m:void 0});let b=await fetch(g);const y=zt&&(c==="stream"||c==="response");if(zt&&(l||y&&_)){const $={};["status","statusText","headers"].forEach(Ue=>{$[Ue]=b[Ue]});const H=h.toFiniteNumber(b.headers.get("content-length")),[U,Le]=l&&Kr(H,ut(Qr(l),!0))||[];b=new Response(rn(b.body,on,U,()=>{Le&&Le(),_&&_()}),$)}c=c||"text";let P=await ht[h.findKey(ht,c)||"text"](b,e);return!y&&_&&_(),await new Promise(($,H)=>{Jr($,H,{data:P,headers:q.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(p){throw _&&_(),p&&p.name==="TypeError"&&/Load failed|fetch/i.test(p.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,e,g),{cause:p.cause||p}):N.from(p,p&&p.code,e,g)}})};h.forEach(qt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const an=e=>`- ${e}`,jo=e=>h.isFunction(e)||e===null||e===!1,ln={getAdapter:e=>{e=h.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let a=0;a<t;a++){r=e[a];let i;if(n=r,!jo(r)&&(n=qt[(i=String(r)).toLowerCase()],n===void 0))throw new N(`Unknown adapter '${i}'`);if(n)break;s[i||"#"+a]=n}if(!n){const a=Object.entries(s).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
|
-
`+a.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+a):
|
|
1
|
+
(function(s,Ce){typeof exports=="object"&&typeof module<"u"?module.exports=Ce(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Ce):(s=typeof globalThis<"u"?globalThis:s||self,s.cms=Ce(s.Vue))})(this,function(s){"use strict";function Ce(e,t){return function(){return e.apply(t,arguments)}}const{toString:Cs}=Object.prototype,{getPrototypeOf:Ut}=Object,{iterator:st,toStringTag:Yn}=Symbol,ot=(e=>t=>{const n=Cs.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),te=e=>(e=e.toLowerCase(),t=>ot(t)===e),at=e=>t=>typeof t===e,{isArray:Te}=Array,je=at("undefined");function Ts(e){return e!==null&&!je(e)&&e.constructor!==null&&!je(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pn=te("ArrayBuffer");function Bs(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pn(e.buffer),t}const $s=at("string"),z=at("function"),An=at("number"),it=e=>e!==null&&typeof e=="object",Rs=e=>e===!0||e===!1,lt=e=>{if(ot(e)!=="object")return!1;const t=Ut(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Yn in e)&&!(st in e)},Fs=te("Date"),Ys=te("File"),Ps=te("Blob"),As=te("FileList"),vs=e=>it(e)&&z(e.pipe),Ls=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||z(e.append)&&((t=ot(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))},Us=te("URLSearchParams"),[Is,js,Ws,Hs]=["ReadableStream","Request","Response","Headers"].map(te),zs=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function We(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Te(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let l;for(r=0;r<i;r++)l=a[r],t.call(null,e[l],l,e)}}function vn(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Ee=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ln=e=>!je(e)&&e!==Ee;function It(){const{caseless:e}=Ln(this)&&this||{},t={},n=(r,o)=>{const a=e&&vn(t,o)||o;lt(t[a])&<(r)?t[a]=It(t[a],r):lt(r)?t[a]=It({},r):Te(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&We(arguments[r],n);return t}const qs=(e,t,n,{allOwnKeys:r}={})=>(We(t,(o,a)=>{n&&z(o)?e[a]=Ce(o,n):e[a]=o},{allOwnKeys:r}),e),Gs=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Js=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Zs=(e,t,n,r)=>{let o,a,i;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&Ut(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ks=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Xs=e=>{if(!e)return null;if(Te(e))return e;let t=e.length;if(!An(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Qs=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ut(Uint8Array)),eo=(e,t)=>{const r=(e&&e[st]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},to=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},no=te("HTMLFormElement"),ro=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Un=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),so=te("RegExp"),In=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};We(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},oo=e=>{In(e,(t,n)=>{if(z(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(z(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ao=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Te(e)?r(e):r(String(e).split(t)),n},io=()=>{},lo=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function co(e){return!!(e&&z(e.append)&&e[Yn]==="FormData"&&e[st])}const uo=e=>{const t=new Array(10),n=(r,o)=>{if(it(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=Te(r)?[]:{};return We(r,(i,l)=>{const c=n(i,o+1);!je(c)&&(a[l]=c)}),t[o]=void 0,a}}return r};return n(e,0)},fo=te("AsyncFunction"),ho=e=>e&&(it(e)||z(e))&&z(e.then)&&z(e.catch),jn=((e,t)=>e?setImmediate:t?((n,r)=>(Ee.addEventListener("message",({source:o,data:a})=>{o===Ee&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Ee.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",z(Ee.postMessage)),mo=typeof queueMicrotask<"u"?queueMicrotask.bind(Ee):typeof process<"u"&&process.nextTick||jn,h={isArray:Te,isArrayBuffer:Pn,isBuffer:Ts,isFormData:Ls,isArrayBufferView:Bs,isString:$s,isNumber:An,isBoolean:Rs,isObject:it,isPlainObject:lt,isReadableStream:Is,isRequest:js,isResponse:Ws,isHeaders:Hs,isUndefined:je,isDate:Fs,isFile:Ys,isBlob:Ps,isRegExp:so,isFunction:z,isStream:vs,isURLSearchParams:Us,isTypedArray:Qs,isFileList:As,forEach:We,merge:It,extend:qs,trim:zs,stripBOM:Gs,inherits:Js,toFlatObject:Zs,kindOf:ot,kindOfTest:te,endsWith:Ks,toArray:Xs,forEachEntry:eo,matchAll:to,isHTMLForm:no,hasOwnProperty:Un,hasOwnProp:Un,reduceDescriptors:In,freezeMethods:oo,toObjectSet:ao,toCamelCase:ro,noop:io,toFiniteNumber:lo,findKey:vn,global:Ee,isContextDefined:Ln,isSpecCompliantForm:co,toJSONObject:uo,isAsyncFn:fo,isThenable:ho,setImmediate:jn,asap:mo,isIterable:e=>e!=null&&z(e[st])};function O(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}h.inherits(O,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.status}}});const Wn=O.prototype,Hn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Hn[e]={value:e}}),Object.defineProperties(O,Hn),Object.defineProperty(Wn,"isAxiosError",{value:!0}),O.from=(e,t,n,r,o,a)=>{const i=Object.create(Wn);return h.toFlatObject(e,i,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),O.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const po=null;function jt(e){return h.isPlainObject(e)||h.isArray(e)}function zn(e){return h.endsWith(e,"[]")?e.slice(0,-2):e}function qn(e,t,n){return e?e.concat(t).map(function(o,a){return o=zn(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function yo(e){return h.isArray(e)&&!e.some(jt)}const go=h.toFlatObject(h,{},null,function(t){return/^is[A-Z]/.test(t)});function ct(e,t,n){if(!h.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!h.isUndefined(p[y])});const r=n.metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(t);if(!h.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(h.isDate(m))return m.toISOString();if(!c&&h.isBlob(m))throw new O("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(m)||h.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,y,p){let k=m;if(m&&!p&&typeof m=="object"){if(h.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(h.isArray(m)&&yo(m)||(h.isFileList(m)||h.endsWith(y,"[]"))&&(k=h.toArray(m)))return y=zn(y),k.forEach(function(g,D){!(h.isUndefined(g)||g===null)&&t.append(i===!0?qn([y],D,a):i===null?y:y+"[]",d(g))}),!1}return jt(m)?!0:(t.append(qn(p,y,a),d(m)),!1)}const f=[],_=Object.assign(go,{defaultVisitor:u,convertValue:d,isVisitable:jt});function w(m,y){if(!h.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(m),h.forEach(m,function(k,b){(!(h.isUndefined(k)||k===null)&&o.call(t,k,h.isString(b)?b.trim():b,y,_))===!0&&w(k,y?y.concat(b):[b])}),f.pop()}}if(!h.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Gn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wt(e,t){this._pairs=[],e&&ct(e,this,t)}const Jn=Wt.prototype;Jn.append=function(t,n){this._pairs.push([t,n])},Jn.toString=function(t){const n=t?function(r){return t.call(this,r,Gn)}:Gn;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function _o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zn(e,t,n){if(!t)return e;const r=n&&n.encode||_o;h.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=h.isURLSearchParams(t)?t.toString():new Wt(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Kn{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Xn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wo={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Wt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ht=typeof window<"u"&&typeof document<"u",zt=typeof navigator=="object"&&navigator||void 0,xo=Ht&&(!zt||["ReactNative","NativeScript","NS"].indexOf(zt.product)<0),ko=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bo=Ht&&window.location.href||"http://localhost",j={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ht,hasStandardBrowserEnv:xo,hasStandardBrowserWebWorkerEnv:ko,navigator:zt,origin:bo},Symbol.toStringTag,{value:"Module"})),...wo};function Eo(e,t){return ct(e,new j.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return j.isNode&&h.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function So(e){return h.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function No(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Qn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),c=a>=n.length;return i=!i&&h.isArray(o)?o.length:i,c?(h.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!l):((!o[i]||!h.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&h.isArray(o[i])&&(o[i]=No(o[i])),!l)}if(h.isFormData(e)&&h.isFunction(e.entries)){const n={};return h.forEachEntry(e,(r,o)=>{t(So(r),o,n,0)}),n}return null}function Do(e,t,n){if(h.isString(e))try{return(t||JSON.parse)(e),h.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const He={transitional:Xn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=h.isObject(t);if(a&&h.isHTMLForm(t)&&(t=new FormData(t)),h.isFormData(t))return o?JSON.stringify(Qn(t)):t;if(h.isArrayBuffer(t)||h.isBuffer(t)||h.isStream(t)||h.isFile(t)||h.isBlob(t)||h.isReadableStream(t))return t;if(h.isArrayBufferView(t))return t.buffer;if(h.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Eo(t,this.formSerializer).toString();if((l=h.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ct(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Do(t)):t}],transformResponse:[function(t){const n=this.transitional||He.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(h.isResponse(t)||h.isReadableStream(t))return t;if(t&&h.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?O.from(l,O.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],e=>{He.headers[e]={}});const Vo=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Oo=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Vo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},er=Symbol("internals");function ze(e){return e&&String(e).trim().toLowerCase()}function dt(e){return e===!1||e==null?e:h.isArray(e)?e.map(dt):String(e)}function Mo(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Co=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qt(e,t,n,r,o){if(h.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!h.isString(t)){if(h.isString(r))return t.indexOf(r)!==-1;if(h.isRegExp(r))return r.test(t)}}function To(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Bo(e,t){const n=h.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,i){return this[r].call(this,t,o,a,i)},configurable:!0})})}let q=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(l,c,d){const u=ze(c);if(!u)throw new Error("header name must be a non-empty string");const f=h.findKey(o,u);(!f||o[f]===void 0||d===!0||d===void 0&&o[f]!==!1)&&(o[f||c]=dt(l))}const i=(l,c)=>h.forEach(l,(d,u)=>a(d,u,c));if(h.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(h.isString(t)&&(t=t.trim())&&!Co(t))i(Oo(t),n);else if(h.isObject(t)&&h.isIterable(t)){let l={},c,d;for(const u of t){if(!h.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[d=u[0]]=(c=l[d])?h.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}i(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ze(t),t){const r=h.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Mo(o);if(h.isFunction(n))return n.call(this,o,r);if(h.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ze(t),t){const r=h.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||qt(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=ze(i),i){const l=h.findKey(r,i);l&&(!n||qt(r,r[l],l,n))&&(delete r[l],o=!0)}}return h.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||qt(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return h.forEach(this,(o,a)=>{const i=h.findKey(r,a);if(i){n[i]=dt(o),delete n[a];return}const l=t?To(a):String(a).trim();l!==a&&delete n[a],n[l]=dt(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return h.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&h.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[er]=this[er]={accessors:{}}).accessors,o=this.prototype;function a(i){const l=ze(i);r[l]||(Bo(o,i),r[l]=!0)}return h.isArray(t)?t.forEach(a):a(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.reduceDescriptors(q.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),h.freezeMethods(q);function Gt(e,t){const n=this||He,r=t||n,o=q.from(r.headers);let a=r.data;return h.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function tr(e){return!!(e&&e.__CANCEL__)}function Be(e,t,n){O.call(this,e??"canceled",O.ERR_CANCELED,t,n),this.name="CanceledError"}h.inherits(Be,O,{__CANCEL__:!0});function nr(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new O("Request failed with status code "+n.status,[O.ERR_BAD_REQUEST,O.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function $o(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ro(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=r[a];i||(i=d),n[o]=c,r[o]=d;let f=a,_=0;for(;f!==o;)_+=n[f++],f=f%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),d-i<t)return;const w=u&&d-u;return w?Math.round(_*1e3/w):void 0}}function Fo(e,t){let n=0,r=1e3/t,o,a;const i=(d,u=Date.now())=>{n=u,o=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{const u=Date.now(),f=u-n;f>=r?i(d,u):(o=d,a||(a=setTimeout(()=>{a=null,i(o)},r-f)))},()=>o&&i(o)]}const ut=(e,t,n=3)=>{let r=0;const o=Ro(50,250);return Fo(a=>{const i=a.loaded,l=a.lengthComputable?a.total:void 0,c=i-r,d=o(c),u=i<=l;r=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&u?(l-i)/d:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},rr=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sr=e=>(...t)=>h.asap(()=>e(...t)),Yo=j.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,j.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(j.origin),j.navigator&&/(msie|trident)/i.test(j.navigator.userAgent)):()=>!0,Po=j.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];h.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),h.isString(r)&&i.push("path="+r),h.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ao(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function or(e,t,n){let r=!Ao(t);return e&&(r||n==!1)?vo(e,t):t}const ar=e=>e instanceof q?{...e}:e;function Se(e,t){t=t||{};const n={};function r(d,u,f,_){return h.isPlainObject(d)&&h.isPlainObject(u)?h.merge.call({caseless:_},d,u):h.isPlainObject(u)?h.merge({},u):h.isArray(u)?u.slice():u}function o(d,u,f,_){if(h.isUndefined(u)){if(!h.isUndefined(d))return r(void 0,d,f,_)}else return r(d,u,f,_)}function a(d,u){if(!h.isUndefined(u))return r(void 0,u)}function i(d,u){if(h.isUndefined(u)){if(!h.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function l(d,u,f){if(f in t)return r(d,u);if(f in e)return r(void 0,d)}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(d,u,f)=>o(ar(d),ar(u),f,!0)};return h.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=c[u]||o,_=f(e[u],t[u],u);h.isUndefined(_)&&f!==l||(n[u]=_)}),n}const ir=e=>{const t=Se({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:l}=t;t.headers=i=q.from(i),t.url=Zn(or(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(h.isFormData(n)){if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[d,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...u].join("; "))}}if(j.hasStandardBrowserEnv&&(r&&h.isFunction(r)&&(r=r(t)),r||r!==!1&&Yo(t.url))){const d=o&&a&&Po.read(a);d&&i.set(o,d)}return t},Lo=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=ir(e);let a=o.data;const i=q.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=o,u,f,_,w,m;function y(){w&&w(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function k(){if(!p)return;const g=q.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),V={data:!l||l==="text"||l==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};nr(function($){n($),y()},function($){r($),y()},V),p=null}"onloadend"in p?p.onloadend=k:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(k)},p.onabort=function(){p&&(r(new O("Request aborted",O.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new O("Network Error",O.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const V=o.transitional||Xn;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),r(new O(D,V.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,e,p)),p=null},a===void 0&&i.setContentType(null),"setRequestHeader"in p&&h.forEach(i.toJSON(),function(D,V){p.setRequestHeader(V,D)}),h.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),l&&l!=="json"&&(p.responseType=o.responseType),d&&([_,m]=ut(d,!0),p.addEventListener("progress",_)),c&&p.upload&&([f,w]=ut(c),p.upload.addEventListener("progress",f),p.upload.addEventListener("loadend",w)),(o.cancelToken||o.signal)&&(u=g=>{p&&(r(!g||g.type?new Be(null,e,p):g),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const b=$o(o.url);if(b&&j.protocols.indexOf(b)===-1){r(new O("Unsupported protocol "+b+":",O.ERR_BAD_REQUEST,e));return}p.send(a||null)})},Uo=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(d){if(!o){o=!0,l();const u=d instanceof Error?d:this.reason;r.abort(u instanceof O?u:new Be(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new O(`timeout ${t} of ms exceeded`,O.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),e=null)};e.forEach(d=>d.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>h.asap(l),c}},Io=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},jo=async function*(e,t){for await(const n of Wo(e))yield*Io(n,t)},Wo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},lr=(e,t,n,r)=>{const o=jo(e,t);let a=0,i,l=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await o.next();if(d){l(),c.close();return}let f=u.byteLength;if(n){let _=a+=f;n(_)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},ft=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",cr=ft&&typeof ReadableStream=="function",Ho=ft&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),dr=(e,...t)=>{try{return!!e(...t)}catch{return!1}},zo=cr&&dr(()=>{let e=!1;const t=new Request(j.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ur=64*1024,Jt=cr&&dr(()=>h.isReadableStream(new Response("").body)),ht={stream:Jt&&(e=>e.body)};ft&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ht[t]&&(ht[t]=h.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new O(`Response type '${t}' is not supported`,O.ERR_NOT_SUPPORT,r)})})})(new Response);const qo=async e=>{if(e==null)return 0;if(h.isBlob(e))return e.size;if(h.isSpecCompliantForm(e))return(await new Request(j.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(h.isArrayBufferView(e)||h.isArrayBuffer(e))return e.byteLength;if(h.isURLSearchParams(e)&&(e=e+""),h.isString(e))return(await Ho(e)).byteLength},Go=async(e,t)=>{const n=h.toFiniteNumber(e.getContentLength());return n??qo(t)},Zt={http:po,xhr:Lo,fetch:ft&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:d,headers:u,withCredentials:f="same-origin",fetchOptions:_}=ir(e);d=d?(d+"").toLowerCase():"text";let w=Uo([o,a&&a.toAbortSignal()],i),m;const y=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let p;try{if(c&&zo&&n!=="get"&&n!=="head"&&(p=await Go(u,r))!==0){let V=new Request(t,{method:"POST",body:r,duplex:"half"}),P;if(h.isFormData(r)&&(P=V.headers.get("content-type"))&&u.setContentType(P),V.body){const[$,Q]=rr(p,ut(sr(c)));r=lr(V.body,ur,$,Q)}}h.isString(f)||(f=f?"include":"omit");const k="credentials"in Request.prototype;m=new Request(t,{..._,signal:w,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:k?f:void 0});let b=await fetch(m);const g=Jt&&(d==="stream"||d==="response");if(Jt&&(l||g&&y)){const V={};["status","statusText","headers"].forEach(ee=>{V[ee]=b[ee]});const P=h.toFiniteNumber(b.headers.get("content-length")),[$,Q]=l&&rr(P,ut(sr(l),!0))||[];b=new Response(lr(b.body,ur,$,()=>{Q&&Q(),y&&y()}),V)}d=d||"text";let D=await ht[h.findKey(ht,d)||"text"](b,e);return!g&&y&&y(),await new Promise((V,P)=>{nr(V,P,{data:D,headers:q.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(k){throw y&&y(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new O("Network Error",O.ERR_NETWORK,e,m),{cause:k.cause||k}):O.from(k,k&&k.code,e,m)}})};h.forEach(Zt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const fr=e=>`- ${e}`,Jo=e=>h.isFunction(e)||e===null||e===!1,hr={getAdapter:e=>{e=h.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!Jo(n)&&(r=Zt[(i=String(n)).toLowerCase()],r===void 0))throw new O(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
|
+
`+a.map(fr).join(`
|
|
5
|
+
`):" "+fr(a[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Zt};function Kt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Be(null,e)}function mr(e){return Kt(e),e.headers=q.from(e.headers),e.data=Gt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hr.getAdapter(e.adapter||He.adapter)(e).then(function(r){return Kt(e),r.data=Gt.call(e,e.transformResponse,r),r.headers=q.from(r.headers),r},function(r){return tr(r)||(Kt(e),r&&r.response&&(r.response.data=Gt.call(e,e.transformResponse,r.response),r.response.headers=q.from(r.response.headers))),Promise.reject(r)})}const pr="1.9.0",mt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const yr={};mt.transitional=function(t,n,r){function o(a,i){return"[Axios v"+pr+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,l)=>{if(t===!1)throw new O(o(i," has been removed"+(n?" in "+n:"")),O.ERR_DEPRECATED);return n&&!yr[i]&&(yr[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,l):!0}},mt.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Zo(e,t,n){if(typeof e!="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const l=e[a],c=l===void 0||i(l,a,e);if(c!==!0)throw new O("option "+a+" must be "+c,O.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new O("Unknown option "+a,O.ERR_BAD_OPTION)}}const pt={assertOptions:Zo,validators:mt},ae=pt.validators;let Ne=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Kn,response:new Kn}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Se(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&pt.assertOptions(r,{silentJSONParsing:ae.transitional(ae.boolean),forcedJSONParsing:ae.transitional(ae.boolean),clarifyTimeoutError:ae.transitional(ae.boolean)},!1),o!=null&&(h.isFunction(o)?n.paramsSerializer={serialize:o}:pt.assertOptions(o,{encode:ae.function,serialize:ae.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),pt.assertOptions(n,{baseUrl:ae.spelling("baseURL"),withXsrfToken:ae.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&h.merge(a.common,a[n.method]);a&&h.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=q.concat(i,a);const l=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(c=c&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let u,f=0,_;if(!c){const m=[mr.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,d),_=m.length,u=Promise.resolve(n);f<_;)u=u.then(m[f++],m[f++]);return u}_=l.length;let w=n;for(f=0;f<_;){const m=l[f++],y=l[f++];try{w=m(w)}catch(p){y.call(this,p);break}}try{u=mr.call(this,w)}catch(m){return Promise.reject(m)}for(f=0,_=d.length;f<_;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=Se(this.defaults,t);const n=or(t.baseURL,t.url,t.allowAbsoluteUrls);return Zn(n,t.params,t.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(t){Ne.prototype[t]=function(n,r){return this.request(Se(r||{},{method:t,url:n,data:(r||{}).data}))}}),h.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,l){return this.request(Se(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Ne.prototype[t]=n(),Ne.prototype[t+"Form"]=n(!0)});let Ko=class Ms{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(l=>{r.subscribe(l),a=l}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,l){r.reason||(r.reason=new Be(a,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ms(function(o){t=o}),cancel:t}}};function Xo(e){return function(n){return e.apply(null,n)}}function Qo(e){return h.isObject(e)&&e.isAxiosError===!0}const Xt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xt).forEach(([e,t])=>{Xt[t]=e});function gr(e){const t=new Ne(e),n=Ce(Ne.prototype.request,t);return h.extend(n,Ne.prototype,t,{allOwnKeys:!0}),h.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return gr(Se(e,o))},n}const C=gr(He);C.Axios=Ne,C.CanceledError=Be,C.CancelToken=Ko,C.isCancel=tr,C.VERSION=pr,C.toFormData=ct,C.AxiosError=O,C.Cancel=C.CanceledError,C.all=function(t){return Promise.all(t)},C.spread=Xo,C.isAxiosError=Qo,C.mergeConfig=Se,C.AxiosHeaders=q,C.formToJSON=e=>Qn(h.isHTMLForm(e)?new FormData(e):e),C.getAdapter=hr.getAdapter,C.HttpStatusCode=Xt,C.default=C;const{Axios:cm,AxiosError:dm,CanceledError:um,isCancel:fm,CancelToken:hm,VERSION:mm,all:pm,Cancel:ym,isAxiosError:gm,spread:_m,toFormData:wm,AxiosHeaders:xm,HttpStatusCode:km,formToJSON:bm,getAdapter:Em,mergeConfig:Sm}=C;/*!
|
|
7
7
|
* vue-router v4.5.1
|
|
8
8
|
* (c) 2025 Eduardo San Martin Morote
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/var hn;(function(e){e.pop="pop",e.push="push"})(hn||(hn={}));var mn;(function(e){e.back="back",e.forward="forward",e.unknown=""})(mn||(mn={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var pn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pn||(pn={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const Go=Symbol(process.env.NODE_ENV!=="production"?"router":""),Zo=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Jo(){return o.inject(Go)}function yt(e){return o.inject(Zo)}const I=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},Ko={},Qo={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-arrow-left"};function Xo(e,t){return o.openBlock(),o.createElementBlock("svg",Qo,t[0]||(t[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M5 12l14 0"},null,-1),o.createElementVNode("path",{d:"M5 12l6 6"},null,-1),o.createElementVNode("path",{d:"M5 12l6 -6"},null,-1)]))}const yn=I(Ko,[["render",Xo]]),ea=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type?.toLowerCase()}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",style:{class:"!w-[calc(50%-5px)]"},slots:{label:'<div class="flex items-center justify-start w-full gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id?.toLowerCase()}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"Text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"Number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"Email",text:"Електронна пошта",description:"Поле електронної пошти з фоматом перевірки"},{id:"Date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"Switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"File",text:"Файл",description:"Різноманітні файли"},{id:"Select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"Badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}],_n=[{key:"name",type:"Text",ua:"Назва",placeholder:"Назва",validators:["required"]},{key:"template",type:"Text",ua:"Шаблон",placeholder:"Шаблон",validators:["required"]},{key:"description",type:"Text",ua:"Опис",placeholder:"Опис"}],ta={class:"w-full flex justify-center"},ra={class:"p-[20px] w-full max-w-[1440px]"},na={class:"flex items-center justify-between"},sa={class:"mt-[10px]"},oa={class:"flex items-end gap-1"},aa={class:"font-medium text-2xl"},ia={class:"text-gray-600 font-medium text-2xl"},la={class:"text-gray-600"},ca={class:"flex items-center gap-1"},da={class:"w-full mt-[20px] bg-white rounded-xl"},ua={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},fa={__name:"vs-builder-content",props:{UPDATE:Object},setup(e){var g;const t=yt(),r=(g=o.getCurrentInstance().proxy)==null?void 0:g.$notify,n=e,s=o.computed(()=>{var _;return(_=t==null?void 0:t.params)==null?void 0:_.id}),a=o.ref(null),i=o.ref([]),l=o.ref({}),d=o.ref(!1),c=o.ref(),u=async()=>{var _,f,p,b;try{const{data:y}=await C.get(`/api/cms-builder/${s.value}`);a.value=(_=y==null?void 0:y.rows)==null?void 0:_[0],l.value=(f=y==null?void 0:y.rows)==null?void 0:f[0],i.value=((b=(p=y==null?void 0:y.rows)==null?void 0:p[0])==null?void 0:b.columns)||[]}catch{}},m=async()=>{try{await C.put(`/api/cms-builder/${s.value}`,{...a.value,columns:i.value}),await r({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await u()}catch(_){console.log(_),await r({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},w=async()=>{try{await c.value.doValidation(),await C.put(`/api/cms-builder/${s.value}`,l.value),await r({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await u(),d.value=!1,n.UPDATE.getList()}catch(_){console.log(_),await r({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};o.watch(s,u),o.onMounted(()=>u());const k={key:"type",type:"Autocomplete",ua:"Тип",searchable:!1,options:[{id:"single",text:"Одиночний тип"},{id:"collection",text:"Колекція"}]};return(_,f)=>{var P,$,H;const p=o.resolveComponent("VsDataTable"),b=o.resolveComponent("VsForm"),y=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",ta,[o.createElementVNode("div",ra,[o.createElementVNode("button",{onClick:f[0]||(f[0]=U=>_.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[o.createVNode(yn),f[6]||(f[6]=o.createTextVNode(" Повернутися назад "))]),o.createElementVNode("div",na,[o.createElementVNode("div",sa,[o.createElementVNode("div",oa,[o.createElementVNode("h2",aa,o.toDisplayString((P=a.value)==null?void 0:P.name)+" -",1),o.createElementVNode("span",ia,o.toDisplayString(($=a.value)==null?void 0:$.template),1)]),o.createElementVNode("p",la,o.toDisplayString((H=a.value)==null?void 0:H.description),1)]),o.createElementVNode("div",ca,[o.createElementVNode("button",{onClick:f[1]||(f[1]=U=>d.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Редагувати "),o.createElementVNode("button",{onClick:m,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),o.createElementVNode("div",null,[o.createElementVNode("div",da,[o.createVNode(p,{class:"w-full",colModel:o.unref(ea),modelValue:i.value,"onUpdate:modelValue":f[2]||(f[2]=U=>i.value=U),addition:!1,import:!1,additionBottom:!0},null,8,["colModel","modelValue"])])])])]),o.createVNode(y,{title:"Редагувати",visible:d.value,"onUpdate:visible":f[5]||(f[5]=U=>d.value=U)},{footer:o.withCtx(()=>[o.createElementVNode("div",ua,[o.createElementVNode("button",{onClick:f[4]||(f[4]=U=>d.value=!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"}," Скасувати"),o.createElementVNode("button",{onClick:w,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:o.withCtx(()=>[o.createElementVNode("div",null,[o.createVNode(b,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=U=>l.value=U),scheme:[...o.unref(_n),k],ref_key:"form",ref:c},null,8,["modelValue","scheme"])])]),_:1},8,["visible"])],64)}}},ha={},ma={xmlns:"http://www.w3.org/2000/svg",width:"5",height:"5",fill:"currentColor",viewBox:"0 0 4 4"};function pa(e,t){return o.openBlock(),o.createElementBlock("svg",ma,t[0]||(t[0]=[o.createElementVNode("rect",{width:"4",height:"4",fill:"currentColor",rx:"2"},null,-1)]))}const Jt=I(ha,[["render",pa]]),ya={},_a={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-plus"};function ga(e,t){return o.openBlock(),o.createElementBlock("svg",_a,t[0]||(t[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M12 5l0 14"},null,-1),o.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const gn=I(ya,[["render",ga]]),wa={class:"p-4 w-[260px] border-r h-[100%] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},xa={class:"flex flex-col space-y-1"},ka={class:"pt-2"},ba={class:"flex flex-col space-y-1"},Sa={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Ea={__name:"vs-builder-menu",props:{UPDATE:{},UPDATEModifiers:{}},emits:["update:UPDATE"],setup(e){var m;const t=(m=o.getCurrentInstance().proxy)==null?void 0:m.$notify,r=o.useModel(e,"UPDATE"),n=o.ref(null),s=o.ref(!1),a=o.ref({}),i=o.ref(""),l=o.ref(),d=async()=>{try{const{data:w}=await C.get("/api/cms-builder");n.value=(w==null?void 0:w.rows)||null}catch{}},c=w=>{w==="single"?(a.value={type:"single"},i.value="Створити новий тип"):(a.value={type:"collection"},i.value="Створити колекцію"),s.value=!0},u=async()=>{try{await l.value.doValidation(),await C.post("/api/cms-builder",a.value),await t({type:"success",title:"Успішно!",message:"Об'єкт створено успішно"}),s.value=!1,await d()}catch{await t({type:"error",title:"Помилка!",message:"При спробі створити об'єкт виникла помилка"})}};return d(),o.onMounted(()=>r.value.getList=()=>d()),(w,k)=>{var p,b;const g=o.resolveComponent("router-link"),_=o.resolveComponent("VsForm"),f=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",wa,[o.createElementVNode("div",null,[k[6]||(k[6]=o.createElementVNode("h2",{v:"",class:"block text-[14px] font-medium text-gray-800 mb-2 dark:text-neutral-200"}," Колекції ",-1)),o.createElementVNode("ul",xa,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((p=n.value)==null?void 0:p.filter(y=>(y==null?void 0:y.type)=="collection"),y=>{var P,$;return o.openBlock(),o.createElementBlock("li",{key:y==null?void 0:y.id},[o.createVNode(g,{to:`/builder/${y==null?void 0:y.id}`,class:o.normalizeClass([[(($=(P=w.$route)==null?void 0:P.params)==null?void 0:$.id)===(y==null?void 0:y.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:o.withCtx(()=>[o.createVNode(Jt,{class:"text-gray-500"}),o.createTextVNode(" "+o.toDisplayString(y==null?void 0:y.name),1)]),_:2},1032,["to","class"])])}),128))]),o.createElementVNode("button",{onClick:k[0]||(k[0]=y=>c("colection")),class:"text-blue-500 flex text-[14px] py-2 px-2 text-nowrap hover:text-blue-700 duration-300 gap-2 items-center"},[o.createVNode(gn,{height:"16",width:"16"}),k[5]||(k[5]=o.createTextVNode(" Створити нову колекцію "))])]),o.createElementVNode("div",ka,[k[8]||(k[8]=o.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),o.createElementVNode("ul",ba,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((b=n.value)==null?void 0:b.filter(y=>(y==null?void 0:y.type)=="single"),y=>{var P,$;return o.openBlock(),o.createElementBlock("li",{key:y==null?void 0:y.id},[o.createVNode(g,{to:`/builder/${y==null?void 0:y.id}`,class:o.normalizeClass([[(($=(P=w.$route)==null?void 0:P.params)==null?void 0:$.id)===(y==null?void 0:y.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 hover:bg-gray-200 rounded-lg focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:o.withCtx(()=>[o.createVNode(Jt,{class:"text-gray-500"}),o.createTextVNode(" "+o.toDisplayString(y==null?void 0:y.name),1)]),_:2},1032,["to","class"])])}),128))]),o.createElementVNode("button",{onClick:k[1]||(k[1]=y=>c("single")),class:"text-blue-500 flex text-[14px] py-2 px-2 hover:text-blue-700 duration-300 gap-2 items-center"},[o.createVNode(gn,{height:"16",width:"16"}),k[7]||(k[7]=o.createTextVNode(" Створити новий тип "))])])]),o.createVNode(f,{visible:s.value,"onUpdate:visible":k[4]||(k[4]=y=>s.value=y),title:i.value},{footer:o.withCtx(()=>[o.createElementVNode("div",Sa,[o.createElementVNode("button",{onClick:k[3]||(k[3]=y=>s.value=!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"}," Скасувати"),o.createElementVNode("button",{onClick:u,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:o.withCtx(()=>[o.createElementVNode("div",null,[o.createVNode(_,{modelValue:a.value,"onUpdate:modelValue":k[2]||(k[2]=y=>a.value=y),scheme:o.unref(_n),ref_key:"form",ref:l},null,8,["modelValue","scheme"])])]),_:1},8,["visible","title"])],64)}}},Da={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},Na={class:"w-full"},Oa={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},Ca={class:"max-w-sm mx-auto mt-6"},Ma={class:"font-medium text-gray-800 dark:text-neutral-200"},Ta={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function Va(e,t,r,n,s,a){return o.openBlock(),o.createElementBlock("div",Na,[o.createElementVNode("div",Oa,[t[0]||(t[0]=o.createStaticVNode('<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>',1)),o.createElementVNode("div",Ca,[o.createElementVNode("p",Ma,o.toDisplayString(r.title),1),o.createElementVNode("p",Ta,o.toDisplayString(r.text),1)])])])}const ze=I(Da,[["render",Va]]),Ra={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},Ba={class:"flex h-full"},Pa={__name:"vs-builder",setup(e){const t=o.ref({});return(r,n)=>{const s=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",Ra,[o.createElementVNode("div",Ba,[o.createVNode(Ea,{UPDATE:t.value,"onUpdate:UPDATE":n[0]||(n[0]=a=>t.value=a)},null,8,["UPDATE"]),o.createVNode(s,null,{default:o.withCtx(({Component:a})=>[a?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a),{key:0,UPDATE:t.value},null,8,["UPDATE"])):(o.openBlock(),o.createBlock(ze,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}},$a={class:"p-4 w-[260px] shrink-0 border-r h-[calc(100vh-60px)]"},Ya={class:"flex flex-col space-y-1"},Aa={__name:"vs-manager-single-menu",setup(e){const t=o.ref(null);return(async()=>{try{const{data:n}=await C.get("/api/cms-builder");t.value=(n==null?void 0:n.rows)||null}catch{}})(),(n,s)=>{var i;const a=o.resolveComponent("router-link");return o.openBlock(),o.createElementBlock("div",$a,[s[0]||(s[0]=o.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),o.createElementVNode("ul",Ya,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((i=t.value)==null?void 0:i.filter(l=>(l==null?void 0:l.type)=="single"),l=>{var d,c,u;return o.openBlock(),o.createElementBlock("li",{key:(d=n.item)==null?void 0:d.id},[o.createVNode(a,{to:`/manager-single/${l==null?void 0:l.template}`,class:o.normalizeClass([[((u=(c=n.$route)==null?void 0:c.params)==null?void 0:u.template)===(l==null?void 0:l.template)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:o.withCtx(()=>[o.createVNode(Jt,{class:"text-gray-500"}),o.createTextVNode(" "+o.toDisplayString((l==null?void 0:l.name)||(l==null?void 0:l.title)),1)]),_:2},1032,["to","class"])])}),128))])])}}},Fa={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},va={class:"flex"},La={class:"w-full flex justify-center"},Ua={class:"p-[20px] w-full max-w-[1440px]"},Ia={__name:"vs-manager-single",setup(e){return(t,r)=>{const n=o.resolveComponent("VsNotData"),s=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",Fa,[o.createElementVNode("div",va,[o.createVNode(Aa),o.createElementVNode("div",La,[o.createElementVNode("div",Ua,[o.createVNode(s,null,{default:o.withCtx(({Component:a})=>[a?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a),{key:0})):(o.openBlock(),o.createBlock(n,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])])])}}},ja={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},Wa={class:"p-[20px] w-full max-w-[1440px]"},Ha={class:"flex gap-2 items-center"},za={key:0},qa={key:2},Ga={key:3,class:"flex gap-2 items-center hover:text-blue-700 duration-300"},Za={__name:"vs-manager-collection",setup(e){const t=o.ref(null),r=o.ref({firstLevel:"",secondLevel:""});return(async()=>{var s;try{const{data:a}=await C.get("/api/cms-builder");t.value=((s=a==null?void 0:a.rows)==null?void 0:s.filter(i=>(i==null?void 0:i.type)=="collection"))||null}catch{}})(),(s,a)=>{var d,c,u,m,w,k,g,_,f,p,b;const i=o.resolveComponent("router-link"),l=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",ja,[o.createElementVNode("div",Wa,[o.createElementVNode("div",Ha,[o.createVNode(i,{to:"/manager-collection",class:"flex gap-2 items-center hover:text-blue-700 duration-300"},{default:o.withCtx(()=>a[1]||(a[1]=[o.createTextVNode(" Менеджер колекцій ")])),_:1}),(c=(d=s.$route)==null?void 0:d.params)!=null&&c.template?(o.openBlock(),o.createElementBlock("span",za,"/")):o.createCommentVNode("",!0),(m=(u=s.$route)==null?void 0:u.params)!=null&&m.template?(o.openBlock(),o.createBlock(i,{key:1,to:`/manager-collection/${(k=(w=s.$route)==null?void 0:w.params)==null?void 0:k.template}`,class:"flex gap-2 items-center hover:text-blue-700 duration-300"},{default:o.withCtx(()=>{var y;return[o.createTextVNode(o.toDisplayString((y=r.value)==null?void 0:y.firstLevel),1)]}),_:1},8,["to"])):o.createCommentVNode("",!0),(_=(g=s.$route)==null?void 0:g.params)!=null&&_.id?(o.openBlock(),o.createElementBlock("span",qa,"/")):o.createCommentVNode("",!0),(p=(f=s.$route)==null?void 0:f.params)!=null&&p.id?(o.openBlock(),o.createElementBlock("p",Ga,o.toDisplayString((b=r.value)==null?void 0:b.secondLevel),1)):o.createCommentVNode("",!0)]),o.createVNode(l,null,{default:o.withCtx(({Component:y})=>[y?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),{key:0,list:t.value,titles:r.value,"onUpdate:titles":a[0]||(a[0]=P=>r.value=P)},null,40,["list","titles"])):(o.openBlock(),o.createBlock(ze,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}};//! moment.js
|
|
10
|
+
*/var _r;(function(e){e.pop="pop",e.push="push"})(_r||(_r={}));var wr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(wr||(wr={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var xr;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(xr||(xr={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const ea=Symbol(process.env.NODE_ENV!=="production"?"router":""),ta=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function na(){return s.inject(ea)}function yt(e){return s.inject(ta)}const W=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},ra={},sa={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-arrow-left"};function oa(e,t){return s.openBlock(),s.createElementBlock("svg",sa,t[0]||(t[0]=[s.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s.createElementVNode("path",{d:"M5 12l14 0"},null,-1),s.createElementVNode("path",{d:"M5 12l6 6"},null,-1),s.createElementVNode("path",{d:"M5 12l6 -6"},null,-1)]))}const kr=W(ra,[["render",oa]]),aa=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type?.toLowerCase()}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",style:{class:"!w-[calc(50%-5px)]"},slots:{label:'<div class="flex items-center justify-start w-full gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id?.toLowerCase()}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"Text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"Number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"Email",text:"Електронна пошта",description:"Поле електронної пошти з фоматом перевірки"},{id:"Date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"Switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"File",text:"Файл",description:"Різноманітні файли"},{id:"Select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"Badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}],br=[{key:"name",type:"Text",ua:"Назва",placeholder:"Назва",validators:["required"]},{key:"template",type:"Text",ua:"Шаблон",placeholder:"Шаблон",validators:["required"]},{key:"description",type:"Text",ua:"Опис",placeholder:"Опис"}],ia={class:"w-full flex justify-center"},la={class:"p-[20px] w-full max-w-[1440px]"},ca={class:"flex items-center justify-between"},da={class:"mt-[10px]"},ua={class:"flex items-end gap-1"},fa={class:"font-medium text-2xl"},ha={class:"text-gray-600 font-medium text-2xl"},ma={class:"text-gray-600"},pa={class:"flex items-center gap-1"},ya={class:"w-full mt-[20px] bg-white rounded-xl"},ga={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},_a={__name:"vs-builder-content",props:{UPDATE:Object},setup(e){var m;const t=yt(),n=(m=s.getCurrentInstance().proxy)==null?void 0:m.$notify,r=e,o=s.computed(()=>{var y;return(y=t==null?void 0:t.params)==null?void 0:y.id}),a=s.ref(null),i=s.ref([]),l=s.ref({}),c=s.ref(!1),d=s.ref(),u=async()=>{var y,p,k,b;try{const{data:g}=await C.get(`/api/cms-builder/${o.value}`);a.value=(y=g==null?void 0:g.rows)==null?void 0:y[0],l.value=(p=g==null?void 0:g.rows)==null?void 0:p[0],i.value=((b=(k=g==null?void 0:g.rows)==null?void 0:k[0])==null?void 0:b.columns)||[]}catch{}},f=async()=>{try{await C.put(`/api/cms-builder/${o.value}`,{...a.value,columns:i.value}),await n({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await u()}catch(y){console.log(y),await n({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},_=async()=>{try{await d.value.doValidation(),await C.put(`/api/cms-builder/${o.value}`,l.value),await n({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await u(),c.value=!1,r.UPDATE.getList()}catch(y){console.log(y),await n({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};s.watch(o,u),s.onMounted(()=>u());const w={key:"type",type:"Autocomplete",ua:"Тип",searchable:!1,options:[{id:"single",text:"Одиночний тип"},{id:"collection",text:"Колекція"}]};return(y,p)=>{var D,V,P;const k=s.resolveComponent("VsDataTable"),b=s.resolveComponent("VsForm"),g=s.resolveComponent("VsDialog");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",ia,[s.createElementVNode("div",la,[s.createElementVNode("button",{onClick:p[0]||(p[0]=$=>y.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[s.createVNode(kr),p[6]||(p[6]=s.createTextVNode(" Повернутися назад "))]),s.createElementVNode("div",ca,[s.createElementVNode("div",da,[s.createElementVNode("div",ua,[s.createElementVNode("h2",fa,s.toDisplayString((D=a.value)==null?void 0:D.name)+" -",1),s.createElementVNode("span",ha,s.toDisplayString((V=a.value)==null?void 0:V.template),1)]),s.createElementVNode("p",ma,s.toDisplayString((P=a.value)==null?void 0:P.description),1)]),s.createElementVNode("div",pa,[s.createElementVNode("button",{onClick:p[1]||(p[1]=$=>c.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Редагувати "),s.createElementVNode("button",{onClick:f,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),s.createElementVNode("div",null,[s.createElementVNode("div",ya,[s.createVNode(k,{class:"w-full",colModel:s.unref(aa),modelValue:i.value,"onUpdate:modelValue":p[2]||(p[2]=$=>i.value=$),addition:!1,import:!1,additionBottom:!0},null,8,["colModel","modelValue"])])])])]),s.createVNode(g,{title:"Редагувати",visible:c.value,"onUpdate:visible":p[5]||(p[5]=$=>c.value=$)},{footer:s.withCtx(()=>[s.createElementVNode("div",ga,[s.createElementVNode("button",{onClick:p[4]||(p[4]=$=>c.value=!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"}," Скасувати"),s.createElementVNode("button",{onClick:_,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:s.withCtx(()=>[s.createElementVNode("div",null,[s.createVNode(b,{modelValue:l.value,"onUpdate:modelValue":p[3]||(p[3]=$=>l.value=$),scheme:[...s.unref(br),w],ref_key:"form",ref:d},null,8,["modelValue","scheme"])])]),_:1},8,["visible"])],64)}}},wa={},xa={xmlns:"http://www.w3.org/2000/svg",width:"5",height:"5",fill:"currentColor",viewBox:"0 0 4 4"};function ka(e,t){return s.openBlock(),s.createElementBlock("svg",xa,t[0]||(t[0]=[s.createElementVNode("rect",{width:"4",height:"4",fill:"currentColor",rx:"2"},null,-1)]))}const Qt=W(wa,[["render",ka]]),ba={},Ea={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-plus"};function Sa(e,t){return s.openBlock(),s.createElementBlock("svg",Ea,t[0]||(t[0]=[s.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s.createElementVNode("path",{d:"M12 5l0 14"},null,-1),s.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const Er=W(ba,[["render",Sa]]),Na={class:"p-4 w-[260px] border-r h-[100%] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Da={class:"flex flex-col space-y-1"},Va={class:"pt-2"},Oa={class:"flex flex-col space-y-1"},Ma={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Ca={__name:"vs-builder-menu",props:{UPDATE:{},UPDATEModifiers:{}},emits:["update:UPDATE"],setup(e){var f;const t=(f=s.getCurrentInstance().proxy)==null?void 0:f.$notify,n=s.useModel(e,"UPDATE"),r=s.ref(null),o=s.ref(!1),a=s.ref({}),i=s.ref(""),l=s.ref(),c=async()=>{try{const{data:_}=await C.get("/api/cms-builder");r.value=(_==null?void 0:_.rows)||null}catch{}},d=_=>{_==="single"?(a.value={type:"single"},i.value="Створити новий тип"):(a.value={type:"collection"},i.value="Створити колекцію"),o.value=!0},u=async()=>{try{await l.value.doValidation(),await C.post("/api/cms-builder",a.value),await t({type:"success",title:"Успішно!",message:"Об'єкт створено успішно"}),o.value=!1,await c()}catch{await t({type:"error",title:"Помилка!",message:"При спробі створити об'єкт виникла помилка"})}};return c(),s.onMounted(()=>n.value.getList=()=>c()),(_,w)=>{var k,b;const m=s.resolveComponent("router-link"),y=s.resolveComponent("VsForm"),p=s.resolveComponent("VsDialog");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",Na,[s.createElementVNode("div",null,[w[6]||(w[6]=s.createElementVNode("h2",{v:"",class:"block text-[14px] font-medium text-gray-800 mb-2 dark:text-neutral-200"}," Колекції ",-1)),s.createElementVNode("ul",Da,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList((k=r.value)==null?void 0:k.filter(g=>(g==null?void 0:g.type)=="collection"),g=>{var D,V;return s.openBlock(),s.createElementBlock("li",{key:g==null?void 0:g.id},[s.createVNode(m,{to:`/builder/${g==null?void 0:g.id}`,class:s.normalizeClass([[((V=(D=_.$route)==null?void 0:D.params)==null?void 0:V.id)===(g==null?void 0:g.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:s.withCtx(()=>[s.createVNode(Qt,{class:"text-gray-500"}),s.createTextVNode(" "+s.toDisplayString(g==null?void 0:g.name),1)]),_:2},1032,["to","class"])])}),128))]),s.createElementVNode("button",{onClick:w[0]||(w[0]=g=>d("colection")),class:"text-blue-500 flex text-[14px] py-2 px-2 text-nowrap hover:text-blue-700 duration-300 gap-2 items-center"},[s.createVNode(Er,{height:"16",width:"16"}),w[5]||(w[5]=s.createTextVNode(" Створити нову колекцію "))])]),s.createElementVNode("div",Va,[w[8]||(w[8]=s.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),s.createElementVNode("ul",Oa,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList((b=r.value)==null?void 0:b.filter(g=>(g==null?void 0:g.type)=="single"),g=>{var D,V;return s.openBlock(),s.createElementBlock("li",{key:g==null?void 0:g.id},[s.createVNode(m,{to:`/builder/${g==null?void 0:g.id}`,class:s.normalizeClass([[((V=(D=_.$route)==null?void 0:D.params)==null?void 0:V.id)===(g==null?void 0:g.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 hover:bg-gray-200 rounded-lg focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:s.withCtx(()=>[s.createVNode(Qt,{class:"text-gray-500"}),s.createTextVNode(" "+s.toDisplayString(g==null?void 0:g.name),1)]),_:2},1032,["to","class"])])}),128))]),s.createElementVNode("button",{onClick:w[1]||(w[1]=g=>d("single")),class:"text-blue-500 flex text-[14px] py-2 px-2 hover:text-blue-700 duration-300 gap-2 items-center"},[s.createVNode(Er,{height:"16",width:"16"}),w[7]||(w[7]=s.createTextVNode(" Створити новий тип "))])])]),s.createVNode(p,{visible:o.value,"onUpdate:visible":w[4]||(w[4]=g=>o.value=g),title:i.value},{footer:s.withCtx(()=>[s.createElementVNode("div",Ma,[s.createElementVNode("button",{onClick:w[3]||(w[3]=g=>o.value=!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"}," Скасувати"),s.createElementVNode("button",{onClick:u,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:s.withCtx(()=>[s.createElementVNode("div",null,[s.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":w[2]||(w[2]=g=>a.value=g),scheme:s.unref(br),ref_key:"form",ref:l},null,8,["modelValue","scheme"])])]),_:1},8,["visible","title"])],64)}}},Ta={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},Ba={class:"w-full"},$a={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},Ra={class:"max-w-sm mx-auto mt-6"},Fa={class:"font-medium text-gray-800 dark:text-neutral-200"},Ya={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function Pa(e,t,n,r,o,a){return s.openBlock(),s.createElementBlock("div",Ba,[s.createElementVNode("div",$a,[t[0]||(t[0]=s.createStaticVNode('<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>',1)),s.createElementVNode("div",Ra,[s.createElementVNode("p",Fa,s.toDisplayString(n.title),1),s.createElementVNode("p",Ya,s.toDisplayString(n.text),1)])])])}const gt=W(Ta,[["render",Pa]]),Aa={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},va={class:"flex h-full"},La={__name:"vs-builder",setup(e){const t=s.ref({});return(n,r)=>{const o=s.resolveComponent("router-view");return s.openBlock(),s.createElementBlock("div",Aa,[s.createElementVNode("div",va,[s.createVNode(Ca,{UPDATE:t.value,"onUpdate:UPDATE":r[0]||(r[0]=a=>t.value=a)},null,8,["UPDATE"]),s.createVNode(o,null,{default:s.withCtx(({Component:a})=>[a?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(a),{key:0,UPDATE:t.value},null,8,["UPDATE"])):(s.openBlock(),s.createBlock(gt,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}},Ua={class:"p-4 w-[260px] shrink-0 border-r h-[calc(100vh-60px)]"},Ia={class:"flex flex-col space-y-1"},ja={__name:"vs-manager-single-menu",setup(e){const t=s.ref(null);return(async()=>{try{const{data:r}=await C.get("/api/cms-builder");t.value=(r==null?void 0:r.rows)||null}catch{}})(),(r,o)=>{var i;const a=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("div",Ua,[o[0]||(o[0]=s.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),s.createElementVNode("ul",Ia,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList((i=t.value)==null?void 0:i.filter(l=>(l==null?void 0:l.type)=="single"),l=>{var c,d,u;return s.openBlock(),s.createElementBlock("li",{key:(c=r.item)==null?void 0:c.id},[s.createVNode(a,{to:`/manager-single/${l==null?void 0:l.template}`,class:s.normalizeClass([[((u=(d=r.$route)==null?void 0:d.params)==null?void 0:u.template)===(l==null?void 0:l.template)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:s.withCtx(()=>[s.createVNode(Qt,{class:"text-gray-500"}),s.createTextVNode(" "+s.toDisplayString((l==null?void 0:l.name)||(l==null?void 0:l.title)),1)]),_:2},1032,["to","class"])])}),128))])])}}},Wa={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},Ha={class:"flex"},za={class:"w-full flex justify-center"},qa={class:"p-[20px] w-full max-w-[1440px]"},Ga={__name:"vs-manager-single",setup(e){return(t,n)=>{const r=s.resolveComponent("VsNotData"),o=s.resolveComponent("router-view");return s.openBlock(),s.createElementBlock("div",Wa,[s.createElementVNode("div",Ha,[s.createVNode(ja),s.createElementVNode("div",za,[s.createElementVNode("div",qa,[s.createVNode(o,null,{default:s.withCtx(({Component:a})=>[a?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(a),{key:0})):(s.openBlock(),s.createBlock(r,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])])])}}},Ja={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},Za={class:"p-[20px] w-full max-w-[1440px]"},Ka={class:"flex gap-2 items-center"},Xa={key:0},Qa={key:2},ei={key:3,class:"flex gap-2 items-center hover:text-blue-700 duration-300"},ti={__name:"vs-manager-collection",setup(e){const t=s.ref(null),n=s.ref({firstLevel:"",secondLevel:""});return(async()=>{var o;try{const{data:a}=await C.get("/api/cms-builder");t.value=((o=a==null?void 0:a.rows)==null?void 0:o.filter(i=>(i==null?void 0:i.type)=="collection"))||null}catch{}})(),(o,a)=>{var c,d,u,f,_,w,m,y,p,k,b;const i=s.resolveComponent("router-link"),l=s.resolveComponent("router-view");return s.openBlock(),s.createElementBlock("div",Ja,[s.createElementVNode("div",Za,[s.createElementVNode("div",Ka,[s.createVNode(i,{to:"/manager-collection",class:"flex gap-2 items-center hover:text-blue-700 duration-300"},{default:s.withCtx(()=>a[1]||(a[1]=[s.createTextVNode(" Менеджер колекцій ")])),_:1}),(d=(c=o.$route)==null?void 0:c.params)!=null&&d.template?(s.openBlock(),s.createElementBlock("span",Xa,"/")):s.createCommentVNode("",!0),(f=(u=o.$route)==null?void 0:u.params)!=null&&f.template?(s.openBlock(),s.createBlock(i,{key:1,to:`/manager-collection/${(w=(_=o.$route)==null?void 0:_.params)==null?void 0:w.template}`,class:"flex gap-2 items-center hover:text-blue-700 duration-300"},{default:s.withCtx(()=>{var g;return[s.createTextVNode(s.toDisplayString((g=n.value)==null?void 0:g.firstLevel),1)]}),_:1},8,["to"])):s.createCommentVNode("",!0),(y=(m=o.$route)==null?void 0:m.params)!=null&&y.id?(s.openBlock(),s.createElementBlock("span",Qa,"/")):s.createCommentVNode("",!0),(k=(p=o.$route)==null?void 0:p.params)!=null&&k.id?(s.openBlock(),s.createElementBlock("p",ei,s.toDisplayString((b=n.value)==null?void 0:b.secondLevel),1)):s.createCommentVNode("",!0)]),s.createVNode(l,null,{default:s.withCtx(({Component:g})=>[g?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(g),{key:0,list:t.value,titles:n.value,"onUpdate:titles":a[0]||(a[0]=D=>n.value=D)},null,40,["list","titles"])):(s.openBlock(),s.createBlock(gt,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}};//! moment.js
|
|
11
11
|
//! version : 2.30.1
|
|
12
12
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
13
13
|
//! license : MIT
|
|
14
14
|
//! momentjs.com
|
|
15
|
-
var
|
|
16
|
-
[`+a+"] ";for(i in arguments[0])
|
|
17
|
-
Arguments: `+Array.prototype.slice.call(
|
|
18
|
-
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var Sn={};function En(e,t){S.deprecationHandler!=null&&S.deprecationHandler(e,t),Sn[e]||(bn(t),Sn[e]=!0)}S.suppressDeprecationWarnings=!1,S.deprecationHandler=null;function ae(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Qa(e){var t,r;for(r in e)V(e,r)&&(t=e[r],ae(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function rr(e,t){var r=ge({},e),n;for(n in t)V(t,n)&&(Ee(e[n])&&Ee(t[n])?(r[n]={},ge(r[n],e[n]),ge(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)V(e,n)&&!V(t,n)&&Ee(e[n])&&(r[n]=ge({},r[n]));return r}function nr(e){e!=null&&this.set(e)}var sr;Object.keys?sr=Object.keys:sr=function(e){var t,r=[];for(t in e)V(e,t)&&r.push(t);return r};var Xa={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ei(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return ae(n)?n.call(t,r):n}function ie(e,t,r){var n=""+Math.abs(e),s=t-n.length,a=e>=0;return(a?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var or=/(\[[^\[]*\])|(\\)?([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,gt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ar={},Ve={};function D(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Ve[e]=s),t&&(Ve[t[0]]=function(){return ie(s.apply(this,arguments),t[1],t[2])}),r&&(Ve[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function ti(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ri(e){var t=e.match(or),r,n;for(r=0,n=t.length;r<n;r++)Ve[t[r]]?t[r]=Ve[t[r]]:t[r]=ti(t[r]);return function(s){var a="",i;for(i=0;i<n;i++)a+=ae(t[i])?t[i].call(s,e):t[i];return a}}function wt(e,t){return e.isValid()?(t=Dn(t,e.localeData()),ar[t]=ar[t]||ri(t),ar[t](e)):e.localeData().invalidDate()}function Dn(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(gt.lastIndex=0;r>=0&>.test(e);)e=e.replace(gt,n),gt.lastIndex=0,r-=1;return e}var ni={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 si(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(or).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var oi="Invalid date";function ai(){return this._invalidDate}var ii="%d",li=/\d{1,2}/;function ci(e){return this._ordinal.replace("%d",e)}var di={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 ui(e,t,r,n){var s=this._relativeTime[r];return ae(s)?s(e,t,r,n):s.replace(/%d/i,e)}function fi(e,t){var r=this._relativeTime[e>0?"future":"past"];return ae(r)?r(t):r.replace(/%s/i,t)}var Nn={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 K(e){return typeof e=="string"?Nn[e]||Nn[e.toLowerCase()]:void 0}function ir(e){var t={},r,n;for(n in e)V(e,n)&&(r=K(n),r&&(t[r]=e[n]));return t}var hi={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 mi(e){var t=[],r;for(r in e)V(e,r)&&t.push({unit:r,priority:hi[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var On=/\d/,Z=/\d\d/,Cn=/\d{3}/,lr=/\d{4}/,xt=/[+-]?\d{6}/,Y=/\d\d?/,Mn=/\d\d\d\d?/,Tn=/\d\d\d\d\d\d?/,kt=/\d{1,3}/,cr=/\d{1,4}/,bt=/[+-]?\d{1,6}/,Re=/\d+/,St=/[+-]?\d+/,pi=/Z|[+-]\d\d:?\d\d/gi,Et=/Z|[+-]\d\d(?::?\d\d)?/gi,yi=/[+-]?\d+(\.\d{1,3})?/,Ze=/[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,Be=/^[1-9]\d?/,dr=/^([1-9]\d|\d)/,Dt;Dt={};function E(e,t,r){Dt[e]=ae(t)?t:function(n,s){return n&&r?r:t}}function _i(e,t){return V(Dt,e)?Dt[e](t._strict,t._locale):new RegExp(gi(e))}function gi(e){return de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,a){return r||n||s||a}))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Q(t)),r}var ur={};function B(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),ce(t)&&(n=function(a,i){i[t]=M(a)}),s=e.length,r=0;r<s;r++)ur[e[r]]=n}function Je(e,t){B(e,function(r,n,s,a){s._w=s._w||{},t(r,s._w,s,a)})}function wi(e,t,r){t!=null&&V(ur,e)&&ur[e](t,r._a,r,e)}function Nt(e){return e%4===0&&e%100!==0||e%400===0}var W=0,ue=1,le=2,L=3,re=4,fe=5,De=6,xi=7,ki=8;D("Y",0,0,function(){var e=this.year();return e<=9999?ie(e,4):"+"+e}),D(0,["YY",2],0,function(){return this.year()%100}),D(0,["YYYY",4],0,"year"),D(0,["YYYYY",5],0,"year"),D(0,["YYYYYY",6,!0],0,"year"),E("Y",St),E("YY",Y,Z),E("YYYY",cr,lr),E("YYYYY",bt,xt),E("YYYYYY",bt,xt),B(["YYYYY","YYYYYY"],W),B("YYYY",function(e,t){t[W]=e.length===2?S.parseTwoDigitYear(e):M(e)}),B("YY",function(e,t){t[W]=S.parseTwoDigitYear(e)}),B("Y",function(e,t){t[W]=parseInt(e,10)});function Ke(e){return Nt(e)?366:365}S.parseTwoDigitYear=function(e){return M(e)+(M(e)>68?1900:2e3)};var Vn=Pe("FullYear",!0);function bi(){return Nt(this.year())}function Pe(e,t){return function(r){return r!=null?(Rn(this,e,r),S.updateOffset(this,t),this):Qe(this,e)}}function Qe(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Rn(e,t,r){var n,s,a,i,l;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}a=r,i=e.month(),l=e.date(),l=l===29&&i===1&&!Nt(a)?28:l,s?n.setUTCFullYear(a,i,l):n.setFullYear(a,i,l)}}function Si(e){return e=K(e),ae(this[e])?this[e]():this}function Ei(e,t){if(typeof e=="object"){e=ir(e);var r=mi(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=K(e),ae(this[e]))return this[e](t);return this}function Di(e,t){return(e%t+t)%t}var v;Array.prototype.indexOf?v=Array.prototype.indexOf:v=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function fr(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Di(t,12);return e+=(t-r)/12,r===1?Nt(e)?29:28:31-r%7%2}D("M",["MM",2],"Mo",function(){return this.month()+1}),D("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),D("MMMM",0,0,function(e){return this.localeData().months(this,e)}),E("M",Y,Be),E("MM",Y,Z),E("MMM",function(e,t){return t.monthsShortRegex(e)}),E("MMMM",function(e,t){return t.monthsRegex(e)}),B(["M","MM"],function(e,t){t[ue]=M(e)-1}),B(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[ue]=s:O(r).invalidMonth=e});var Ni="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Bn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Oi=Ze,Ci=Ze;function Mi(e,t){return e?ee(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pn).test(t)?"format":"standalone"][e.month()]:ee(this._months)?this._months:this._months.standalone}function Ti(e,t){return e?ee(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pn.test(t)?"format":"standalone"][e.month()]:ee(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Vi(e,t,r){var n,s,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=oe([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return r?t==="MMM"?(s=v.call(this._shortMonthsParse,i),s!==-1?s:null):(s=v.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=v.call(this._shortMonthsParse,i),s!==-1?s:(s=v.call(this._longMonthsParse,i),s!==-1?s:null)):(s=v.call(this._longMonthsParse,i),s!==-1?s:(s=v.call(this._shortMonthsParse,i),s!==-1?s:null))}function Ri(e,t,r){var n,s,a;if(this._monthsParseExact)return Vi.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=oe([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(a="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function $n(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=M(t);else if(t=e.localeData().monthsParse(t),!ce(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,fr(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Yn(e){return e!=null?($n(this,e),S.updateOffset(this,!0),this):Qe(this,"Month")}function Bi(){return fr(this.year(),this.month())}function Pi(e){return this._monthsParseExact?(V(this,"_monthsRegex")||An.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(V(this,"_monthsShortRegex")||(this._monthsShortRegex=Oi),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function $i(e){return this._monthsParseExact?(V(this,"_monthsRegex")||An.call(this),e?this._monthsStrictRegex:this._monthsRegex):(V(this,"_monthsRegex")||(this._monthsRegex=Ci),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function An(){function e(d,c){return c.length-d.length}var t=[],r=[],n=[],s,a,i,l;for(s=0;s<12;s++)a=oe([2e3,s]),i=de(this.monthsShort(a,"")),l=de(this.months(a,"")),t.push(i),r.push(l),n.push(l),n.push(i);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Yi(e,t,r,n,s,a,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,r,n,s,a,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,r,n,s,a,i),l}function Xe(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ot(e,t,r){var n=7+t-r,s=(7+Xe(e,0,n).getUTCDay()-t)%7;return-s+n-1}function Fn(e,t,r,n,s){var a=(7+r-n)%7,i=Ot(e,n,s),l=1+7*(t-1)+a+i,d,c;return l<=0?(d=e-1,c=Ke(d)+l):l>Ke(e)?(d=e+1,c=l-Ke(e)):(d=e,c=l),{year:d,dayOfYear:c}}function et(e,t,r){var n=Ot(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,a,i;return s<1?(i=e.year()-1,a=s+he(i,t,r)):s>he(e.year(),t,r)?(a=s-he(e.year(),t,r),i=e.year()+1):(i=e.year(),a=s),{week:a,year:i}}function he(e,t,r){var n=Ot(e,t,r),s=Ot(e+1,t,r);return(Ke(e)-n+s)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),E("w",Y,Be),E("ww",Y,Z),E("W",Y,Be),E("WW",Y,Z),Je(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=M(e)});function Ai(e){return et(e,this._week.dow,this._week.doy).week}var Fi={dow:0,doy:6};function vi(){return this._week.dow}function Li(){return this._week.doy}function Ui(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Ii(e){var t=et(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}D("d",0,"do","day"),D("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),D("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),D("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),E("d",Y),E("e",Y),E("E",Y),E("dd",function(e,t){return t.weekdaysMinRegex(e)}),E("ddd",function(e,t){return t.weekdaysShortRegex(e)}),E("dddd",function(e,t){return t.weekdaysRegex(e)}),Je(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:O(r).invalidWeekday=e}),Je(["d","e","E"],function(e,t,r,n){t[n]=M(e)});function ji(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Wi(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function hr(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Hi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),vn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qi=Ze,Gi=Ze,Zi=Ze;function Ji(e,t){var r=ee(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?hr(r,this._week.dow):e?r[e.day()]:r}function Ki(e){return e===!0?hr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Qi(e){return e===!0?hr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Xi(e,t,r){var n,s,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=oe([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?t==="dddd"?(s=v.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=v.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=v.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=v.call(this._weekdaysParse,i),s!==-1||(s=v.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=v.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=v.call(this._shortWeekdaysParse,i),s!==-1||(s=v.call(this._weekdaysParse,i),s!==-1)?s:(s=v.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=v.call(this._minWeekdaysParse,i),s!==-1||(s=v.call(this._weekdaysParse,i),s!==-1)?s:(s=v.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function el(e,t,r){var n,s,a;if(this._weekdaysParseExact)return Xi.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=oe([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function tl(e){if(!this.isValid())return e!=null?this:NaN;var t=Qe(this,"Day");return e!=null?(e=ji(e,this.localeData()),this.add(e-t,"d")):t}function rl(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function nl(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Wi(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function sl(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(V(this,"_weekdaysRegex")||(this._weekdaysRegex=qi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ol(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(V(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Gi),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function al(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(V(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Zi),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function mr(){function e(u,m){return m.length-u.length}var t=[],r=[],n=[],s=[],a,i,l,d,c;for(a=0;a<7;a++)i=oe([2e3,1]).day(a),l=de(this.weekdaysMin(i,"")),d=de(this.weekdaysShort(i,"")),c=de(this.weekdays(i,"")),t.push(l),r.push(d),n.push(c),s.push(l),s.push(d),s.push(c);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function pr(){return this.hours()%12||12}function il(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,pr),D("k",["kk",2],0,il),D("hmm",0,0,function(){return""+pr.apply(this)+ie(this.minutes(),2)}),D("hmmss",0,0,function(){return""+pr.apply(this)+ie(this.minutes(),2)+ie(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+ie(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+ie(this.minutes(),2)+ie(this.seconds(),2)});function Ln(e,t){D(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ln("a",!0),Ln("A",!1);function Un(e,t){return t._meridiemParse}E("a",Un),E("A",Un),E("H",Y,dr),E("h",Y,Be),E("k",Y,Be),E("HH",Y,Z),E("hh",Y,Z),E("kk",Y,Z),E("hmm",Mn),E("hmmss",Tn),E("Hmm",Mn),E("Hmmss",Tn),B(["H","HH"],L),B(["k","kk"],function(e,t,r){var n=M(e);t[L]=n===24?0:n}),B(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),B(["h","hh"],function(e,t,r){t[L]=M(e),O(r).bigHour=!0}),B("hmm",function(e,t,r){var n=e.length-2;t[L]=M(e.substr(0,n)),t[re]=M(e.substr(n)),O(r).bigHour=!0}),B("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[L]=M(e.substr(0,n)),t[re]=M(e.substr(n,2)),t[fe]=M(e.substr(s)),O(r).bigHour=!0}),B("Hmm",function(e,t,r){var n=e.length-2;t[L]=M(e.substr(0,n)),t[re]=M(e.substr(n))}),B("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[L]=M(e.substr(0,n)),t[re]=M(e.substr(n,2)),t[fe]=M(e.substr(s))});function ll(e){return(e+"").toLowerCase().charAt(0)==="p"}var cl=/[ap]\.?m?\.?/i,dl=Pe("Hours",!0);function ul(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var In={calendar:Xa,longDateFormat:ni,invalidDate:oi,ordinal:ii,dayOfMonthOrdinalParse:li,relativeTime:di,months:Ni,monthsShort:Bn,week:Fi,weekdays:Hi,weekdaysMin:zi,weekdaysShort:vn,meridiemParse:cl},F={},tt={},rt;function fl(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function jn(e){return e&&e.toLowerCase().replace("_","-")}function hl(e){for(var t=0,r,n,s,a;t<e.length;){for(a=jn(e[t]).split("-"),r=a.length,n=jn(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Ct(a.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&fl(a,n)>=r-1)break;r--}t++}return rt}function ml(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ct(e){var t=null,r;if(F[e]===void 0&&typeof module<"u"&&module&&module.exports&&ml(e))try{t=rt._abbr,r=require,r("./locale/"+e),we(t)}catch{F[e]=null}return F[e]}function we(e,t){var r;return e&&(G(t)?r=me(e):r=yr(e,t),r?rt=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function yr(e,t){if(t!==null){var r,n=In;if(t.abbr=e,F[e]!=null)En("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."),n=F[e]._config;else if(t.parentLocale!=null)if(F[t.parentLocale]!=null)n=F[t.parentLocale]._config;else if(r=Ct(t.parentLocale),r!=null)n=r._config;else return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;return F[e]=new nr(rr(n,t)),tt[e]&&tt[e].forEach(function(s){yr(s.name,s.config)}),we(e),F[e]}else return delete F[e],null}function pl(e,t){if(t!=null){var r,n,s=In;F[e]!=null&&F[e].parentLocale!=null?F[e].set(rr(F[e]._config,t)):(n=Ct(e),n!=null&&(s=n._config),t=rr(s,t),n==null&&(t.abbr=e),r=new nr(t),r.parentLocale=F[e],F[e]=r),we(e)}else F[e]!=null&&(F[e].parentLocale!=null?(F[e]=F[e].parentLocale,e===we()&&we(e)):F[e]!=null&&delete F[e]);return F[e]}function me(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!ee(e)){if(t=Ct(e),t)return t;e=[e]}return hl(e)}function yl(){return sr(F)}function _r(e){var t,r=e._a;return r&&O(e).overflow===-2&&(t=r[ue]<0||r[ue]>11?ue:r[le]<1||r[le]>fr(r[W],r[ue])?le:r[L]<0||r[L]>24||r[L]===24&&(r[re]!==0||r[fe]!==0||r[De]!==0)?L:r[re]<0||r[re]>59?re:r[fe]<0||r[fe]>59?fe:r[De]<0||r[De]>999?De:-1,O(e)._overflowDayOfYear&&(t<W||t>le)&&(t=le),O(e)._overflowWeeks&&t===-1&&(t=xi),O(e)._overflowWeekday&&t===-1&&(t=ki),O(e).overflow=t),e}var _l=/^\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)?)?$/,gl=/^\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)?)?$/,wl=/Z|[+-]\d\d(?::?\d\d)?/,Mt=[["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]],gr=[["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/]],xl=/^\/?Date\((-?\d+)/i,kl=/^(?:(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}))$/,bl={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 Wn(e){var t,r,n=e._i,s=_l.exec(n)||gl.exec(n),a,i,l,d,c=Mt.length,u=gr.length;if(s){for(O(e).iso=!0,t=0,r=c;t<r;t++)if(Mt[t][1].exec(s[1])){i=Mt[t][0],a=Mt[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,r=u;t<r;t++)if(gr[t][1].exec(s[3])){l=(s[2]||" ")+gr[t][0];break}if(l==null){e._isValid=!1;return}}if(!a&&l!=null){e._isValid=!1;return}if(s[4])if(wl.exec(s[4]))d="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(d||""),xr(e)}else e._isValid=!1}function Sl(e,t,r,n,s,a){var i=[El(e),Bn.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return a&&i.push(parseInt(a,10)),i}function El(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Dl(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Nl(e,t,r){if(e){var n=vn.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return O(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ol(e,t,r){if(e)return bl[e];if(t)return 0;var n=parseInt(r,10),s=n%100,a=(n-s)/100;return a*60+s}function Hn(e){var t=kl.exec(Dl(e._i)),r;if(t){if(r=Sl(t[4],t[3],t[2],t[5],t[6],t[7]),!Nl(t[1],r,e))return;e._a=r,e._tzm=Ol(t[8],t[9],t[10]),e._d=Xe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),O(e).rfc2822=!0}else e._isValid=!1}function Cl(e){var t=xl.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Wn(e),e._isValid===!1)delete e._isValid;else return;if(Hn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:S.createFromInputFallback(e)}S.createFromInputFallback=J("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(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function $e(e,t,r){return e??t??r}function Ml(e){var t=new Date(S.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function wr(e){var t,r,n=[],s,a,i;if(!e._d){for(s=Ml(e),e._w&&e._a[le]==null&&e._a[ue]==null&&Tl(e),e._dayOfYear!=null&&(i=$e(e._a[W],s[W]),(e._dayOfYear>Ke(i)||e._dayOfYear===0)&&(O(e)._overflowDayOfYear=!0),r=Xe(i,0,e._dayOfYear),e._a[ue]=r.getUTCMonth(),e._a[le]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[L]===24&&e._a[re]===0&&e._a[fe]===0&&e._a[De]===0&&(e._nextDay=!0,e._a[L]=0),e._d=(e._useUTC?Xe:Yi).apply(null,n),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[L]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(O(e).weekdayMismatch=!0)}}function Tl(e){var t,r,n,s,a,i,l,d,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,i=4,r=$e(t.GG,e._a[W],et(A(),1,4).year),n=$e(t.W,1),s=$e(t.E,1),(s<1||s>7)&&(d=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=et(A(),a,i),r=$e(t.gg,e._a[W],c.year),n=$e(t.w,c.week),t.d!=null?(s=t.d,(s<0||s>6)&&(d=!0)):t.e!=null?(s=t.e+a,(t.e<0||t.e>6)&&(d=!0)):s=a),n<1||n>he(r,a,i)?O(e)._overflowWeeks=!0:d!=null?O(e)._overflowWeekday=!0:(l=Fn(r,n,s,a,i),e._a[W]=l.year,e._dayOfYear=l.dayOfYear)}S.ISO_8601=function(){},S.RFC_2822=function(){};function xr(e){if(e._f===S.ISO_8601){Wn(e);return}if(e._f===S.RFC_2822){Hn(e);return}e._a=[],O(e).empty=!0;var t=""+e._i,r,n,s,a,i,l=t.length,d=0,c,u;for(s=Dn(e._f,e._locale).match(or)||[],u=s.length,r=0;r<u;r++)a=s[r],n=(t.match(_i(a,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&O(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),d+=n.length),Ve[a]?(n?O(e).empty=!1:O(e).unusedTokens.push(a),wi(a,n,e)):e._strict&&!n&&O(e).unusedTokens.push(a);O(e).charsLeftOver=l-d,t.length>0&&O(e).unusedInput.push(t),e._a[L]<=12&&O(e).bigHour===!0&&e._a[L]>0&&(O(e).bigHour=void 0),O(e).parsedDateParts=e._a.slice(0),O(e).meridiem=e._meridiem,e._a[L]=Vl(e._locale,e._a[L],e._meridiem),c=O(e).era,c!==null&&(e._a[W]=e._locale.erasConvertYear(c,e._a[W])),wr(e),_r(e)}function Vl(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Rl(e){var t,r,n,s,a,i,l=!1,d=e._f.length;if(d===0){O(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<d;s++)a=0,i=!1,t=tr({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],xr(t),Xt(t)&&(i=!0),a+=O(t).charsLeftOver,a+=O(t).unusedTokens.length*10,O(t).score=a,l?a<n&&(n=a,r=t):(n==null||a<n||i)&&(n=a,r=t,i&&(l=!0));ge(e,r||t)}function Bl(e){if(!e._d){var t=ir(e._i),r=t.day===void 0?t.date:t.day;e._a=xn([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),wr(e)}}function Pl(e){var t=new Ge(_r(zn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function zn(e){var t=e._i,r=e._f;return e._locale=e._locale||me(e._l),t===null||r===void 0&&t===""?_t({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),te(t)?new Ge(_r(t)):(qe(t)?e._d=t:ee(r)?Rl(e):r?xr(e):$l(e),Xt(e)||(e._d=null),e))}function $l(e){var t=e._i;G(t)?e._d=new Date(S.now()):qe(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Cl(e):ee(t)?(e._a=xn(t.slice(0),function(r){return parseInt(r,10)}),wr(e)):Ee(t)?Bl(e):ce(t)?e._d=new Date(t):S.createFromInputFallback(e)}function qn(e,t,r,n,s){var a={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Ee(e)&&Kt(e)||ee(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=s,a._l=r,a._i=e,a._f=t,a._strict=n,Pl(a)}function A(e,t,r,n){return qn(e,t,r,n,!1)}var Yl=J("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=A.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_t()}),Al=J("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=A.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_t()});function Gn(e,t){var r,n;if(t.length===1&&ee(t[0])&&(t=t[0]),!t.length)return A();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Fl(){var e=[].slice.call(arguments,0);return Gn("isBefore",e)}function vl(){var e=[].slice.call(arguments,0);return Gn("isAfter",e)}var Ll=function(){return Date.now?Date.now():+new Date},nt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ul(e){var t,r=!1,n,s=nt.length;for(t in e)if(V(e,t)&&!(v.call(nt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[nt[n]]){if(r)return!1;parseFloat(e[nt[n]])!==M(e[nt[n]])&&(r=!0)}return!0}function Il(){return this._isValid}function jl(){return ne(NaN)}function Tt(e){var t=ir(e),r=t.year||0,n=t.quarter||0,s=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,d=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=Ul(t),this._milliseconds=+u+c*1e3+d*6e4+l*1e3*60*60,this._days=+i+a*7,this._months=+s+n*3+r*12,this._data={},this._locale=me(),this._bubble()}function Vt(e){return e instanceof Tt}function kr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Wl(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0,i;for(i=0;i<n;i++)M(e[i])!==M(t[i])&&a++;return a+s}function Zn(e,t){D(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+ie(~~(r/60),2)+t+ie(~~r%60,2)})}Zn("Z",":"),Zn("ZZ",""),E("Z",Et),E("ZZ",Et),B(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=br(Et,e)});var Hl=/([\+\-]|\d\d)/gi;function br(e,t){var r=(t||"").match(e),n,s,a;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(Hl)||["-",0,0],a=+(s[1]*60)+M(s[2]),a===0?0:s[0]==="+"?a:-a)}function Sr(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(te(e)||qe(e)?e.valueOf():A(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),S.updateOffset(r,!1),r):A(e).local()}function Er(e){return-Math.round(e._d.getTimezoneOffset())}S.updateOffset=function(){};function zl(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=br(Et,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=Er(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Xn(this,ne(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,S.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Er(this)}function ql(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Gl(e){return this.utcOffset(0,e)}function Zl(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Er(this),"m")),this}function Jl(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=br(pi,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Kl(e){return this.isValid()?(e=e?A(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Ql(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Xl(){if(!G(this._isDSTShifted))return this._isDSTShifted;var e={},t;return tr(e,this),e=zn(e),e._a?(t=e._isUTC?oe(e._a):A(e._a),this._isDSTShifted=this.isValid()&&Wl(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ec(){return this.isValid()?!this._isUTC:!1}function tc(){return this.isValid()?this._isUTC:!1}function Jn(){return this.isValid()?this._isUTC&&this._offset===0:!1}var rc=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,nc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ne(e,t){var r=e,n=null,s,a,i;return Vt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ce(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=rc.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:M(n[le])*s,h:M(n[L])*s,m:M(n[re])*s,s:M(n[fe])*s,ms:M(kr(n[De]*1e3))*s}):(n=nc.exec(e))?(s=n[1]==="-"?-1:1,r={y:Ne(n[2],s),M:Ne(n[3],s),w:Ne(n[4],s),d:Ne(n[5],s),h:Ne(n[6],s),m:Ne(n[7],s),s:Ne(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=sc(A(r.from),A(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),a=new Tt(r),Vt(e)&&V(e,"_locale")&&(a._locale=e._locale),Vt(e)&&V(e,"_isValid")&&(a._isValid=e._isValid),a}ne.fn=Tt.prototype,ne.invalid=jl;function Ne(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Kn(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function sc(e,t){var r;return e.isValid()&&t.isValid()?(t=Sr(t,e),e.isBefore(t)?r=Kn(e,t):(r=Kn(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Qn(e,t){return function(r,n){var s,a;return n!==null&&!isNaN(+n)&&(En(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=r,r=n,n=a),s=ne(r,n),Xn(this,s,e),this}}function Xn(e,t,r,n){var s=t._milliseconds,a=kr(t._days),i=kr(t._months);e.isValid()&&(n=n??!0,i&&$n(e,Qe(e,"Month")+i*r),a&&Rn(e,"Date",Qe(e,"Date")+a*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&S.updateOffset(e,a||i))}var oc=Qn(1,"add"),ac=Qn(-1,"subtract");function es(e){return typeof e=="string"||e instanceof String}function ic(e){return te(e)||qe(e)||es(e)||ce(e)||cc(e)||lc(e)||e===null||e===void 0}function lc(e){var t=Ee(e)&&!Kt(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,a,i=n.length;for(s=0;s<i;s+=1)a=n[s],r=r||V(e,a);return t&&r}function cc(e){var t=ee(e),r=!1;return t&&(r=e.filter(function(n){return!ce(n)&&es(e)}).length===0),t&&r}function dc(e){var t=Ee(e)&&!Kt(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,a;for(s=0;s<n.length;s+=1)a=n[s],r=r||V(e,a);return t&&r}function uc(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function fc(e,t){arguments.length===1&&(arguments[0]?ic(arguments[0])?(e=arguments[0],t=void 0):dc(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||A(),n=Sr(r,this).startOf("day"),s=S.calendarFormat(this,n)||"sameElse",a=t&&(ae(t[s])?t[s].call(this,r):t[s]);return this.format(a||this.localeData().calendar(s,this,A(r)))}function hc(){return new Ge(this)}function mc(e,t){var r=te(e)?e:A(e);return this.isValid()&&r.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function pc(e,t){var r=te(e)?e:A(e);return this.isValid()&&r.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function yc(e,t,r,n){var s=te(e)?e:A(e),a=te(t)?t:A(t);return this.isValid()&&s.isValid()&&a.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(a,r):!this.isAfter(a,r))):!1}function _c(e,t){var r=te(e)?e:A(e),n;return this.isValid()&&r.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function gc(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function wc(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function xc(e,t,r){var n,s,a;if(!this.isValid())return NaN;if(n=Sr(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=K(t),t){case"year":a=Rt(this,n)/12;break;case"month":a=Rt(this,n);break;case"quarter":a=Rt(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-s)/864e5;break;case"week":a=(this-n-s)/6048e5;break;default:a=this-n}return r?a:Q(a)}function Rt(e,t){if(e.date()<t.date())return-Rt(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,a;return t-n<0?(s=e.clone().add(r-1,"months"),a=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),a=(t-n)/(s-n)),-(r+a)||0}S.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",S.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function kc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function bc(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?wt(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ae(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",wt(r,"Z")):wt(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Sc(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(r+n+s+a)}function Ec(e){e||(e=this.isUtc()?S.defaultFormatUtc:S.defaultFormat);var t=wt(this,e);return this.localeData().postformat(t)}function Dc(e,t){return this.isValid()&&(te(e)&&e.isValid()||A(e).isValid())?ne({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Nc(e){return this.from(A(),e)}function Oc(e,t){return this.isValid()&&(te(e)&&e.isValid()||A(e).isValid())?ne({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Cc(e){return this.to(A(),e)}function ts(e){var t;return e===void 0?this._locale._abbr:(t=me(e),t!=null&&(this._locale=t),this)}var rs=J("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function ns(){return this._locale}var Bt=1e3,Ye=60*Bt,Pt=60*Ye,ss=(365*400+97)*24*Pt;function Ae(e,t){return(e%t+t)%t}function os(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-ss:new Date(e,t,r).valueOf()}function as(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-ss:Date.UTC(e,t,r)}function Mc(e){var t,r;if(e=K(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?as:os,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ae(t+(this._isUTC?0:this.utcOffset()*Ye),Pt);break;case"minute":t=this._d.valueOf(),t-=Ae(t,Ye);break;case"second":t=this._d.valueOf(),t-=Ae(t,Bt);break}return this._d.setTime(t),S.updateOffset(this,!0),this}function Tc(e){var t,r;if(e=K(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?as:os,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Pt-Ae(t+(this._isUTC?0:this.utcOffset()*Ye),Pt)-1;break;case"minute":t=this._d.valueOf(),t+=Ye-Ae(t,Ye)-1;break;case"second":t=this._d.valueOf(),t+=Bt-Ae(t,Bt)-1;break}return this._d.setTime(t),S.updateOffset(this,!0),this}function Vc(){return this._d.valueOf()-(this._offset||0)*6e4}function Rc(){return Math.floor(this.valueOf()/1e3)}function Bc(){return new Date(this.valueOf())}function Pc(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $c(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Yc(){return this.isValid()?this.toISOString():null}function Ac(){return Xt(this)}function Fc(){return ge({},O(this))}function vc(){return O(this).overflow}function Lc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),E("N",Dr),E("NN",Dr),E("NNN",Dr),E("NNNN",Kc),E("NNNNN",Qc),B(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?O(r).era=s:O(r).invalidEra=e}),E("y",Re),E("yy",Re),E("yyy",Re),E("yyyy",Re),E("yo",Xc),B(["y","yy","yyy","yyyy"],W),B(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[W]=r._locale.eraYearOrdinalParse(e,s):t[W]=parseInt(e,10)});function Uc(e,t){var r,n,s,a=this._eras||me("en")._eras;for(r=0,n=a.length;r<n;++r){switch(typeof a[r].since){case"string":s=S(a[r].since).startOf("day"),a[r].since=s.valueOf();break}switch(typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":s=S(a[r].until).startOf("day").valueOf(),a[r].until=s.valueOf();break}}return a}function Ic(e,t,r){var n,s,a=this.eras(),i,l,d;for(e=e.toUpperCase(),n=0,s=a.length;n<s;++n)if(i=a[n].name.toUpperCase(),l=a[n].abbr.toUpperCase(),d=a[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(l===e)return a[n];break;case"NNNN":if(i===e)return a[n];break;case"NNNNN":if(d===e)return a[n];break}else if([i,l,d].indexOf(e)>=0)return a[n]}function jc(e,t){var r=e.since<=e.until?1:-1;return t===void 0?S(e.since).year():S(e.since).year()+(t-e.offset)*r}function Wc(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function Hc(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function zc(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function qc(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-S(s[e].since).year())*r+s[e].offset;return this.year()}function Gc(e){return V(this,"_erasNameRegex")||Nr.call(this),e?this._erasNameRegex:this._erasRegex}function Zc(e){return V(this,"_erasAbbrRegex")||Nr.call(this),e?this._erasAbbrRegex:this._erasRegex}function Jc(e){return V(this,"_erasNarrowRegex")||Nr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Dr(e,t){return t.erasAbbrRegex(e)}function Kc(e,t){return t.erasNameRegex(e)}function Qc(e,t){return t.erasNarrowRegex(e)}function Xc(e,t){return t._eraYearOrdinalRegex||Re}function Nr(){var e=[],t=[],r=[],n=[],s,a,i,l,d,c=this.eras();for(s=0,a=c.length;s<a;++s)i=de(c[s].name),l=de(c[s].abbr),d=de(c[s].narrow),t.push(i),e.push(l),r.push(d),n.push(i),n.push(l),n.push(d);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100});function $t(e,t){D(0,[e,e.length],0,t)}$t("gggg","weekYear"),$t("ggggg","weekYear"),$t("GGGG","isoWeekYear"),$t("GGGGG","isoWeekYear"),E("G",St),E("g",St),E("GG",Y,Z),E("gg",Y,Z),E("GGGG",cr,lr),E("gggg",cr,lr),E("GGGGG",bt,xt),E("ggggg",bt,xt),Je(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=M(e)}),Je(["gg","GG"],function(e,t,r,n){t[n]=S.parseTwoDigitYear(e)});function ed(e){return is.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function td(e){return is.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function rd(){return he(this.year(),1,4)}function nd(){return he(this.isoWeekYear(),1,4)}function sd(){var e=this.localeData()._week;return he(this.year(),e.dow,e.doy)}function od(){var e=this.localeData()._week;return he(this.weekYear(),e.dow,e.doy)}function is(e,t,r,n,s){var a;return e==null?et(this,n,s).year:(a=he(e,n,s),t>a&&(t=a),ad.call(this,e,t,r,n,s))}function ad(e,t,r,n,s){var a=Fn(e,t,r,n,s),i=Xe(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}D("Q",0,"Qo","quarter"),E("Q",On),B("Q",function(e,t){t[ue]=(M(e)-1)*3});function id(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),E("D",Y,Be),E("DD",Y,Z),E("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),B(["D","DD"],le),B("Do",function(e,t){t[le]=M(e.match(Y)[0])});var ls=Pe("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),E("DDD",kt),E("DDDD",Cn),B(["DDD","DDDD"],function(e,t,r){r._dayOfYear=M(e)});function ld(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}D("m",["mm",2],0,"minute"),E("m",Y,dr),E("mm",Y,Z),B(["m","mm"],re);var cd=Pe("Minutes",!1);D("s",["ss",2],0,"second"),E("s",Y,dr),E("ss",Y,Z),B(["s","ss"],fe);var dd=Pe("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return this.millisecond()*10}),D(0,["SSSSS",5],0,function(){return this.millisecond()*100}),D(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),D(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),D(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),D(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),E("S",kt,On),E("SS",kt,Z),E("SSS",kt,Cn);var xe,cs;for(xe="SSSS";xe.length<=9;xe+="S")E(xe,Re);function ud(e,t){t[De]=M(("0."+e)*1e3)}for(xe="S";xe.length<=9;xe+="S")B(xe,ud);cs=Pe("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function fd(){return this._isUTC?"UTC":""}function hd(){return this._isUTC?"Coordinated Universal Time":""}var x=Ge.prototype;x.add=oc,x.calendar=fc,x.clone=hc,x.diff=xc,x.endOf=Tc,x.format=Ec,x.from=Dc,x.fromNow=Nc,x.to=Oc,x.toNow=Cc,x.get=Si,x.invalidAt=vc,x.isAfter=mc,x.isBefore=pc,x.isBetween=yc,x.isSame=_c,x.isSameOrAfter=gc,x.isSameOrBefore=wc,x.isValid=Ac,x.lang=rs,x.locale=ts,x.localeData=ns,x.max=Al,x.min=Yl,x.parsingFlags=Fc,x.set=Ei,x.startOf=Mc,x.subtract=ac,x.toArray=Pc,x.toObject=$c,x.toDate=Bc,x.toISOString=bc,x.inspect=Sc,typeof Symbol<"u"&&Symbol.for!=null&&(x[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),x.toJSON=Yc,x.toString=kc,x.unix=Rc,x.valueOf=Vc,x.creationData=Lc,x.eraName=Wc,x.eraNarrow=Hc,x.eraAbbr=zc,x.eraYear=qc,x.year=Vn,x.isLeapYear=bi,x.weekYear=ed,x.isoWeekYear=td,x.quarter=x.quarters=id,x.month=Yn,x.daysInMonth=Bi,x.week=x.weeks=Ui,x.isoWeek=x.isoWeeks=Ii,x.weeksInYear=sd,x.weeksInWeekYear=od,x.isoWeeksInYear=rd,x.isoWeeksInISOWeekYear=nd,x.date=ls,x.day=x.days=tl,x.weekday=rl,x.isoWeekday=nl,x.dayOfYear=ld,x.hour=x.hours=dl,x.minute=x.minutes=cd,x.second=x.seconds=dd,x.millisecond=x.milliseconds=cs,x.utcOffset=zl,x.utc=Gl,x.local=Zl,x.parseZone=Jl,x.hasAlignedHourOffset=Kl,x.isDST=Ql,x.isLocal=ec,x.isUtcOffset=tc,x.isUtc=Jn,x.isUTC=Jn,x.zoneAbbr=fd,x.zoneName=hd,x.dates=J("dates accessor is deprecated. Use date instead.",ls),x.months=J("months accessor is deprecated. Use month instead",Yn),x.years=J("years accessor is deprecated. Use year instead",Vn),x.zone=J("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",ql),x.isDSTShifted=J("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Xl);function md(e){return A(e*1e3)}function pd(){return A.apply(null,arguments).parseZone()}function ds(e){return e}var R=nr.prototype;R.calendar=ei,R.longDateFormat=si,R.invalidDate=ai,R.ordinal=ci,R.preparse=ds,R.postformat=ds,R.relativeTime=ui,R.pastFuture=fi,R.set=Qa,R.eras=Uc,R.erasParse=Ic,R.erasConvertYear=jc,R.erasAbbrRegex=Zc,R.erasNameRegex=Gc,R.erasNarrowRegex=Jc,R.months=Mi,R.monthsShort=Ti,R.monthsParse=Ri,R.monthsRegex=$i,R.monthsShortRegex=Pi,R.week=Ai,R.firstDayOfYear=Li,R.firstDayOfWeek=vi,R.weekdays=Ji,R.weekdaysMin=Qi,R.weekdaysShort=Ki,R.weekdaysParse=el,R.weekdaysRegex=sl,R.weekdaysShortRegex=ol,R.weekdaysMinRegex=al,R.isPM=ll,R.meridiem=ul;function Yt(e,t,r,n){var s=me(),a=oe().set(n,t);return s[r](a,e)}function us(e,t,r){if(ce(e)&&(t=e,e=void 0),e=e||"",t!=null)return Yt(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Yt(e,n,r,"month");return s}function Or(e,t,r,n){typeof e=="boolean"?(ce(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ce(t)&&(r=t,t=void 0),t=t||"");var s=me(),a=e?s._week.dow:0,i,l=[];if(r!=null)return Yt(t,(r+a)%7,n,"day");for(i=0;i<7;i++)l[i]=Yt(t,(i+a)%7,n,"day");return l}function yd(e,t){return us(e,t,"months")}function _d(e,t){return us(e,t,"monthsShort")}function gd(e,t,r){return Or(e,t,r,"weekdays")}function wd(e,t,r){return Or(e,t,r,"weekdaysShort")}function xd(e,t,r){return Or(e,t,r,"weekdaysMin")}we("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(e){var t=e%10,r=M(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),S.lang=J("moment.lang is deprecated. Use moment.locale instead.",we),S.langData=J("moment.langData is deprecated. Use moment.localeData instead.",me);var pe=Math.abs;function kd(){var e=this._data;return this._milliseconds=pe(this._milliseconds),this._days=pe(this._days),this._months=pe(this._months),e.milliseconds=pe(e.milliseconds),e.seconds=pe(e.seconds),e.minutes=pe(e.minutes),e.hours=pe(e.hours),e.months=pe(e.months),e.years=pe(e.years),this}function fs(e,t,r,n){var s=ne(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function bd(e,t){return fs(this,e,t,1)}function Sd(e,t){return fs(this,e,t,-1)}function hs(e){return e<0?Math.floor(e):Math.ceil(e)}function Ed(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,a,i,l,d;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=hs(Cr(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Q(e/1e3),n.seconds=s%60,a=Q(s/60),n.minutes=a%60,i=Q(a/60),n.hours=i%24,t+=Q(i/24),d=Q(ms(t)),r+=d,t-=hs(Cr(d)),l=Q(r/12),r%=12,n.days=t,n.months=r,n.years=l,this}function ms(e){return e*4800/146097}function Cr(e){return e*146097/4800}function Dd(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=K(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+ms(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Cr(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function ye(e){return function(){return this.as(e)}}var ps=ye("ms"),Nd=ye("s"),Od=ye("m"),Cd=ye("h"),Md=ye("d"),Td=ye("w"),Vd=ye("M"),Rd=ye("Q"),Bd=ye("y"),Pd=ps;function $d(){return ne(this)}function Yd(e){return e=K(e),this.isValid()?this[e+"s"]():NaN}function Oe(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ad=Oe("milliseconds"),Fd=Oe("seconds"),vd=Oe("minutes"),Ld=Oe("hours"),Ud=Oe("days"),Id=Oe("months"),jd=Oe("years");function Wd(){return Q(this.days()/7)}var _e=Math.round,Fe={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Hd(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function zd(e,t,r,n){var s=ne(e).abs(),a=_e(s.as("s")),i=_e(s.as("m")),l=_e(s.as("h")),d=_e(s.as("d")),c=_e(s.as("M")),u=_e(s.as("w")),m=_e(s.as("y")),w=a<=r.ss&&["s",a]||a<r.s&&["ss",a]||i<=1&&["m"]||i<r.m&&["mm",i]||l<=1&&["h"]||l<r.h&&["hh",l]||d<=1&&["d"]||d<r.d&&["dd",d];return r.w!=null&&(w=w||u<=1&&["w"]||u<r.w&&["ww",u]),w=w||c<=1&&["M"]||c<r.M&&["MM",c]||m<=1&&["y"]||["yy",m],w[2]=t,w[3]=+e>0,w[4]=n,Hd.apply(null,w)}function qd(e){return e===void 0?_e:typeof e=="function"?(_e=e,!0):!1}function Gd(e,t){return Fe[e]===void 0?!1:t===void 0?Fe[e]:(Fe[e]=t,e==="s"&&(Fe.ss=t-1),!0)}function Zd(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Fe,s,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Fe,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),a=zd(this,!r,n,s),r&&(a=s.pastFuture(+this,a)),s.postformat(a)}var Mr=Math.abs;function ve(e){return(e>0)-(e<0)||+e}function At(){if(!this.isValid())return this.localeData().invalidDate();var e=Mr(this._milliseconds)/1e3,t=Mr(this._days),r=Mr(this._months),n,s,a,i,l=this.asSeconds(),d,c,u,m;return l?(n=Q(e/60),s=Q(n/60),e%=60,n%=60,a=Q(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",d=l<0?"-":"",c=ve(this._months)!==ve(l)?"-":"",u=ve(this._days)!==ve(l)?"-":"",m=ve(this._milliseconds)!==ve(l)?"-":"",d+"P"+(a?c+a+"Y":"")+(r?c+r+"M":"")+(t?u+t+"D":"")+(s||n||e?"T":"")+(s?m+s+"H":"")+(n?m+n+"M":"")+(e?m+i+"S":"")):"P0D"}var T=Tt.prototype;T.isValid=Il,T.abs=kd,T.add=bd,T.subtract=Sd,T.as=Dd,T.asMilliseconds=ps,T.asSeconds=Nd,T.asMinutes=Od,T.asHours=Cd,T.asDays=Md,T.asWeeks=Td,T.asMonths=Vd,T.asQuarters=Rd,T.asYears=Bd,T.valueOf=Pd,T._bubble=Ed,T.clone=$d,T.get=Yd,T.milliseconds=Ad,T.seconds=Fd,T.minutes=vd,T.hours=Ld,T.days=Ud,T.weeks=Wd,T.months=Id,T.years=jd,T.humanize=Zd,T.toISOString=At,T.toString=At,T.toJSON=At,T.locale=ts,T.localeData=ns,T.toIsoString=J("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",At),T.lang=rs,D("X",0,0,"unix"),D("x",0,0,"valueOf"),E("x",St),E("X",yi),B("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),B("x",function(e,t,r){r._d=new Date(M(e))});//! moment.js
|
|
19
|
-
S.version="2.30.1",Ja(A),S.fn=x,S.min=Fl,S.max=vl,S.now=Ll,S.utc=oe,S.unix=md,S.months=yd,S.isDate=qe,S.locale=we,S.invalid=_t,S.duration=ne,S.isMoment=te,S.weekdays=gd,S.parseZone=pd,S.localeData=me,S.isDuration=Vt,S.monthsShort=_d,S.weekdaysMin=xd,S.defineLocale=yr,S.updateLocale=pl,S.locales=yl,S.weekdaysShort=wd,S.normalizeUnits=K,S.relativeTimeRounding=qd,S.relativeTimeThreshold=Gd,S.calendarFormat=uc,S.prototype=x,S.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 Jd={class:"whitespace-nowrap"},Kd={__name:"vs-manager-table-date",props:{value:{type:String,default:()=>""}},setup(e){const t=e,r=o.computed(()=>{if(!t.value)return"-";try{const n=S(t.value,"YYYY-MM-DD");return new Date(n).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return t.value}});return(n,s)=>(o.openBlock(),o.createElementBlock("div",Jd,o.toDisplayString(r.value),1))}},Qd={},Xd={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function eu(e,t,r,n,s,a){return o.openBlock(),o.createElementBlock("svg",Xd,t[0]||(t[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const ys=I(Qd,[["render",eu]]),_s={__name:"vs-manager-table-switch",props:{value:{type:Boolean,default:()=>!1}},setup(e){return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center disabled",[e.value?"bg-blue-400":"border"]])},[o.createVNode(ys,{height:"18",width:"18",class:"text-white"})],2))}},gs={switch:_s,switcher:_s,date:Kd},tu={class:"w-full"},ru={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},nu={class:"sticky top-[0px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},su={class:"divide-y divide-gray-200 dark:divide-neutral-700"},ou=["onClick"],au={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},iu={__name:"vs-manager-collection-table",props:{objectData:Object,template:String},setup(e){const t=[{ua:"Назва",name:"title",format:"Text"},{ua:"Шлях",name:"url",format:"Text"},{ua:"Чи увімкнений",name:"enabled",format:"Switch"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(r,n)=>{var s,a,i;return o.openBlock(),o.createElementBlock("div",tu,[(a=(s=e.objectData)==null?void 0:s.rows)!=null&&a.length?(o.openBlock(),o.createElementBlock("table",ru,[o.createElementVNode("thead",nu,[o.createElementVNode("tr",null,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,(l,d)=>o.createElementVNode("th",{key:d,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},o.toDisplayString(l==null?void 0:l.ua),1)),64))])]),o.createElementVNode("tbody",su,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((i=e.objectData)==null?void 0:i.rows,l=>(o.openBlock(),o.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:d=>r.$router.push(`/manager-collection/${e.template}/${l==null?void 0:l.id}`)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,d=>{var c;return o.createElementVNode("td",au,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(gs)[(c=d==null?void 0:d.format)==null?void 0:c.toLowerCase()]||"div"),{value:l==null?void 0:l[d==null?void 0:d.name]},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l==null?void 0:l[d==null?void 0:d.name]),1)]),_:2},1032,["value"]))])}),64))],8,ou))),256))])])):(o.openBlock(),o.createBlock(ze,{key:1}))])}}},lu=e=>{const t={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return e.toLowerCase().split("").map(r=>t[r]||r).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim("-")},cu={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},du={__name:"vs-manager-colection-table-add",props:{template:{type:String,default:()=>""}},emits:["update-list"],setup(e,{emit:t}){const r=o.getCurrentInstance().proxy.$notify,n=t,s=e,a=o.ref(!1),i=o.ref({}),l=o.ref(),d=async()=>{try{await l.value.doValidation(),i.value.url=lu(i.value.title),await C.post(`/api/cms-manager/${s.template}`,i.value),r({type:"success",title:"Успушно!",message:"Об'єкт створено успішно"}),i.value={},a.value=!1,n("update-list")}catch{r({type:"error",title:"Помилка!",message:"При спробі створити об'єкт сталася помилка"})}},c=[{key:"title",ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},{key:"body",ua:"Контент",type:"TextEditor",validators:["required"]},{ua:"Чи увімкнений",name:"enabled",type:"Switcher"}];return(u,m)=>{const w=o.resolveComponent("VsForm"),k=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("button",{onClick:m[0]||(m[0]=g=>a.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити "),o.createVNode(k,{title:"Створити об'єкт",visible:a.value,"onUpdate:visible":m[3]||(m[3]=g=>a.value=g)},{footer:o.withCtx(()=>[o.createElementVNode("div",cu,[o.createElementVNode("button",{onClick:m[2]||(m[2]=g=>a.value=!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"}," Скасувати"),o.createElementVNode("button",{onClick:d,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:o.withCtx(()=>[o.createElementVNode("div",null,[o.createVNode(w,{ref_key:"form",ref:l,scheme:c,modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=g=>i.value=g)},null,8,["modelValue"])])]),_:1},8,["visible"])],64)}}},uu=(e,t=300)=>{let r;return function(...n){clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}},fu={class:"bg-white rounded-xl p-[20px] border mt-[20px]"},hu={class:"mb-4 xl:mb-8"},mu={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},pu={class:"text-sm text-gray-500 dark:text-neutral-500"},yu={class:"flex items-center"},_u={class:"flex justify-end ml-auto items-center"},gu={__name:"vs-manager-collection-content",props:{titles:{},titlesModifiers:{}},emits:["update:titles"],setup(e){const t=yt(),r=o.useModel(e,"titles"),n=o.computed(()=>{var l;return(l=t==null?void 0:t.params)==null?void 0:l.template}),s=o.ref(null),a=async(l=null)=>{var d;try{const{data:c}=await C.get(`/api/cms-manager/${n.value}`,{params:{search:l}});s.value=c,r.value.firstLevel=(d=c==null?void 0:c.type)==null?void 0:d.name}catch{}},i=uu(l=>a(l),300);return o.watch(n,a),o.onMounted(()=>a()),(l,d)=>{var c,u,m,w;return o.openBlock(),o.createElementBlock("div",fu,[o.createElementVNode("div",hu,[o.createElementVNode("h1",mu,o.toDisplayString((u=(c=s.value)==null?void 0:c.type)==null?void 0:u.name),1),o.createElementVNode("p",pu,o.toDisplayString((w=(m=s.value)==null?void 0:m.type)==null?void 0:w.description),1)]),o.createElementVNode("div",yu,[o.createElementVNode("input",{type:"text",onInput:d[0]||(d[0]=({target:k})=>o.unref(i)(k.value)),class:"py-2 px-4 block max-w-[400px] w-full bg-gray-100 border-transparent rounded-lg text-sm focus:outline-2 focus:outline-blue-500 h-[36px] mb-[1px]",placeholder:"Пошук за назвою"},null,32),o.createElementVNode("div",_u,[o.createVNode(du,{template:n.value,onUpdateList:a},null,8,["template"])])]),o.createVNode(iu,{objectData:s.value,template:n.value},null,8,["objectData","template"])])}}},wu={class:"flex items-center justify-between"},xu={class:"mt-[10px]"},ku={class:"font-medium text-2xl"},bu={class:"text-gray-600"},Su={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Eu={__name:"vs-manager-collection-item",props:{titles:{},titlesModifiers:{}},emits:["update:titles"],setup(e){const t=o.getCurrentInstance().proxy.$notify,r=yt(),n=Jo(),s=o.computed(()=>{var g;return(g=r==null?void 0:r.params)==null?void 0:g.template}),a=o.computed(()=>{var g;return(g=r==null?void 0:r.params)==null?void 0:g.id}),i=o.ref(null),l=o.ref({}),d=o.useModel(e,"titles"),c=o.ref(1),u=async()=>{var g,_,f,p,b;try{const{data:y}=await C.get(`/api/cms-manager/${s.value}/${a.value}`);i.value=(g=y==null?void 0:y.rows)==null?void 0:g[0],l.value=(_=y==null?void 0:y.rows)==null?void 0:_[0],c.value=c.value+1,d.value.secondLevel=(p=(f=y==null?void 0:y.rows)==null?void 0:f[0])==null?void 0:p.title,d.value.firstLevel=(b=y==null?void 0:y.type)==null?void 0:b.name}catch{}},m=async()=>{try{await C.put(`/api/cms-manager/${a.value}`,l.value),await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),u()}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},w=async()=>{try{await C.delete(`/api/cms-manager/${a.value}`),await t({type:"success",title:"Успішно!",message:"Об'єкт видалено успішно"}),await(n==null?void 0:n.back())}catch{await t({type:"error",title:"Помилка!",message:"При спробі видалити об'єкт виникла помилка"})}};o.watch(s,u),o.onMounted(()=>u());const k={title:{ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},body:{ua:"Контент",type:"TextEditor",validators:["required"]},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(g,_)=>{var p,b;const f=o.resolveComponent("VsForm");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",wu,[o.createElementVNode("div",xu,[o.createElementVNode("h2",ku,o.toDisplayString((p=i.value)==null?void 0:p.title),1),o.createElementVNode("p",bu,o.toDisplayString((b=i.value)==null?void 0:b.description),1)]),o.createElementVNode("div",{class:"flex items-center gap-1"},[o.createElementVNode("button",{onClick:w,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-red-500 rounded-lg !border-gray-200 hover:bg-red-700 duration-300"}," Видалити "),o.createElementVNode("button",{onClick:m,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),o.createElementVNode("div",null,[o.createElementVNode("div",Su,[(o.openBlock(),o.createBlock(f,{key:c.value,class:"w-full",scheme:k,modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=y=>l.value=y)},null,8,["modelValue"]))])])],64)}}},Du={class:"flex items-center justify-between"},Nu={class:"mt-[10px]"},Ou={class:"font-medium text-2xl"},Cu={class:"text-gray-600"},Mu={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Tu={__name:"vs-manager-single-content",setup(e){const t=yt(),r=o.computed(()=>{var c;return(c=t==null?void 0:t.params)==null?void 0:c.template}),n=o.ref(null),s=o.ref({}),a=o.ref(1),i=async()=>{var c,u;try{const{data:m}=await C.get(`/api/cms-manager/${r.value}`);n.value=(c=m==null?void 0:m.rows)==null?void 0:c[0],s.value=(u=m==null?void 0:m.rows)==null?void 0:u[0],a.value=a.value+1}catch{}},l=async()=>{var c;try{await C.put(`/api/cms-manager/${(c=n.value)==null?void 0:c.id}`,s.value),await $notify({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),i()}catch{await $notify({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};o.watch(r,i),o.onMounted(()=>i());const d={title:{ua:"Назва",type:"Text",placeholder:"Назва"},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(c,u)=>{var w,k;const m=o.resolveComponent("VsForm");return o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("button",{onClick:u[0]||(u[0]=g=>c.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[o.createVNode(yn,{template:r.value},null,8,["template"]),u[2]||(u[2]=o.createTextVNode(" Повернутися назад "))]),o.createElementVNode("div",Du,[o.createElementVNode("div",Nu,[o.createElementVNode("h2",Ou,o.toDisplayString((w=n.value)==null?void 0:w.title),1),o.createElementVNode("p",Cu,o.toDisplayString((k=n.value)==null?void 0:k.description),1)]),o.createElementVNode("div",{class:"flex items-center gap-1"},[o.createElementVNode("button",{onClick:l,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),o.createElementVNode("div",null,[o.createElementVNode("div",Mu,[(o.openBlock(),o.createBlock(m,{key:a.value,class:"w-full",scheme:d,modelValue:s.value,"onUpdate:modelValue":u[1]||(u[1]=g=>s.value=g)},null,8,["modelValue"]))])])])}}},Vu={},Ru={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Bu(e,t){return o.openBlock(),o.createElementBlock("svg",Ru,t[0]||(t[0]=[o.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),o.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)]))}const Pu=I(Vu,[["render",Bu]]),$u={},Yu={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"};function Au(e,t){return o.openBlock(),o.createElementBlock("svg",Yu,t[0]||(t[0]=[o.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"},null,-1)]))}const ws=I($u,[["render",Au]]),Fu={components:{IconHome:Pu,IconChewronRight:ws},props:{initialPath:{type:String,default:""},root:{type:String,default:"Root"}},data(){return{breadcrumbs:[]}},watch:{initialPath:{immediate:!0,handler(e){const t=e.split("/").filter(Boolean);this.breadcrumbs=[this.root,...t]}}},methods:{navigateTo(e){const t=e===0?"":this.breadcrumbs.slice(1,e+1).join("/");this.$emit("update-path",t)}}},vu={"aria-label":"Breadcrumb",class:"mb-4"},Lu={class:"flex items-start justify-between"},Uu={class:"flex flex-wrap items-center gap-[5px] min-h-8"},Iu={class:"flex items-center"},ju=["onClick"],Wu={key:1};function Hu(e,t,r,n,s,a){const i=o.resolveComponent("IconHome"),l=o.resolveComponent("IconChewronRight");return o.openBlock(),o.createElementBlock("nav",vu,[o.createElementVNode("div",Lu,[o.createElementVNode("ol",Uu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.breadcrumbs,(d,c)=>(o.openBlock(),o.createElementBlock("li",{key:c,class:"whitespace-nowrap"},[o.createElementVNode("div",Iu,[o.createElementVNode("button",{onClick:u=>a.navigateTo(c),class:o.normalizeClass([["hover:text-blue-500 focus:outline-none flex items-center",c===s.breadcrumbs.length-1?"font-medium underline text-blue-500":"text-gray-500"],"h-8 flex items-center"])},[c===0?(o.openBlock(),o.createBlock(i,{key:0,class:"w-4 h-4"})):(o.openBlock(),o.createElementBlock("span",Wu,o.toDisplayString(d),1))],10,ju),c<s.breadcrumbs.length-1?(o.openBlock(),o.createBlock(l,{key:0,class:"text-gray-400 w-3 h-3 ml-[10px]"})):o.createCommentVNode("",!0)])]))),128))])])])}const zu=I(Fu,[["render",Hu]]),qu={},Gu={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zu(e,t){return o.openBlock(),o.createElementBlock("svg",Gu,t[0]||(t[0]=[o.createElementVNode("path",{d:"M6.41667 11.0833C8.994 11.0833 11.0833 8.994 11.0833 6.41667C11.0833 3.83934 8.994 1.75 6.41667 1.75C3.83934 1.75 1.75 3.83934 1.75 6.41667C1.75 8.994 3.83934 11.0833 6.41667 11.0833Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),o.createElementVNode("path",{d:"M12.25 12.25L9.7417 9.7417",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ju=I(qu,[["render",Zu]]),Ku={},Qu={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Xu(e,t){return o.openBlock(),o.createElementBlock("svg",Qu,t[0]||(t[0]=[o.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),o.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const ef=I(Ku,[["render",Xu]]),tf={},rf={width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function nf(e,t){return o.openBlock(),o.createElementBlock("svg",rf,t[0]||(t[0]=[o.createElementVNode("path",{d:"M3 8.2C3 7.07989 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.0799 5 6.2 5H9.67452C10.1637 5 10.4083 5 10.6385 5.05526C10.8425 5.10425 11.0376 5.18506 11.2166 5.29472C11.4184 5.4184 11.5914 5.59135 11.9373 5.93726L12.0627 6.06274C12.4086 6.40865 12.5816 6.5816 12.7834 6.70528C12.9624 6.81494 13.1575 6.89575 13.3615 6.94474C13.5917 7 13.8363 7 14.3255 7H17.8C18.9201 7 19.4802 7 19.908 7.21799C20.2843 7.40973 20.5903 7.71569 20.782 8.09202C21 8.51984 21 9.0799 21 10.2V15.8C21 16.9201 21 17.4802 20.782 17.908C20.5903 18.2843 20.2843 18.5903 19.908 18.782C19.4802 19 18.9201 19 17.8 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2Z",stroke:"#000000","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const sf=I(tf,[["render",nf]]),of={},af={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lf(e,t){return o.openBlock(),o.createElementBlock("svg",af,t[0]||(t[0]=[o.createElementVNode("path",{d:"M18 6L6 18",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),o.createElementVNode("path",{d:"M6 6L18 18",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const cf=I(of,[["render",lf]]),df={},uf={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function ff(e,t){return o.openBlock(),o.createElementBlock("svg",uf,t[0]||(t[0]=[o.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const hf=I(df,[["render",ff]]),mf={},pf={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function yf(e,t){return o.openBlock(),o.createElementBlock("svg",pf,t[0]||(t[0]=[o.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),o.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const _f={components:{Breadcrumb:zu,IconSearch:Ju,IconFolder:ef,IconFolder2:sf,IconClose:cf,IconImage:I(mf,[["render",yf]]),IconActions:hf,VsNotData:ze},props:{type:{type:String,default:"icon"}},data(){return{icons:[],currentPage:parseInt(this.$route.query.page,10)||1,iconsPerPage:15,token:"",searchQuery:"",selectedFile:null,isAddDirModalOpen:!1,newDirName:""}},watch:{isAddDirModalOpen(e){e||(this.newDirName="")}},computed:{currentDir(){return this.$route.query.dir||""},currentTab(){return this.$route.query.tab||""},filteredIcons(){return this.searchQuery?this.icons.filter(e=>e.name.toLowerCase().includes(this.searchQuery.toLowerCase())):this.icons},sortedIcons(){return[...this.filteredIcons].sort((e,t)=>e.type==="dir"&&t.type!=="dir"?-1:e.type!=="dir"&&t.type==="dir"?1:e.name.localeCompare(t.name))},currentIcons(){const e=(this.currentPage-1)*this.iconsPerPage,t=e+this.iconsPerPage;return this.sortedIcons.slice(e,t)}},methods:{async fetchIcons(e){try{const{data:t}=await C.get("/api/cms-media",{params:{dir:e}});this.icons=(t==null?void 0:t.data)||[],this.token=t==null?void 0:t.token}catch(t){console.error("Error fetching icons:",t)}},async addDir(){var e,t;if(!this.newDirName.trim()){this.$notify({type:"error",title:"Помилка",message:"Назва папки не може бути порожньою."});return}try{const r=await C.post(`/api/cms-media/${this.token}`,{name:this.newDirName});this.$notify({type:"success",title:"Успіх!",message:`Папку "${this.newDirName}" успішно створено.`}),this.fetchIcons(this.currentDir),this.handeAddFolderClose(),this.newDirName=""}catch(r){console.error("Error creating directory:",r),this.$notify({type:"error",title:"Помилка",message:((t=(e=r.response)==null?void 0:e.data)==null?void 0:t.message)||"Не вдалося створити папку."})}},handeAddFolderClose(){this.isAddDirModalOpen=!1},navigateToDir(e){const t=`${this.currentDir}/${e}`.replace(/\/+/g,"/");this.updateURL(t)},updatePath(e){this.updateURL(e)},updateURL(e){this.$router.push({query:{...this.$route.query,dir:e,page:this.currentPage}})},async handleFileChange(e){const t=e.target.files[0];if(!t)return;const r=new FormData;r.append("file",t);try{const n=await C.post(`/api/cms-media/${this.token}`,r,{headers:{"Content-Type":"multipart/form-data"}});this.$notify({type:"success",title:"Успіх!",message:"Файл успішно додано!"}),this.currentPage=1}catch(n){console.error("Error uploading file:",n),this.$notify({type:"error",title:"Помилка",message:n.response.statustext||n.message||n})}finally{await this.fetchIcons(this.currentDir)}},clearSearch(){this.searchQuery=""},copyToClipboard(e){try{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,e.length);const r=document.execCommand("copy");document.body.removeChild(t),r?this.$notify({type:"success",title:"Скопійовано!",message:"Назву іконки успішно скопійовано."}):this.$notify({type:"error",title:"Помилка",message:"Не вдалося скопіювати шлях."})}catch(t){this.$notify({type:"error",title:"Помилка",message:"Не вдалося скопіювати координати"}),console.error("Copy failed",t)}}},watch:{currentDir:{immediate:!0,handler(e){this.fetchIcons(e)}},currentTab:{handler(){this.currentPage=1}},currentPage(e){this.$emit("update-url",{query:{...this.$route.query,page:e}})}},async mounted(){await this.fetchIcons(this.currentDir)}},gf={class:"w-full p-[20px] bg-gray-100 flex justify-center h-[calc(100vh-60px)]"},wf={class:"p-[20px] w-full max-w-[1640px]"},xf={class:"flex items-start justify-between"},kf={class:"flex gap-2 relative"},bf={class:"flex items-center justify-between bg-white py-2 px-3 rounded-lg border border-gray-300 focus:outline-none focus:border-blue-500 text-sm w-[250px]"},Sf={class:"flex items-center gap-[12px]"},Ef={for:"file-upload",class:"py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 cursor-pointer"},Df={key:0,class:"flex flex-col items-center justify-center h-64 bg-gray-50 rounded-lg border text-center"},Nf={key:1},Of={class:"grid grid-cols-2 lg:grid-cols-5 gap-3 xl:gap-5"},Cf=["onClick"],Mf={class:"relative group"},Tf={class:"w-full h-36 sm:h-[170px] object-cover rounded-t-xl flex items-center justify-center"},Vf={key:0,class:"text-[#54aeff]"},Rf=["src","alt"],Bf={class:"p-3 flex items-center gap-x-3 border-t"},Pf={key:0,class:"flex shrink-0 justify-center items-center w-10 h-10 bg-white border border-solid text-gray-500 rounded-lg"},$f=["title"],Yf=["onClick"],Af={class:"block truncate text-xs text-gray-500"},Ff={class:"p-4"},vf={class:"flex justify-end"};function Lf(e,t,r,n,s,a){var f;const i=o.resolveComponent("Breadcrumb"),l=o.resolveComponent("IconSearch"),d=o.resolveComponent("IconClose"),c=o.resolveComponent("IconFolder2"),u=o.resolveComponent("VsNotData"),m=o.resolveComponent("IconFolder"),w=o.resolveComponent("IconImage"),k=o.resolveComponent("VsPagination"),g=o.resolveComponent("VsText"),_=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock("div",gf,[o.createElementVNode("div",wf,[o.createElementVNode("div",null,[o.createElementVNode("div",xf,[o.createVNode(i,{initialPath:a.currentDir,onUpdatePath:a.updatePath},null,8,["initialPath","onUpdatePath"]),o.createElementVNode("div",kf,[o.createElementVNode("div",bf,[o.createElementVNode("div",Sf,[o.createVNode(l),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=p=>s.searchQuery=p),type:"text",placeholder:"Пошук за назвою...",class:"focus:outline-none"},null,512),[[o.vModelText,s.searchQuery]])]),s.searchQuery?(o.openBlock(),o.createBlock(d,{key:0,class:"w-4 h-4 cursor-pointer",onClick:a.clearSearch},null,8,["onClick"])):o.createCommentVNode("",!0)]),o.createElementVNode("button",{ref:"dropdownButton",onClick:t[1]||(t[1]=p=>s.isAddDirModalOpen=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium border border-gray-300 rounded-lg text-gray-800 hover:bg-gray-100 bg-white"},[o.createVNode(c),t[7]||(t[7]=o.createTextVNode(" Додати папку "))],512),o.createElementVNode("label",Ef,[t[8]||(t[8]=o.createTextVNode(" Завантажити ")),o.createElementVNode("input",{id:"file-upload",type:"file",class:"hidden",onChange:t[2]||(t[2]=(...p)=>a.handleFileChange&&a.handleFileChange(...p))},null,32)])])]),(f=a.filteredIcons)!=null&&f.length?(o.openBlock(),o.createElementBlock("div",Nf,[o.createElementVNode("div",Of,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.currentIcons,p=>{var b;return o.openBlock(),o.createElementBlock("div",{key:p==null?void 0:p.id,class:o.normalizeClass(["flex flex-col bg-white border rounded-xl",{"cursor-pointer hover:border-blue-500":p.type==="dir","cursor-default":p.type!=="dir"}]),onClick:y=>p.type==="dir"?a.navigateToDir(p.name):null},[o.createElementVNode("div",Mf,[o.createElementVNode("div",Tf,[(p==null?void 0:p.type)==="dir"?(o.openBlock(),o.createElementBlock("div",Vf,[o.createVNode(m)])):(o.openBlock(),o.createElementBlock("img",{key:1,class:"object-contain max-h-[40px]",src:`/api/cms-media/${p==null?void 0:p.token}`,alt:p==null?void 0:p.name,style:o.normalizeStyle((b=p==null?void 0:p.path)!=null&&b.includes(".svg")?"width:250px;max-height:100px":"")},null,12,Rf))])]),o.createElementVNode("div",Bf,[p.type!=="dir"?(o.openBlock(),o.createElementBlock("span",Pf,[o.createVNode(w)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"grow truncate",title:p==null?void 0:p.name},[o.createElementVNode("p",{class:o.normalizeClass(["block truncate text-sm font-semibold text-gray-800",{"cursor-pointer":p.type!=="dir"}]),onClick:o.withModifiers(y=>p.type!=="dir"&&a.copyToClipboard(p==null?void 0:p.name),["stop"])},o.toDisplayString(p==null?void 0:p.name),11,Yf),o.createElementVNode("p",Af,o.toDisplayString(p==null?void 0:p.size),1)],8,$f)])],10,Cf)}),128))]),a.filteredIcons.length>s.iconsPerPage?(o.openBlock(),o.createBlock(k,{key:0,defaultPage:s.currentPage,class:"mt-6 focus-visible:outline-blue-500 flex !justify-center",total:a.filteredIcons.length,pageSize:s.iconsPerPage,maxPages:3,goTo:!1,onPageChange:t[3]||(t[3]=p=>s.currentPage=p)},null,8,["defaultPage","total","pageSize"])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",Df,[o.createVNode(u,{text:"",class:"![&>div]:min-w-[100px] !w-auto"})]))]),o.createVNode(_,{visible:s.isAddDirModalOpen,"onUpdate:visible":t[6]||(t[6]=p=>s.isAddDirModalOpen=p),title:"Додати папку",size:"small",closeClickBack:!0,onOnClose:a.handeAddFolderClose},{default:o.withCtx(()=>[o.createElementVNode("div",Ff,[o.createVNode(g,{modelValue:s.newDirName,"onUpdate:modelValue":t[4]||(t[4]=p=>s.newDirName=p),placeholder:"Назва нової папки.."},null,8,["modelValue"]),o.createElementVNode("div",vf,[o.createElementVNode("button",{onClick:t[5]||(t[5]=(...p)=>a.addDir&&a.addDir(...p)),class:"mt-4 py-2 px-4 text-white bg-blue-600 hover:bg-blue-700 rounded-lg"}," Створити ")])])]),_:1},8,["visible","onOnClose"])])])}const Uf=I(_f,[["render",Lf]]),If={class:"w-full bg-white p-[20px] rounded-lg mt-[20px] border"},jf={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},Wf={class:"sticky top-[0px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},Hf={class:"divide-y divide-gray-200 dark:divide-neutral-700"},zf=["onClick"],qf={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},Gf={__name:"vs-manager-collection-list",props:{list:Object},setup(e){const t=[{ua:"Назва",name:"name",format:"Text"},{ua:"Опис",name:"description",format:"Text"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(r,n)=>{var s;return o.openBlock(),o.createElementBlock("div",If,[(s=e.list)!=null&&s.length?(o.openBlock(),o.createElementBlock("table",jf,[o.createElementVNode("thead",Wf,[o.createElementVNode("tr",null,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,(a,i)=>o.createElementVNode("th",{key:i,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},o.toDisplayString(a==null?void 0:a.ua),1)),64))])]),o.createElementVNode("tbody",Hf,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.list,a=>(o.openBlock(),o.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:i=>r.$router.push(`/manager-collection/${a==null?void 0:a.template}`)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,i=>{var l;return o.createElementVNode("td",qf,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(gs)[(l=i==null?void 0:i.format)==null?void 0:l.toLowerCase()]||"div"),{value:a==null?void 0:a[i==null?void 0:i.name]},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a==null?void 0:a[i==null?void 0:i.name]),1)]),_:2},1032,["value"]))])}),64))],8,zf))),256))])])):(o.openBlock(),o.createBlock(ze,{key:1}))])}}},Zf={class:"flex gap-2 w-full items-center justify-between"},Jf=["checked","onChange"],Kf={__name:"vs-permissions-checkbox",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=["view","add","edit","del"],n=e,s=t,a=(i,l)=>{let d=[...n.modelValue];l?d.includes(i)||d.push(i):d=d.filter(c=>c!==i),s("update:modelValue",d)};return(i,l)=>(o.openBlock(),o.createElementBlock("div",Zf,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,d=>{var c,u,m;return o.createElementVNode("div",{class:"w-[120px] flex items-center justify-center",key:d},[o.createElementVNode("label",{class:o.normalizeClass(["flex h-[20px] w-[20px] items-center justify-center border text-white rounded cursor-pointer",{"bg-blue-500 border-blue-500":(c=e.modelValue)==null?void 0:c.includes(d)}])},[o.createElementVNode("input",{type:"checkbox",class:"hidden",checked:(u=e.modelValue)==null?void 0:u.includes(d),onChange:w=>a(d,w.target.checked)},null,40,Jf),(m=e.modelValue)!=null&&m.includes(d)?(o.openBlock(),o.createBlock(ys,{key:0})):o.createCommentVNode("",!0)],2)])}),64))]))}},Qf={class:"flex items-center gap-2 mb-2"},Xf={class:"w-full flex flex-col gap-2"},eh={class:"flex gap-2 items-center w-full p-3 md:gap-x-6"},th={class:"flex justify-between w-full"},rh={class:"text-xs font-medium text-start w-[80px]"},nh={class:"flex gap-2 items-center w-full p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5"},sh={class:"font-semibold text-gray-800 dark:text-neutral-200 w-full max-w-[300px]"},oh={class:"flex justify-between w-full"},ah=["onClick"],ih={class:"flex flex-col gap-2 p-3"},lh={class:"w-full max-w-[300px]"},ch={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},dh={__name:"vs-premissions-component",props:{permissions:{},permissionsModifiers:{}},emits:["update:permissions"],setup(e){const t=o.ref(""),r=o.useModel(e,"permissions"),n=u=>o.computed(()=>{var w;const m=(w=r.value)==null?void 0:w.find(k=>(k==null?void 0:k.user_id)===u);return(m==null?void 0:m.actions)||[]}),s=(u,m)=>{r.value||(r.value=[]);const w=r.value.findIndex(k=>(k==null?void 0:k.user_id)===u);w===-1?r.value.push({user_id:u,actions:m}):r.value[w].actions=m},a=(u,m)=>{const w=i.value[u];if(!w)return;const k=[...r.value||[]],g=w.every(_=>{var p;const f=k.find(b=>(b==null?void 0:b.user_id)===(_==null?void 0:_.user_id));return(p=f==null?void 0:f.actions)==null?void 0:p.includes(m)});w.forEach(_=>{const f=k.findIndex(b=>(b==null?void 0:b.user_id)===(_==null?void 0:_.user_id));let p=[];if(f!==-1&&(p=[...k[f].actions]),g){const b=p.indexOf(m);b>-1&&p.splice(b,1)}else p.includes(m)||p.push(m);f===-1?k.push({user_id:_.user_id,actions:p}):k[f].actions=p}),r.value=k},i=o.computed(()=>{if(!r.value)return{};const u={};return r.value.forEach(m=>{const w=m==null?void 0:m.content_type_id;w&&(u[w]||(u[w]=[]),u[w].push({user_id:m.user_id,subject:m.subject,content_type_id:w,actions:m.actions||[]}))}),u}),l=()=>{},d=()=>{var u;(u=r.value)==null||u.forEach(m=>{m.actions=[]}),t.value=""},c=o.computed(()=>{const u=t.value.toLowerCase().trim();if(!u)return i.value;const m={};return Object.entries(i.value).forEach(([w,k])=>{const g=k.filter(_=>[_==null?void 0:_.subject,_==null?void 0:_.content_type_id,w].filter(Boolean).join(" ").toLowerCase().includes(u));g.length>0&&(m[w]=g)}),m});return(u,m)=>(o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("div",Qf,[o.withDirectives(o.createElementVNode("input",{type:"text",placeholder:"Пошук за назвою",class:"w-full h-[36px] border focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring rounded-md px-2","onUpdate:modelValue":m[0]||(m[0]=w=>t.value=w),onInput:l},null,544),[[o.vModelText,t.value]]),o.createElementVNode("button",{class:"text-sm border h-[36px] rounded-md px-2 hover:bg-gray-100 transition-all duration-300",onClick:d}," Скинути ")]),o.createElementVNode("div",Xf,[o.createElementVNode("div",eh,[m[1]||(m[1]=o.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200 w-full max-w-[300px]"}," Групи ",-1)),o.createElementVNode("div",th,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["Перегляд","Додавання","Редагування","Видалення"],w=>o.createElementVNode("p",rh,o.toDisplayString(w),1)),64))])]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,(w,k)=>(o.openBlock(),o.createElementBlock("div",{key:k},[o.createElementVNode("div",nh,[o.createElementVNode("h3",sh,o.toDisplayString(k),1),o.createElementVNode("div",oh,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["view","add","edit","del"],g=>o.createElementVNode("button",{key:g,class:"text-xs font-medium text-blue-600 text-start w-[80px] decoration-2 hover:underline focus:outline-none focus:underline",onClick:_=>a(k,g)}," Вибрати всі ",8,ah)),64))])]),o.createElementVNode("div",ih,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(w,g=>(o.openBlock(),o.createElementBlock("div",{key:g.id,class:"flex gap-2 items-center w-full"},[o.createElementVNode("div",lh,[o.createElementVNode("p",ch,o.toDisplayString(g==null?void 0:g.subject),1)]),o.createVNode(Kf,{"model-value":n(g==null?void 0:g.user_id).value,"onUpdate:modelValue":_=>s(g==null?void 0:g.user_id,_),"item-id":g==null?void 0:g.user_id},null,8,["model-value","onUpdate:modelValue","item-id"])]))),128))])]))),128))])]))}},uh={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},fh={class:"w-full max-w-[1440px]"},hh={class:"mt-4 bg-white rounded-lg p-4 border"},mh={__name:"vs-permissions",setup(e){const t=o.getCurrentInstance().proxy.$notify,r=o.ref([]);(async()=>{try{const{data:a}=await C.get("/api/site-permissions/1");r.value=a==null?void 0:a.permissions}catch{}})();const s=async()=>{try{await C.post("/api/site-permissions/1",{permissions:r.value}),t({title:"Успішно",message:"Права збережено",type:"success"})}catch{t({title:"Помилка",text:"Помилка при збереженні прав",type:"error"})}};return(a,i)=>{var l;return o.openBlock(),o.createElementBlock("section",uh,[o.createElementVNode("div",fh,[o.createElementVNode("div",{class:"flex items-center justify-between mt-4"},[i[1]||(i[1]=o.createElementVNode("h1",{class:"text-xl font-bold"},"Permissions",-1)),o.createElementVNode("button",{onClick:s,class:"p-2 bg-blue-500 text-white rounded-md"}," Зберегти ")]),o.createElementVNode("div",hh,[(l=r.value)!=null&&l.length?(o.openBlock(),o.createBlock(dh,{key:0,permissions:r.value,"onUpdate:permissions":i[0]||(i[0]=d=>r.value=d)},null,8,["permissions"])):o.createCommentVNode("",!0)])])])}}},ph={class:"ml-5"},yh={key:0,class:"ml-1"},_h=I({__name:"vs-menu-tree-node",props:{item:{type:Object,required:!0}},emits:["item-dropped"],setup(e,{emit:t}){const r=e,n=t,s=o.ref(!1),a=o.ref(!1),i=o.ref(!1),l=o.computed(()=>r.item.children&&r.item.children.length>0),d=()=>{l.value&&(s.value=!s.value)},c=f=>{i.value=!0,f.dataTransfer.setData("application/json",JSON.stringify({id:r.item.id,title:r.item.title,url:r.item.url,children:r.item.children||[]})),f.dataTransfer.effectAllowed="move"},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},m=f=>{a.value=!1,i.value=!1;try{const p=JSON.parse(f.dataTransfer.getData("application/json"));p.id!==r.item.id&&n("item-dropped",{draggedItemId:p.id,targetItemId:r.item.id,draggedItemData:p})}catch(p){console.error("Error parsing drag data:",p)}},w=f=>{a.value=!0},k=f=>{a.value=!1},g=()=>{a.value=!1,i.value=!1},_=f=>{n("item-dropped",f)};return(f,p)=>{const b=o.resolveComponent("vs-menu-tree-node",!0);return o.openBlock(),o.createElementBlock("div",ph,[o.createElementVNode("div",{class:o.normalizeClass(["draggable-item w-full",{"drag-over":a.value,dragging:i.value}]),draggable:"true",onDragstart:c,onDragover:o.withModifiers(u,["prevent"]),onDrop:o.withModifiers(m,["prevent"]),onDragenter:o.withModifiers(w,["prevent"]),onDragleave:o.withModifiers(k,["prevent"]),onDragend:g},[o.createElementVNode("button",{onClick:d,class:"text-inherit flex items-center gap-1 w-full hover:text-blue-600 p-1 px-3 rounded-lg hover:bg-gray-100"},[o.createTextVNode(o.toDisplayString(e.item.title)+" ",1),l.value?(o.openBlock(),o.createBlock(ws,{key:0,class:o.normalizeClass(["h-[8px] w-[8px] text-gray-500",{"rotate-90":s.value}])},null,8,["class"])):o.createCommentVNode("",!0)])],34),l.value&&s.value?(o.openBlock(),o.createElementBlock("div",yh,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.item.children,y=>(o.openBlock(),o.createBlock(b,{key:y.id,item:y,onItemDropped:_},null,8,["item"]))),128))])):o.createCommentVNode("",!0)])}}},[["__scopeId","data-v-eefd185d"]]),gh={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},wh=I({__name:"vs-menu-tree-component",setup(e){const t=o.ref(!1),r=o.ref(!1),n=o.ref(),s=o.ref([{id:1,title:"Главная",url:"/",children:[]},{id:2,title:"Блог",url:"/blog",children:[{id:3,title:"Последние посты",url:"/blog/latest",children:[{id:4,title:"Новости",url:"/blog/latest/news",children:[]},{id:5,title:"Статьи",url:"/blog/latest/articles",children:[{id:6,title:"Технологии",url:"/blog/latest/articles/tech",children:[]},{id:7,title:"Бизнес",url:"/blog/latest/articles/business",children:[]}]}]},{id:8,title:"Архив",url:"/blog/archive",children:[]}]},{id:9,title:"О нас",url:"/about",children:[{id:10,title:"Команда",url:"/about/team",children:[]},{id:11,title:"Контакты",url:"/about/contacts",children:[{id:12,title:"Офисы",url:"/about/contacts/offices",children:[]},{id:13,title:"Поддержка",url:"/about/contacts/support",children:[]}]}]},{id:14,title:"Услуги",url:"/services",children:[{id:15,title:"Веб-разработка",url:"/services/web",children:[]},{id:16,title:"Мобильные приложения",url:"/services/mobile",children:[]}]}]),a=o.computed(()=>({id:{type:"Text",validators:["required"],label:"ID"},title:{type:"Text",validators:["required"],label:"Назва"},url:{type:"Text",validators:["required"],label:"URL"},parentId:{type:"Select",label:"Родитель",options:i(s.value)}})),i=_=>{const f=[];return _.forEach(p=>{var b;f.push({text:p.title,id:p.id}),p!=null&&p.children&&((b=p==null?void 0:p.children)==null?void 0:b.length)>0&&f.push(...i(p.children))}),f},l=(_,f,p=null)=>{for(let b=0;b<_.length;b++){if(_[b].id===f)return{item:_[b],parent:p,index:b};if(_[b].children&&_[b].children.length>0){const y=l(_[b].children,f,_[b]);if(y)return y}}return null},d=({draggedItemId:_,targetItemId:f,draggedItemData:p})=>{if(_===f)return;const b=l(s.value,_),y=l(s.value,f);if(!b||!y)return;const{parent:P,index:$}=b,{item:H}=y;if(P&&P.id===f)return;const U=(Ue,bs)=>Ue.id===bs?!0:Ue.children?Ue.children.some(Sh=>U(Sh,bs)):!1;if(U(p,f))return;const Le={id:p.id,title:p.title,url:p.url,children:p.children||[]};P?P.children.splice($,1):s.value.splice($,1),H.children||(H.children=[]),H.children.push(Le)},c=(_,f)=>{for(const p of _){if(p.id===f)return p;if(p.children&&p.children.length>0){const b=c(p.children,f);if(b)return b}}return null},u=async()=>{const _={id:String(Math.random()),title:n.value.title,url:n.value.url,children:[]};if(n.value.parentId){const f=c(s.value,n.value.parentId);f&&f.children.push(_)}else s.value.push(_);t.value=!1,n.value={}},m=_=>{_.preventDefault(),_.dataTransfer.dropEffect="move"},w=_=>{r.value=!1;try{const f=JSON.parse(_.dataTransfer.getData("application/json")),p=l(s.value,f.id);if(!p)return;const{parent:b,index:y}=p,P={id:f.id,title:f.title,url:f.url,children:f.children||[]};b?b.children.splice(y,1):s.value.splice(y,1),s.value.push(P)}catch(f){console.error("Error parsing drag data:",f)}},k=_=>{r.value=!0},g=_=>{r.value=!1};return(_,f)=>{const p=o.resolveComponent("VsForm"),b=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("div",{class:o.normalizeClass(["p-2 rounded-lg border border-dashed border-gray-200 mb-1",{"root-drag-over":r.value}]),onDragover:o.withModifiers(m,["prevent"]),onDrop:o.withModifiers(w,["prevent"]),onDragenter:o.withModifiers(k,["prevent"]),onDragleave:o.withModifiers(g,["prevent"])},f[4]||(f[4]=[o.createElementVNode("div",{class:"text-center text-gray-500 min-w-[300px]"}," Перемістити в корінь ",-1)]),34),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(y,P)=>(o.openBlock(),o.createBlock(_h,{key:y.id,item:y,onItemDropped:d},null,8,["item"]))),128)),o.createElementVNode("button",{class:"px-3 text-blue-500 hover:text-blue-700 duration-300 hover:underline hover:underline-2",onClick:f[0]||(f[0]=y=>t.value=!0)}," Добавить "),o.createVNode(b,{visible:t.value,"onUpdate:visible":f[3]||(f[3]=y=>t.value=y),title:"Додати елемент меню"},{footer:o.withCtx(()=>[o.createElementVNode("div",gh,[o.createElementVNode("button",{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",onClick:f[2]||(f[2]=y=>t.value=!1)}," Скасувати"),o.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:u}," Зберегти ")])]),default:o.withCtx(()=>[o.createVNode(p,{scheme:a.value,modelValue:n.value,"onUpdate:modelValue":f[1]||(f[1]=y=>n.value=y)},null,8,["scheme","modelValue"])]),_:1},8,["visible"])])}}},[["__scopeId","data-v-84b80de2"]]),xh={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},kh={class:"p-[20px] w-full max-w-[1440px]"},bh={class:"w-full bg-white rounded-lg p-[20px] border mt-[20px]"},xs={"vs-builder":Pa,"vs-builder-content":fa,"vs-manager-single":Ia,"vs-manager-single-content":Tu,"vs-manager-collection":Za,"vs-manager-collection-list":Gf,"vs-manager-collection-content":gu,"vs-manager-collection-item-content":Eu,"vs-media":Uf,"vs-permissions":mh,"vs-menu-tree":{__name:"vs-menu-tree",setup(e){return(t,r)=>(o.openBlock(),o.createElementBlock("section",xh,[o.createElementVNode("div",kh,[r[0]||(r[0]=o.createElementVNode("h1",null,"Дерево меню",-1)),o.createElementVNode("div",bh,[o.createVNode(wh)])])]))}}},ks={install:e=>{var t;(t=Object.entries(xs))==null||t.forEach(([r,n])=>e.component(r,n))},components:xs};return typeof window<"u"&&(window.v3Cms=ks),ks});
|
|
15
|
+
var Sr;function E(){return Sr.apply(null,arguments)}function ni(e){Sr=e}function ne(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function De(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function en(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(R(e,t))return!1;return!0}function G(e){return e===void 0}function ue(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function qe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Nr(e,t){var n=[],r,o=e.length;for(r=0;r<o;++r)n.push(t(e[r],r));return n}function xe(e,t){for(var n in t)R(t,n)&&(e[n]=t[n]);return R(t,"toString")&&(e.toString=t.toString),R(t,"valueOf")&&(e.valueOf=t.valueOf),e}function ie(e,t,n,r){return Xr(e,t,n,r,!0).utc()}function ri(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function M(e){return e._pf==null&&(e._pf=ri()),e._pf}var tn;Array.prototype.some?tn=Array.prototype.some:tn=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function nn(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=M(e),n=tn.call(t.parsedDateParts,function(o){return o!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function _t(e){var t=ie(NaN);return e!=null?xe(M(t),e):M(t).userInvalidated=!0,t}var Dr=E.momentProperties=[],rn=!1;function sn(e,t){var n,r,o,a=Dr.length;if(G(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),G(t._i)||(e._i=t._i),G(t._f)||(e._f=t._f),G(t._l)||(e._l=t._l),G(t._strict)||(e._strict=t._strict),G(t._tzm)||(e._tzm=t._tzm),G(t._isUTC)||(e._isUTC=t._isUTC),G(t._offset)||(e._offset=t._offset),G(t._pf)||(e._pf=M(t)),G(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=Dr[n],o=t[r],G(o)||(e[r]=o);return e}function Ge(e){sn(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),rn===!1&&(rn=!0,E.updateOffset(this),rn=!1)}function re(e){return e instanceof Ge||e!=null&&e._isAMomentObject!=null}function Vr(e){E.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Z(e,t){var n=!0;return xe(function(){if(E.deprecationHandler!=null&&E.deprecationHandler(null,e),n){var r=[],o,a,i,l=arguments.length;for(a=0;a<l;a++){if(o="",typeof arguments[a]=="object"){o+=`
|
|
16
|
+
[`+a+"] ";for(i in arguments[0])R(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[a];r.push(o)}Vr(e+`
|
|
17
|
+
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
18
|
+
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Or={};function Mr(e,t){E.deprecationHandler!=null&&E.deprecationHandler(e,t),Or[e]||(Vr(t),Or[e]=!0)}E.suppressDeprecationWarnings=!1,E.deprecationHandler=null;function le(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function si(e){var t,n;for(n in e)R(e,n)&&(t=e[n],le(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function on(e,t){var n=xe({},e),r;for(r in t)R(t,r)&&(De(e[r])&&De(t[r])?(n[r]={},xe(n[r],e[r]),xe(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)R(e,r)&&!R(t,r)&&De(e[r])&&(n[r]=xe({},n[r]));return n}function an(e){e!=null&&this.set(e)}var ln;Object.keys?ln=Object.keys:ln=function(e){var t,n=[];for(t in e)R(e,t)&&n.push(t);return n};var oi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ai(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return le(r)?r.call(t,n):r}function ce(e,t,n){var r=""+Math.abs(e),o=t-r.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var cn=/(\[[^\[]*\])|(\\)?([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,wt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,dn={},$e={};function N(e,t,n,r){var o=r;typeof r=="string"&&(o=function(){return this[r]()}),e&&($e[e]=o),t&&($e[t[0]]=function(){return ce(o.apply(this,arguments),t[1],t[2])}),n&&($e[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function ii(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function li(e){var t=e.match(cn),n,r;for(n=0,r=t.length;n<r;n++)$e[t[n]]?t[n]=$e[t[n]]:t[n]=ii(t[n]);return function(o){var a="",i;for(i=0;i<r;i++)a+=le(t[i])?t[i].call(o,e):t[i];return a}}function xt(e,t){return e.isValid()?(t=Cr(t,e.localeData()),dn[t]=dn[t]||li(t),dn[t](e)):e.localeData().invalidDate()}function Cr(e,t){var n=5;function r(o){return t.longDateFormat(o)||o}for(wt.lastIndex=0;n>=0&&wt.test(e);)e=e.replace(wt,r),wt.lastIndex=0,n-=1;return e}var ci={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 di(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(cn).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var ui="Invalid date";function fi(){return this._invalidDate}var hi="%d",mi=/\d{1,2}/;function pi(e){return this._ordinal.replace("%d",e)}var yi={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 gi(e,t,n,r){var o=this._relativeTime[n];return le(o)?o(e,t,n,r):o.replace(/%d/i,e)}function _i(e,t){var n=this._relativeTime[e>0?"future":"past"];return le(n)?n(t):n.replace(/%s/i,t)}var Tr={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 K(e){return typeof e=="string"?Tr[e]||Tr[e.toLowerCase()]:void 0}function un(e){var t={},n,r;for(r in e)R(e,r)&&(n=K(r),n&&(t[n]=e[r]));return t}var wi={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 xi(e){var t=[],n;for(n in e)R(e,n)&&t.push({unit:n,priority:wi[n]});return t.sort(function(r,o){return r.priority-o.priority}),t}var Br=/\d/,J=/\d\d/,$r=/\d{3}/,fn=/\d{4}/,kt=/[+-]?\d{6}/,A=/\d\d?/,Rr=/\d\d\d\d?/,Fr=/\d\d\d\d\d\d?/,bt=/\d{1,3}/,hn=/\d{1,4}/,Et=/[+-]?\d{1,6}/,Re=/\d+/,St=/[+-]?\d+/,ki=/Z|[+-]\d\d:?\d\d/gi,Nt=/Z|[+-]\d\d(?::?\d\d)?/gi,bi=/[+-]?\d+(\.\d{1,3})?/,Je=/[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,Fe=/^[1-9]\d?/,mn=/^([1-9]\d|\d)/,Dt;Dt={};function S(e,t,n){Dt[e]=le(t)?t:function(r,o){return r&&n?n:t}}function Ei(e,t){return R(Dt,e)?Dt[e](t._strict,t._locale):new RegExp(Si(e))}function Si(e){return fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,o,a){return n||r||o||a}))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function X(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function T(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=X(t)),n}var pn={};function Y(e,t){var n,r=t,o;for(typeof e=="string"&&(e=[e]),ue(t)&&(r=function(a,i){i[t]=T(a)}),o=e.length,n=0;n<o;n++)pn[e[n]]=r}function Ze(e,t){Y(e,function(n,r,o,a){o._w=o._w||{},t(n,o._w,o,a)})}function Ni(e,t,n){t!=null&&R(pn,e)&&pn[e](t,n._a,n,e)}function Vt(e){return e%4===0&&e%100!==0||e%400===0}var H=0,he=1,de=2,I=3,se=4,me=5,Ve=6,Di=7,Vi=8;N("Y",0,0,function(){var e=this.year();return e<=9999?ce(e,4):"+"+e}),N(0,["YY",2],0,function(){return this.year()%100}),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),S("Y",St),S("YY",A,J),S("YYYY",hn,fn),S("YYYYY",Et,kt),S("YYYYYY",Et,kt),Y(["YYYYY","YYYYYY"],H),Y("YYYY",function(e,t){t[H]=e.length===2?E.parseTwoDigitYear(e):T(e)}),Y("YY",function(e,t){t[H]=E.parseTwoDigitYear(e)}),Y("Y",function(e,t){t[H]=parseInt(e,10)});function Ke(e){return Vt(e)?366:365}E.parseTwoDigitYear=function(e){return T(e)+(T(e)>68?1900:2e3)};var Yr=Ye("FullYear",!0);function Oi(){return Vt(this.year())}function Ye(e,t){return function(n){return n!=null?(Pr(this,e,n),E.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Pr(e,t,n){var r,o,a,i,l;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,i=e.month(),l=e.date(),l=l===29&&i===1&&!Vt(a)?28:l,o?r.setUTCFullYear(a,i,l):r.setFullYear(a,i,l)}}function Mi(e){return e=K(e),le(this[e])?this[e]():this}function Ci(e,t){if(typeof e=="object"){e=un(e);var n=xi(e),r,o=n.length;for(r=0;r<o;r++)this[n[r].unit](e[n[r].unit])}else if(e=K(e),le(this[e]))return this[e](t);return this}function Ti(e,t){return(e%t+t)%t}var U;Array.prototype.indexOf?U=Array.prototype.indexOf:U=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function yn(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Ti(t,12);return e+=(t-n)/12,n===1?Vt(e)?29:28:31-n%7%2}N("M",["MM",2],"Mo",function(){return this.month()+1}),N("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),N("MMMM",0,0,function(e){return this.localeData().months(this,e)}),S("M",A,Fe),S("MM",A,J),S("MMM",function(e,t){return t.monthsShortRegex(e)}),S("MMMM",function(e,t){return t.monthsRegex(e)}),Y(["M","MM"],function(e,t){t[he]=T(e)-1}),Y(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);o!=null?t[he]=o:M(n).invalidMonth=e});var Bi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ar="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),vr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$i=Je,Ri=Je;function Fi(e,t){return e?ne(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||vr).test(t)?"format":"standalone"][e.month()]:ne(this._months)?this._months:this._months.standalone}function Yi(e,t){return e?ne(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[vr.test(t)?"format":"standalone"][e.month()]:ne(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Pi(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=ie([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?t==="MMM"?(o=U.call(this._shortMonthsParse,i),o!==-1?o:null):(o=U.call(this._longMonthsParse,i),o!==-1?o:null):t==="MMM"?(o=U.call(this._shortMonthsParse,i),o!==-1?o:(o=U.call(this._longMonthsParse,i),o!==-1?o:null)):(o=U.call(this._longMonthsParse,i),o!==-1?o:(o=U.call(this._shortMonthsParse,i),o!==-1?o:null))}function Ai(e,t,n){var r,o,a;if(this._monthsParseExact)return Pi.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=ie([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function Lr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=T(t);else if(t=e.localeData().monthsParse(t),!ue(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,yn(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Ur(e){return e!=null?(Lr(this,e),E.updateOffset(this,!0),this):Xe(this,"Month")}function vi(){return yn(this.year(),this.month())}function Li(e){return this._monthsParseExact?(R(this,"_monthsRegex")||Ir.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(R(this,"_monthsShortRegex")||(this._monthsShortRegex=$i),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ui(e){return this._monthsParseExact?(R(this,"_monthsRegex")||Ir.call(this),e?this._monthsStrictRegex:this._monthsRegex):(R(this,"_monthsRegex")||(this._monthsRegex=Ri),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Ir(){function e(c,d){return d.length-c.length}var t=[],n=[],r=[],o,a,i,l;for(o=0;o<12;o++)a=ie([2e3,o]),i=fe(this.monthsShort(a,"")),l=fe(this.months(a,"")),t.push(i),n.push(l),r.push(l),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ii(e,t,n,r,o,a,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,o,a,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,o,a,i),l}function Qe(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ot(e,t,n){var r=7+t-n,o=(7+Qe(e,0,r).getUTCDay()-t)%7;return-o+r-1}function jr(e,t,n,r,o){var a=(7+n-r)%7,i=Ot(e,r,o),l=1+7*(t-1)+a+i,c,d;return l<=0?(c=e-1,d=Ke(c)+l):l>Ke(e)?(c=e+1,d=l-Ke(e)):(c=e,d=l),{year:c,dayOfYear:d}}function et(e,t,n){var r=Ot(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1,a,i;return o<1?(i=e.year()-1,a=o+pe(i,t,n)):o>pe(e.year(),t,n)?(a=o-pe(e.year(),t,n),i=e.year()+1):(i=e.year(),a=o),{week:a,year:i}}function pe(e,t,n){var r=Ot(e,t,n),o=Ot(e+1,t,n);return(Ke(e)-r+o)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),S("w",A,Fe),S("ww",A,J),S("W",A,Fe),S("WW",A,J),Ze(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=T(e)});function ji(e){return et(e,this._week.dow,this._week.doy).week}var Wi={dow:0,doy:6};function Hi(){return this._week.dow}function zi(){return this._week.doy}function qi(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Gi(e){var t=et(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}N("d",0,"do","day"),N("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),N("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),N("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),S("d",A),S("e",A),S("E",A),S("dd",function(e,t){return t.weekdaysMinRegex(e)}),S("ddd",function(e,t){return t.weekdaysShortRegex(e)}),S("dddd",function(e,t){return t.weekdaysRegex(e)}),Ze(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);o!=null?t.d=o:M(n).invalidWeekday=e}),Ze(["d","e","E"],function(e,t,n,r){t[r]=T(e)});function Ji(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Zi(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function gn(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Ki="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Wr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qi=Je,el=Je,tl=Je;function nl(e,t){var n=ne(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?gn(n,this._week.dow):e?n[e.day()]:n}function rl(e){return e===!0?gn(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function sl(e){return e===!0?gn(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ol(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=ie([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(o=U.call(this._weekdaysParse,i),o!==-1?o:null):t==="ddd"?(o=U.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=U.call(this._minWeekdaysParse,i),o!==-1?o:null):t==="dddd"?(o=U.call(this._weekdaysParse,i),o!==-1||(o=U.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=U.call(this._minWeekdaysParse,i),o!==-1?o:null)):t==="ddd"?(o=U.call(this._shortWeekdaysParse,i),o!==-1||(o=U.call(this._weekdaysParse,i),o!==-1)?o:(o=U.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=U.call(this._minWeekdaysParse,i),o!==-1||(o=U.call(this._weekdaysParse,i),o!==-1)?o:(o=U.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function al(e,t,n){var r,o,a;if(this._weekdaysParseExact)return ol.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=ie([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function il(e){if(!this.isValid())return e!=null?this:NaN;var t=Xe(this,"Day");return e!=null?(e=Ji(e,this.localeData()),this.add(e-t,"d")):t}function ll(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function cl(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Zi(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function dl(e){return this._weekdaysParseExact?(R(this,"_weekdaysRegex")||_n.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(R(this,"_weekdaysRegex")||(this._weekdaysRegex=Qi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ul(e){return this._weekdaysParseExact?(R(this,"_weekdaysRegex")||_n.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(R(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=el),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function fl(e){return this._weekdaysParseExact?(R(this,"_weekdaysRegex")||_n.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(R(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tl),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function _n(){function e(u,f){return f.length-u.length}var t=[],n=[],r=[],o=[],a,i,l,c,d;for(a=0;a<7;a++)i=ie([2e3,1]).day(a),l=fe(this.weekdaysMin(i,"")),c=fe(this.weekdaysShort(i,"")),d=fe(this.weekdays(i,"")),t.push(l),n.push(c),r.push(d),o.push(l),o.push(c),o.push(d);t.sort(e),n.sort(e),r.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function wn(){return this.hours()%12||12}function hl(){return this.hours()||24}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,wn),N("k",["kk",2],0,hl),N("hmm",0,0,function(){return""+wn.apply(this)+ce(this.minutes(),2)}),N("hmmss",0,0,function(){return""+wn.apply(this)+ce(this.minutes(),2)+ce(this.seconds(),2)}),N("Hmm",0,0,function(){return""+this.hours()+ce(this.minutes(),2)}),N("Hmmss",0,0,function(){return""+this.hours()+ce(this.minutes(),2)+ce(this.seconds(),2)});function Hr(e,t){N(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Hr("a",!0),Hr("A",!1);function zr(e,t){return t._meridiemParse}S("a",zr),S("A",zr),S("H",A,mn),S("h",A,Fe),S("k",A,Fe),S("HH",A,J),S("hh",A,J),S("kk",A,J),S("hmm",Rr),S("hmmss",Fr),S("Hmm",Rr),S("Hmmss",Fr),Y(["H","HH"],I),Y(["k","kk"],function(e,t,n){var r=T(e);t[I]=r===24?0:r}),Y(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),Y(["h","hh"],function(e,t,n){t[I]=T(e),M(n).bigHour=!0}),Y("hmm",function(e,t,n){var r=e.length-2;t[I]=T(e.substr(0,r)),t[se]=T(e.substr(r)),M(n).bigHour=!0}),Y("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[I]=T(e.substr(0,r)),t[se]=T(e.substr(r,2)),t[me]=T(e.substr(o)),M(n).bigHour=!0}),Y("Hmm",function(e,t,n){var r=e.length-2;t[I]=T(e.substr(0,r)),t[se]=T(e.substr(r))}),Y("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[I]=T(e.substr(0,r)),t[se]=T(e.substr(r,2)),t[me]=T(e.substr(o))});function ml(e){return(e+"").toLowerCase().charAt(0)==="p"}var pl=/[ap]\.?m?\.?/i,yl=Ye("Hours",!0);function gl(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var qr={calendar:oi,longDateFormat:ci,invalidDate:ui,ordinal:hi,dayOfMonthOrdinalParse:mi,relativeTime:yi,months:Bi,monthsShort:Ar,week:Wi,weekdays:Ki,weekdaysMin:Xi,weekdaysShort:Wr,meridiemParse:pl},L={},tt={},nt;function _l(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Gr(e){return e&&e.toLowerCase().replace("_","-")}function wl(e){for(var t=0,n,r,o,a;t<e.length;){for(a=Gr(e[t]).split("-"),n=a.length,r=Gr(e[t+1]),r=r?r.split("-"):null;n>0;){if(o=Mt(a.slice(0,n).join("-")),o)return o;if(r&&r.length>=n&&_l(a,r)>=n-1)break;n--}t++}return nt}function xl(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Mt(e){var t=null,n;if(L[e]===void 0&&typeof module<"u"&&module&&module.exports&&xl(e))try{t=nt._abbr,n=require,n("./locale/"+e),ke(t)}catch{L[e]=null}return L[e]}function ke(e,t){var n;return e&&(G(t)?n=ye(e):n=xn(e,t),n?nt=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function xn(e,t){if(t!==null){var n,r=qr;if(t.abbr=e,L[e]!=null)Mr("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."),r=L[e]._config;else if(t.parentLocale!=null)if(L[t.parentLocale]!=null)r=L[t.parentLocale]._config;else if(n=Mt(t.parentLocale),n!=null)r=n._config;else return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;return L[e]=new an(on(r,t)),tt[e]&&tt[e].forEach(function(o){xn(o.name,o.config)}),ke(e),L[e]}else return delete L[e],null}function kl(e,t){if(t!=null){var n,r,o=qr;L[e]!=null&&L[e].parentLocale!=null?L[e].set(on(L[e]._config,t)):(r=Mt(e),r!=null&&(o=r._config),t=on(o,t),r==null&&(t.abbr=e),n=new an(t),n.parentLocale=L[e],L[e]=n),ke(e)}else L[e]!=null&&(L[e].parentLocale!=null?(L[e]=L[e].parentLocale,e===ke()&&ke(e)):L[e]!=null&&delete L[e]);return L[e]}function ye(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!ne(e)){if(t=Mt(e),t)return t;e=[e]}return wl(e)}function bl(){return ln(L)}function kn(e){var t,n=e._a;return n&&M(e).overflow===-2&&(t=n[he]<0||n[he]>11?he:n[de]<1||n[de]>yn(n[H],n[he])?de:n[I]<0||n[I]>24||n[I]===24&&(n[se]!==0||n[me]!==0||n[Ve]!==0)?I:n[se]<0||n[se]>59?se:n[me]<0||n[me]>59?me:n[Ve]<0||n[Ve]>999?Ve:-1,M(e)._overflowDayOfYear&&(t<H||t>de)&&(t=de),M(e)._overflowWeeks&&t===-1&&(t=Di),M(e)._overflowWeekday&&t===-1&&(t=Vi),M(e).overflow=t),e}var El=/^\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)?)?$/,Sl=/^\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)?)?$/,Nl=/Z|[+-]\d\d(?::?\d\d)?/,Ct=[["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]],bn=[["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/]],Dl=/^\/?Date\((-?\d+)/i,Vl=/^(?:(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}))$/,Ol={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 Jr(e){var t,n,r=e._i,o=El.exec(r)||Sl.exec(r),a,i,l,c,d=Ct.length,u=bn.length;if(o){for(M(e).iso=!0,t=0,n=d;t<n;t++)if(Ct[t][1].exec(o[1])){i=Ct[t][0],a=Ct[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(o[3]){for(t=0,n=u;t<n;t++)if(bn[t][1].exec(o[3])){l=(o[2]||" ")+bn[t][0];break}if(l==null){e._isValid=!1;return}}if(!a&&l!=null){e._isValid=!1;return}if(o[4])if(Nl.exec(o[4]))c="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(c||""),Sn(e)}else e._isValid=!1}function Ml(e,t,n,r,o,a){var i=[Cl(e),Ar.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return a&&i.push(parseInt(a,10)),i}function Cl(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Tl(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Bl(e,t,n){if(e){var r=Wr.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(r!==o)return M(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function $l(e,t,n){if(e)return Ol[e];if(t)return 0;var r=parseInt(n,10),o=r%100,a=(r-o)/100;return a*60+o}function Zr(e){var t=Vl.exec(Tl(e._i)),n;if(t){if(n=Ml(t[4],t[3],t[2],t[5],t[6],t[7]),!Bl(t[1],n,e))return;e._a=n,e._tzm=$l(t[8],t[9],t[10]),e._d=Qe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),M(e).rfc2822=!0}else e._isValid=!1}function Rl(e){var t=Dl.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Jr(e),e._isValid===!1)delete e._isValid;else return;if(Zr(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:E.createFromInputFallback(e)}E.createFromInputFallback=Z("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(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Pe(e,t,n){return e??t??n}function Fl(e){var t=new Date(E.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function En(e){var t,n,r=[],o,a,i;if(!e._d){for(o=Fl(e),e._w&&e._a[de]==null&&e._a[he]==null&&Yl(e),e._dayOfYear!=null&&(i=Pe(e._a[H],o[H]),(e._dayOfYear>Ke(i)||e._dayOfYear===0)&&(M(e)._overflowDayOfYear=!0),n=Qe(i,0,e._dayOfYear),e._a[he]=n.getUTCMonth(),e._a[de]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=o[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[I]===24&&e._a[se]===0&&e._a[me]===0&&e._a[Ve]===0&&(e._nextDay=!0,e._a[I]=0),e._d=(e._useUTC?Qe:Ii).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[I]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(M(e).weekdayMismatch=!0)}}function Yl(e){var t,n,r,o,a,i,l,c,d;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,i=4,n=Pe(t.GG,e._a[H],et(v(),1,4).year),r=Pe(t.W,1),o=Pe(t.E,1),(o<1||o>7)&&(c=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,d=et(v(),a,i),n=Pe(t.gg,e._a[H],d.year),r=Pe(t.w,d.week),t.d!=null?(o=t.d,(o<0||o>6)&&(c=!0)):t.e!=null?(o=t.e+a,(t.e<0||t.e>6)&&(c=!0)):o=a),r<1||r>pe(n,a,i)?M(e)._overflowWeeks=!0:c!=null?M(e)._overflowWeekday=!0:(l=jr(n,r,o,a,i),e._a[H]=l.year,e._dayOfYear=l.dayOfYear)}E.ISO_8601=function(){},E.RFC_2822=function(){};function Sn(e){if(e._f===E.ISO_8601){Jr(e);return}if(e._f===E.RFC_2822){Zr(e);return}e._a=[],M(e).empty=!0;var t=""+e._i,n,r,o,a,i,l=t.length,c=0,d,u;for(o=Cr(e._f,e._locale).match(cn)||[],u=o.length,n=0;n<u;n++)a=o[n],r=(t.match(Ei(a,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&M(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),$e[a]?(r?M(e).empty=!1:M(e).unusedTokens.push(a),Ni(a,r,e)):e._strict&&!r&&M(e).unusedTokens.push(a);M(e).charsLeftOver=l-c,t.length>0&&M(e).unusedInput.push(t),e._a[I]<=12&&M(e).bigHour===!0&&e._a[I]>0&&(M(e).bigHour=void 0),M(e).parsedDateParts=e._a.slice(0),M(e).meridiem=e._meridiem,e._a[I]=Pl(e._locale,e._a[I],e._meridiem),d=M(e).era,d!==null&&(e._a[H]=e._locale.erasConvertYear(d,e._a[H])),En(e),kn(e)}function Pl(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Al(e){var t,n,r,o,a,i,l=!1,c=e._f.length;if(c===0){M(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<c;o++)a=0,i=!1,t=sn({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],Sn(t),nn(t)&&(i=!0),a+=M(t).charsLeftOver,a+=M(t).unusedTokens.length*10,M(t).score=a,l?a<r&&(r=a,n=t):(r==null||a<r||i)&&(r=a,n=t,i&&(l=!0));xe(e,n||t)}function vl(e){if(!e._d){var t=un(e._i),n=t.day===void 0?t.date:t.day;e._a=Nr([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),En(e)}}function Ll(e){var t=new Ge(kn(Kr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Kr(e){var t=e._i,n=e._f;return e._locale=e._locale||ye(e._l),t===null||n===void 0&&t===""?_t({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),re(t)?new Ge(kn(t)):(qe(t)?e._d=t:ne(n)?Al(e):n?Sn(e):Ul(e),nn(e)||(e._d=null),e))}function Ul(e){var t=e._i;G(t)?e._d=new Date(E.now()):qe(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Rl(e):ne(t)?(e._a=Nr(t.slice(0),function(n){return parseInt(n,10)}),En(e)):De(t)?vl(e):ue(t)?e._d=new Date(t):E.createFromInputFallback(e)}function Xr(e,t,n,r,o){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(De(e)&&en(e)||ne(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=o,a._l=n,a._i=e,a._f=t,a._strict=r,Ll(a)}function v(e,t,n,r){return Xr(e,t,n,r,!1)}var Il=Z("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=v.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_t()}),jl=Z("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=v.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_t()});function Qr(e,t){var n,r;if(t.length===1&&ne(t[0])&&(t=t[0]),!t.length)return v();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Wl(){var e=[].slice.call(arguments,0);return Qr("isBefore",e)}function Hl(){var e=[].slice.call(arguments,0);return Qr("isAfter",e)}var zl=function(){return Date.now?Date.now():+new Date},rt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ql(e){var t,n=!1,r,o=rt.length;for(t in e)if(R(e,t)&&!(U.call(rt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<o;++r)if(e[rt[r]]){if(n)return!1;parseFloat(e[rt[r]])!==T(e[rt[r]])&&(n=!0)}return!0}function Gl(){return this._isValid}function Jl(){return oe(NaN)}function Tt(e){var t=un(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,d=t.second||0,u=t.millisecond||0;this._isValid=ql(t),this._milliseconds=+u+d*1e3+c*6e4+l*1e3*60*60,this._days=+i+a*7,this._months=+o+r*3+n*12,this._data={},this._locale=ye(),this._bubble()}function Bt(e){return e instanceof Tt}function Nn(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Zl(e,t,n){var r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0,i;for(i=0;i<r;i++)T(e[i])!==T(t[i])&&a++;return a+o}function es(e,t){N(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+ce(~~(n/60),2)+t+ce(~~n%60,2)})}es("Z",":"),es("ZZ",""),S("Z",Nt),S("ZZ",Nt),Y(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Dn(Nt,e)});var Kl=/([\+\-]|\d\d)/gi;function Dn(e,t){var n=(t||"").match(e),r,o,a;return n===null?null:(r=n[n.length-1]||[],o=(r+"").match(Kl)||["-",0,0],a=+(o[1]*60)+T(o[2]),a===0?0:o[0]==="+"?a:-a)}function Vn(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(re(e)||qe(e)?e.valueOf():v(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),E.updateOffset(n,!1),n):v(e).local()}function On(e){return-Math.round(e._d.getTimezoneOffset())}E.updateOffset=function(){};function Xl(e,t,n){var r=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Dn(Nt,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(o=On(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),r!==e&&(!t||this._changeInProgress?ss(this,oe(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,E.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:On(this)}function Ql(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ec(e){return this.utcOffset(0,e)}function tc(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(On(this),"m")),this}function nc(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Dn(ki,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function rc(e){return this.isValid()?(e=e?v(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function sc(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function oc(){if(!G(this._isDSTShifted))return this._isDSTShifted;var e={},t;return sn(e,this),e=Kr(e),e._a?(t=e._isUTC?ie(e._a):v(e._a),this._isDSTShifted=this.isValid()&&Zl(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ac(){return this.isValid()?!this._isUTC:!1}function ic(){return this.isValid()?this._isUTC:!1}function ts(){return this.isValid()?this._isUTC&&this._offset===0:!1}var lc=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,cc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function oe(e,t){var n=e,r=null,o,a,i;return Bt(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:ue(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=lc.exec(e))?(o=r[1]==="-"?-1:1,n={y:0,d:T(r[de])*o,h:T(r[I])*o,m:T(r[se])*o,s:T(r[me])*o,ms:T(Nn(r[Ve]*1e3))*o}):(r=cc.exec(e))?(o=r[1]==="-"?-1:1,n={y:Oe(r[2],o),M:Oe(r[3],o),w:Oe(r[4],o),d:Oe(r[5],o),h:Oe(r[6],o),m:Oe(r[7],o),s:Oe(r[8],o)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=dc(v(n.from),v(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),a=new Tt(n),Bt(e)&&R(e,"_locale")&&(a._locale=e._locale),Bt(e)&&R(e,"_isValid")&&(a._isValid=e._isValid),a}oe.fn=Tt.prototype,oe.invalid=Jl;function Oe(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function ns(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function dc(e,t){var n;return e.isValid()&&t.isValid()?(t=Vn(t,e),e.isBefore(t)?n=ns(e,t):(n=ns(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function rs(e,t){return function(n,r){var o,a;return r!==null&&!isNaN(+r)&&(Mr(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),o=oe(n,r),ss(this,o,e),this}}function ss(e,t,n,r){var o=t._milliseconds,a=Nn(t._days),i=Nn(t._months);e.isValid()&&(r=r??!0,i&&Lr(e,Xe(e,"Month")+i*n),a&&Pr(e,"Date",Xe(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&E.updateOffset(e,a||i))}var uc=rs(1,"add"),fc=rs(-1,"subtract");function os(e){return typeof e=="string"||e instanceof String}function hc(e){return re(e)||qe(e)||os(e)||ue(e)||pc(e)||mc(e)||e===null||e===void 0}function mc(e){var t=De(e)&&!en(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,a,i=r.length;for(o=0;o<i;o+=1)a=r[o],n=n||R(e,a);return t&&n}function pc(e){var t=ne(e),n=!1;return t&&(n=e.filter(function(r){return!ue(r)&&os(e)}).length===0),t&&n}function yc(e){var t=De(e)&&!en(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,a;for(o=0;o<r.length;o+=1)a=r[o],n=n||R(e,a);return t&&n}function gc(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function _c(e,t){arguments.length===1&&(arguments[0]?hc(arguments[0])?(e=arguments[0],t=void 0):yc(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||v(),r=Vn(n,this).startOf("day"),o=E.calendarFormat(this,r)||"sameElse",a=t&&(le(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,v(n)))}function wc(){return new Ge(this)}function xc(e,t){var n=re(e)?e:v(e);return this.isValid()&&n.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function kc(e,t){var n=re(e)?e:v(e);return this.isValid()&&n.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function bc(e,t,n,r){var o=re(e)?e:v(e),a=re(t)?t:v(t);return this.isValid()&&o.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(o,n):!this.isBefore(o,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Ec(e,t){var n=re(e)?e:v(e),r;return this.isValid()&&n.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Sc(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Nc(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Dc(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(r=Vn(e,this),!r.isValid())return NaN;switch(o=(r.utcOffset()-this.utcOffset())*6e4,t=K(t),t){case"year":a=$t(this,r)/12;break;case"month":a=$t(this,r);break;case"quarter":a=$t(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:X(a)}function $t(e,t){if(e.date()<t.date())return-$t(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),o,a;return t-r<0?(o=e.clone().add(n-1,"months"),a=(t-r)/(r-o)):(o=e.clone().add(n+1,"months"),a=(t-r)/(o-r)),-(n+a)||0}E.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",E.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Vc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Oc(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?xt(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):le(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",xt(n,"Z")):xt(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Mc(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,o,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+o+a)}function Cc(e){e||(e=this.isUtc()?E.defaultFormatUtc:E.defaultFormat);var t=xt(this,e);return this.localeData().postformat(t)}function Tc(e,t){return this.isValid()&&(re(e)&&e.isValid()||v(e).isValid())?oe({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Bc(e){return this.from(v(),e)}function $c(e,t){return this.isValid()&&(re(e)&&e.isValid()||v(e).isValid())?oe({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Rc(e){return this.to(v(),e)}function as(e){var t;return e===void 0?this._locale._abbr:(t=ye(e),t!=null&&(this._locale=t),this)}var is=Z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function ls(){return this._locale}var Rt=1e3,Ae=60*Rt,Ft=60*Ae,cs=(365*400+97)*24*Ft;function ve(e,t){return(e%t+t)%t}function ds(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-cs:new Date(e,t,n).valueOf()}function us(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-cs:Date.UTC(e,t,n)}function Fc(e){var t,n;if(e=K(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?us:ds,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ve(t+(this._isUTC?0:this.utcOffset()*Ae),Ft);break;case"minute":t=this._d.valueOf(),t-=ve(t,Ae);break;case"second":t=this._d.valueOf(),t-=ve(t,Rt);break}return this._d.setTime(t),E.updateOffset(this,!0),this}function Yc(e){var t,n;if(e=K(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?us:ds,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ft-ve(t+(this._isUTC?0:this.utcOffset()*Ae),Ft)-1;break;case"minute":t=this._d.valueOf(),t+=Ae-ve(t,Ae)-1;break;case"second":t=this._d.valueOf(),t+=Rt-ve(t,Rt)-1;break}return this._d.setTime(t),E.updateOffset(this,!0),this}function Pc(){return this._d.valueOf()-(this._offset||0)*6e4}function Ac(){return Math.floor(this.valueOf()/1e3)}function vc(){return new Date(this.valueOf())}function Lc(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Uc(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ic(){return this.isValid()?this.toISOString():null}function jc(){return nn(this)}function Wc(){return xe({},M(this))}function Hc(){return M(this).overflow}function zc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),S("N",Mn),S("NN",Mn),S("NNN",Mn),S("NNNN",rd),S("NNNNN",sd),Y(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?M(n).era=o:M(n).invalidEra=e}),S("y",Re),S("yy",Re),S("yyy",Re),S("yyyy",Re),S("yo",od),Y(["y","yy","yyy","yyyy"],H),Y(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[H]=n._locale.eraYearOrdinalParse(e,o):t[H]=parseInt(e,10)});function qc(e,t){var n,r,o,a=this._eras||ye("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":o=E(a[n].since).startOf("day"),a[n].since=o.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=E(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf();break}}return a}function Gc(e,t,n){var r,o,a=this.eras(),i,l,c;for(e=e.toUpperCase(),r=0,o=a.length;r<o;++r)if(i=a[r].name.toUpperCase(),l=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===e)return a[r];break;case"NNNN":if(i===e)return a[r];break;case"NNNNN":if(c===e)return a[r];break}else if([i,l,c].indexOf(e)>=0)return a[r]}function Jc(e,t){var n=e.since<=e.until?1:-1;return t===void 0?E(e.since).year():E(e.since).year()+(t-e.offset)*n}function Zc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function Kc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function Xc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function Qc(){var e,t,n,r,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,r=this.clone().startOf("day").valueOf(),o[e].since<=r&&r<=o[e].until||o[e].until<=r&&r<=o[e].since)return(this.year()-E(o[e].since).year())*n+o[e].offset;return this.year()}function ed(e){return R(this,"_erasNameRegex")||Cn.call(this),e?this._erasNameRegex:this._erasRegex}function td(e){return R(this,"_erasAbbrRegex")||Cn.call(this),e?this._erasAbbrRegex:this._erasRegex}function nd(e){return R(this,"_erasNarrowRegex")||Cn.call(this),e?this._erasNarrowRegex:this._erasRegex}function Mn(e,t){return t.erasAbbrRegex(e)}function rd(e,t){return t.erasNameRegex(e)}function sd(e,t){return t.erasNarrowRegex(e)}function od(e,t){return t._eraYearOrdinalRegex||Re}function Cn(){var e=[],t=[],n=[],r=[],o,a,i,l,c,d=this.eras();for(o=0,a=d.length;o<a;++o)i=fe(d[o].name),l=fe(d[o].abbr),c=fe(d[o].narrow),t.push(i),e.push(l),n.push(c),r.push(i),r.push(l),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}N(0,["gg",2],0,function(){return this.weekYear()%100}),N(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Yt(e,t){N(0,[e,e.length],0,t)}Yt("gggg","weekYear"),Yt("ggggg","weekYear"),Yt("GGGG","isoWeekYear"),Yt("GGGGG","isoWeekYear"),S("G",St),S("g",St),S("GG",A,J),S("gg",A,J),S("GGGG",hn,fn),S("gggg",hn,fn),S("GGGGG",Et,kt),S("ggggg",Et,kt),Ze(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=T(e)}),Ze(["gg","GG"],function(e,t,n,r){t[r]=E.parseTwoDigitYear(e)});function ad(e){return fs.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function id(e){return fs.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function ld(){return pe(this.year(),1,4)}function cd(){return pe(this.isoWeekYear(),1,4)}function dd(){var e=this.localeData()._week;return pe(this.year(),e.dow,e.doy)}function ud(){var e=this.localeData()._week;return pe(this.weekYear(),e.dow,e.doy)}function fs(e,t,n,r,o){var a;return e==null?et(this,r,o).year:(a=pe(e,r,o),t>a&&(t=a),fd.call(this,e,t,n,r,o))}function fd(e,t,n,r,o){var a=jr(e,t,n,r,o),i=Qe(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}N("Q",0,"Qo","quarter"),S("Q",Br),Y("Q",function(e,t){t[he]=(T(e)-1)*3});function hd(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}N("D",["DD",2],"Do","date"),S("D",A,Fe),S("DD",A,J),S("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Y(["D","DD"],de),Y("Do",function(e,t){t[de]=T(e.match(A)[0])});var hs=Ye("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),S("DDD",bt),S("DDDD",$r),Y(["DDD","DDDD"],function(e,t,n){n._dayOfYear=T(e)});function md(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}N("m",["mm",2],0,"minute"),S("m",A,mn),S("mm",A,J),Y(["m","mm"],se);var pd=Ye("Minutes",!1);N("s",["ss",2],0,"second"),S("s",A,mn),S("ss",A,J),Y(["s","ss"],me);var yd=Ye("Seconds",!1);N("S",0,0,function(){return~~(this.millisecond()/100)}),N(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,function(){return this.millisecond()*10}),N(0,["SSSSS",5],0,function(){return this.millisecond()*100}),N(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),N(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),N(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),N(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),S("S",bt,Br),S("SS",bt,J),S("SSS",bt,$r);var be,ms;for(be="SSSS";be.length<=9;be+="S")S(be,Re);function gd(e,t){t[Ve]=T(("0."+e)*1e3)}for(be="S";be.length<=9;be+="S")Y(be,gd);ms=Ye("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");function _d(){return this._isUTC?"UTC":""}function wd(){return this._isUTC?"Coordinated Universal Time":""}var x=Ge.prototype;x.add=uc,x.calendar=_c,x.clone=wc,x.diff=Dc,x.endOf=Yc,x.format=Cc,x.from=Tc,x.fromNow=Bc,x.to=$c,x.toNow=Rc,x.get=Mi,x.invalidAt=Hc,x.isAfter=xc,x.isBefore=kc,x.isBetween=bc,x.isSame=Ec,x.isSameOrAfter=Sc,x.isSameOrBefore=Nc,x.isValid=jc,x.lang=is,x.locale=as,x.localeData=ls,x.max=jl,x.min=Il,x.parsingFlags=Wc,x.set=Ci,x.startOf=Fc,x.subtract=fc,x.toArray=Lc,x.toObject=Uc,x.toDate=vc,x.toISOString=Oc,x.inspect=Mc,typeof Symbol<"u"&&Symbol.for!=null&&(x[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),x.toJSON=Ic,x.toString=Vc,x.unix=Ac,x.valueOf=Pc,x.creationData=zc,x.eraName=Zc,x.eraNarrow=Kc,x.eraAbbr=Xc,x.eraYear=Qc,x.year=Yr,x.isLeapYear=Oi,x.weekYear=ad,x.isoWeekYear=id,x.quarter=x.quarters=hd,x.month=Ur,x.daysInMonth=vi,x.week=x.weeks=qi,x.isoWeek=x.isoWeeks=Gi,x.weeksInYear=dd,x.weeksInWeekYear=ud,x.isoWeeksInYear=ld,x.isoWeeksInISOWeekYear=cd,x.date=hs,x.day=x.days=il,x.weekday=ll,x.isoWeekday=cl,x.dayOfYear=md,x.hour=x.hours=yl,x.minute=x.minutes=pd,x.second=x.seconds=yd,x.millisecond=x.milliseconds=ms,x.utcOffset=Xl,x.utc=ec,x.local=tc,x.parseZone=nc,x.hasAlignedHourOffset=rc,x.isDST=sc,x.isLocal=ac,x.isUtcOffset=ic,x.isUtc=ts,x.isUTC=ts,x.zoneAbbr=_d,x.zoneName=wd,x.dates=Z("dates accessor is deprecated. Use date instead.",hs),x.months=Z("months accessor is deprecated. Use month instead",Ur),x.years=Z("years accessor is deprecated. Use year instead",Yr),x.zone=Z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ql),x.isDSTShifted=Z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",oc);function xd(e){return v(e*1e3)}function kd(){return v.apply(null,arguments).parseZone()}function ps(e){return e}var F=an.prototype;F.calendar=ai,F.longDateFormat=di,F.invalidDate=fi,F.ordinal=pi,F.preparse=ps,F.postformat=ps,F.relativeTime=gi,F.pastFuture=_i,F.set=si,F.eras=qc,F.erasParse=Gc,F.erasConvertYear=Jc,F.erasAbbrRegex=td,F.erasNameRegex=ed,F.erasNarrowRegex=nd,F.months=Fi,F.monthsShort=Yi,F.monthsParse=Ai,F.monthsRegex=Ui,F.monthsShortRegex=Li,F.week=ji,F.firstDayOfYear=zi,F.firstDayOfWeek=Hi,F.weekdays=nl,F.weekdaysMin=sl,F.weekdaysShort=rl,F.weekdaysParse=al,F.weekdaysRegex=dl,F.weekdaysShortRegex=ul,F.weekdaysMinRegex=fl,F.isPM=ml,F.meridiem=gl;function Pt(e,t,n,r){var o=ye(),a=ie().set(r,t);return o[n](a,e)}function ys(e,t,n){if(ue(e)&&(t=e,e=void 0),e=e||"",t!=null)return Pt(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Pt(e,r,n,"month");return o}function Tn(e,t,n,r){typeof e=="boolean"?(ue(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,ue(t)&&(n=t,t=void 0),t=t||"");var o=ye(),a=e?o._week.dow:0,i,l=[];if(n!=null)return Pt(t,(n+a)%7,r,"day");for(i=0;i<7;i++)l[i]=Pt(t,(i+a)%7,r,"day");return l}function bd(e,t){return ys(e,t,"months")}function Ed(e,t){return ys(e,t,"monthsShort")}function Sd(e,t,n){return Tn(e,t,n,"weekdays")}function Nd(e,t,n){return Tn(e,t,n,"weekdaysShort")}function Dd(e,t,n){return Tn(e,t,n,"weekdaysMin")}ke("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(e){var t=e%10,n=T(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),E.lang=Z("moment.lang is deprecated. Use moment.locale instead.",ke),E.langData=Z("moment.langData is deprecated. Use moment.localeData instead.",ye);var ge=Math.abs;function Vd(){var e=this._data;return this._milliseconds=ge(this._milliseconds),this._days=ge(this._days),this._months=ge(this._months),e.milliseconds=ge(e.milliseconds),e.seconds=ge(e.seconds),e.minutes=ge(e.minutes),e.hours=ge(e.hours),e.months=ge(e.months),e.years=ge(e.years),this}function gs(e,t,n,r){var o=oe(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Od(e,t){return gs(this,e,t,1)}function Md(e,t){return gs(this,e,t,-1)}function _s(e){return e<0?Math.floor(e):Math.ceil(e)}function Cd(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,o,a,i,l,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=_s(Bn(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,o=X(e/1e3),r.seconds=o%60,a=X(o/60),r.minutes=a%60,i=X(a/60),r.hours=i%24,t+=X(i/24),c=X(ws(t)),n+=c,t-=_s(Bn(c)),l=X(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function ws(e){return e*4800/146097}function Bn(e){return e*146097/4800}function Td(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=K(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+ws(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Bn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function _e(e){return function(){return this.as(e)}}var xs=_e("ms"),Bd=_e("s"),$d=_e("m"),Rd=_e("h"),Fd=_e("d"),Yd=_e("w"),Pd=_e("M"),Ad=_e("Q"),vd=_e("y"),Ld=xs;function Ud(){return oe(this)}function Id(e){return e=K(e),this.isValid()?this[e+"s"]():NaN}function Me(e){return function(){return this.isValid()?this._data[e]:NaN}}var jd=Me("milliseconds"),Wd=Me("seconds"),Hd=Me("minutes"),zd=Me("hours"),qd=Me("days"),Gd=Me("months"),Jd=Me("years");function Zd(){return X(this.days()/7)}var we=Math.round,Le={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Kd(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function Xd(e,t,n,r){var o=oe(e).abs(),a=we(o.as("s")),i=we(o.as("m")),l=we(o.as("h")),c=we(o.as("d")),d=we(o.as("M")),u=we(o.as("w")),f=we(o.as("y")),_=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||l<=1&&["h"]||l<n.h&&["hh",l]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(_=_||u<=1&&["w"]||u<n.w&&["ww",u]),_=_||d<=1&&["M"]||d<n.M&&["MM",d]||f<=1&&["y"]||["yy",f],_[2]=t,_[3]=+e>0,_[4]=r,Kd.apply(null,_)}function Qd(e){return e===void 0?we:typeof e=="function"?(we=e,!0):!1}function eu(e,t){return Le[e]===void 0?!1:t===void 0?Le[e]:(Le[e]=t,e==="s"&&(Le.ss=t-1),!0)}function tu(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Le,o,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Le,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),o=this.localeData(),a=Xd(this,!n,r,o),n&&(a=o.pastFuture(+this,a)),o.postformat(a)}var $n=Math.abs;function Ue(e){return(e>0)-(e<0)||+e}function At(){if(!this.isValid())return this.localeData().invalidDate();var e=$n(this._milliseconds)/1e3,t=$n(this._days),n=$n(this._months),r,o,a,i,l=this.asSeconds(),c,d,u,f;return l?(r=X(e/60),o=X(r/60),e%=60,r%=60,a=X(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",d=Ue(this._months)!==Ue(l)?"-":"",u=Ue(this._days)!==Ue(l)?"-":"",f=Ue(this._milliseconds)!==Ue(l)?"-":"",c+"P"+(a?d+a+"Y":"")+(n?d+n+"M":"")+(t?u+t+"D":"")+(o||r||e?"T":"")+(o?f+o+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var B=Tt.prototype;B.isValid=Gl,B.abs=Vd,B.add=Od,B.subtract=Md,B.as=Td,B.asMilliseconds=xs,B.asSeconds=Bd,B.asMinutes=$d,B.asHours=Rd,B.asDays=Fd,B.asWeeks=Yd,B.asMonths=Pd,B.asQuarters=Ad,B.asYears=vd,B.valueOf=Ld,B._bubble=Cd,B.clone=Ud,B.get=Id,B.milliseconds=jd,B.seconds=Wd,B.minutes=Hd,B.hours=zd,B.days=qd,B.weeks=Zd,B.months=Gd,B.years=Jd,B.humanize=tu,B.toISOString=At,B.toString=At,B.toJSON=At,B.locale=as,B.localeData=ls,B.toIsoString=Z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",At),B.lang=is,N("X",0,0,"unix"),N("x",0,0,"valueOf"),S("x",St),S("X",bi),Y("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),Y("x",function(e,t,n){n._d=new Date(T(e))});//! moment.js
|
|
19
|
+
E.version="2.30.1",ni(v),E.fn=x,E.min=Wl,E.max=Hl,E.now=zl,E.utc=ie,E.unix=xd,E.months=bd,E.isDate=qe,E.locale=ke,E.invalid=_t,E.duration=oe,E.isMoment=re,E.weekdays=Sd,E.parseZone=kd,E.localeData=ye,E.isDuration=Bt,E.monthsShort=Ed,E.weekdaysMin=Dd,E.defineLocale=xn,E.updateLocale=kl,E.locales=bl,E.weekdaysShort=Nd,E.normalizeUnits=K,E.relativeTimeRounding=Qd,E.relativeTimeThreshold=eu,E.calendarFormat=gc,E.prototype=x,E.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 nu={class:"whitespace-nowrap"},ru={__name:"vs-manager-table-date",props:{value:{type:String,default:()=>""}},setup(e){const t=e,n=s.computed(()=>{if(!t.value)return"-";try{const r=E(t.value,"YYYY-MM-DD");return new Date(r).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return t.value}});return(r,o)=>(s.openBlock(),s.createElementBlock("div",nu,s.toDisplayString(n.value),1))}},su={},ou={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function au(e,t,n,r,o,a){return s.openBlock(),s.createElementBlock("svg",ou,t[0]||(t[0]=[s.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const ks=W(su,[["render",au]]),bs={__name:"vs-manager-table-switch",props:{value:{type:Boolean,default:()=>!1}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center disabled",[e.value?"bg-blue-400":"border"]])},[s.createVNode(ks,{height:"18",width:"18",class:"text-white"})],2))}},Es={switch:bs,switcher:bs,date:ru},iu={class:"w-full"},lu={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},cu={class:"sticky top-[0px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},du={class:"divide-y divide-gray-200 dark:divide-neutral-700"},uu=["onClick"],fu={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},hu={__name:"vs-manager-collection-table",props:{objectData:Object,template:String},setup(e){const t=[{ua:"Назва",name:"title",format:"Text"},{ua:"Шлях",name:"url",format:"Text"},{ua:"Чи увімкнений",name:"enabled",format:"Switch"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(n,r)=>{var o,a,i;return s.openBlock(),s.createElementBlock("div",iu,[(a=(o=e.objectData)==null?void 0:o.rows)!=null&&a.length?(s.openBlock(),s.createElementBlock("table",lu,[s.createElementVNode("thead",cu,[s.createElementVNode("tr",null,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(t,(l,c)=>s.createElementVNode("th",{key:c,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},s.toDisplayString(l==null?void 0:l.ua),1)),64))])]),s.createElementVNode("tbody",du,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList((i=e.objectData)==null?void 0:i.rows,l=>(s.openBlock(),s.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:c=>n.$router.push(`/manager-collection/${e.template}/${l==null?void 0:l.id}`)},[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(t,c=>{var d;return s.createElementVNode("td",fu,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(Es)[(d=c==null?void 0:c.format)==null?void 0:d.toLowerCase()]||"div"),{value:l==null?void 0:l[c==null?void 0:c.name]},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(l==null?void 0:l[c==null?void 0:c.name]),1)]),_:2},1032,["value"]))])}),64))],8,uu))),256))])])):(s.openBlock(),s.createBlock(gt,{key:1}))])}}},mu=e=>{const t={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return e.toLowerCase().split("").map(n=>t[n]||n).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim("-")},pu={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},yu={__name:"vs-manager-colection-table-add",props:{template:{type:String,default:()=>""}},emits:["update-list"],setup(e,{emit:t}){const n=s.getCurrentInstance().proxy.$notify,r=t,o=e,a=s.ref(!1),i=s.ref({}),l=s.ref(),c=async()=>{try{await l.value.doValidation(),i.value.url=mu(i.value.title),await C.post(`/api/cms-manager/${o.template}`,i.value),n({type:"success",title:"Успушно!",message:"Об'єкт створено успішно"}),i.value={},a.value=!1,r("update-list")}catch{n({type:"error",title:"Помилка!",message:"При спробі створити об'єкт сталася помилка"})}},d=[{key:"title",ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},{key:"body",ua:"Контент",type:"TextEditor",validators:["required"]},{ua:"Чи увімкнений",name:"enabled",type:"Switcher"}];return(u,f)=>{const _=s.resolveComponent("VsForm"),w=s.resolveComponent("VsDialog");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("button",{onClick:f[0]||(f[0]=m=>a.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити "),s.createVNode(w,{title:"Створити об'єкт",visible:a.value,"onUpdate:visible":f[3]||(f[3]=m=>a.value=m)},{footer:s.withCtx(()=>[s.createElementVNode("div",pu,[s.createElementVNode("button",{onClick:f[2]||(f[2]=m=>a.value=!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"}," Скасувати"),s.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:s.withCtx(()=>[s.createElementVNode("div",null,[s.createVNode(_,{ref_key:"form",ref:l,scheme:d,modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m)},null,8,["modelValue"])])]),_:1},8,["visible"])],64)}}},gu=(e,t=300)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}},_u={class:"bg-white rounded-xl p-[20px] border mt-[20px]"},wu={class:"mb-4 xl:mb-8"},xu={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},ku={class:"text-sm text-gray-500 dark:text-neutral-500"},bu={class:"flex items-center"},Eu={class:"flex justify-end ml-auto items-center"},Su={__name:"vs-manager-collection-content",props:{titles:{},titlesModifiers:{}},emits:["update:titles"],setup(e){const t=yt(),n=s.useModel(e,"titles"),r=s.computed(()=>{var l;return(l=t==null?void 0:t.params)==null?void 0:l.template}),o=s.ref(null),a=async(l=null)=>{var c;try{const{data:d}=await C.get(`/api/cms-manager/${r.value}`,{params:{search:l}});o.value=d,n.value.firstLevel=(c=d==null?void 0:d.type)==null?void 0:c.name}catch{}},i=gu(l=>a(l),300);return s.watch(r,a),s.onMounted(()=>a()),(l,c)=>{var d,u,f,_;return s.openBlock(),s.createElementBlock("div",_u,[s.createElementVNode("div",wu,[s.createElementVNode("h1",xu,s.toDisplayString((u=(d=o.value)==null?void 0:d.type)==null?void 0:u.name),1),s.createElementVNode("p",ku,s.toDisplayString((_=(f=o.value)==null?void 0:f.type)==null?void 0:_.description),1)]),s.createElementVNode("div",bu,[s.createElementVNode("input",{type:"text",onInput:c[0]||(c[0]=({target:w})=>s.unref(i)(w.value)),class:"py-2 px-4 block max-w-[400px] w-full bg-gray-100 border-transparent rounded-lg text-sm focus:outline-2 focus:outline-blue-500 h-[36px] mb-[1px]",placeholder:"Пошук за назвою"},null,32),s.createElementVNode("div",Eu,[s.createVNode(yu,{template:r.value,onUpdateList:a},null,8,["template"])])]),s.createVNode(hu,{objectData:o.value,template:r.value},null,8,["objectData","template"])])}}},Nu={class:"flex items-center justify-between"},Du={class:"mt-[10px]"},Vu={class:"font-medium text-2xl"},Ou={class:"text-gray-600"},Mu={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Cu={__name:"vs-manager-collection-item",props:{titles:{},titlesModifiers:{}},emits:["update:titles"],setup(e){const t=s.getCurrentInstance().proxy.$notify,n=yt(),r=na(),o=s.computed(()=>{var m;return(m=n==null?void 0:n.params)==null?void 0:m.template}),a=s.computed(()=>{var m;return(m=n==null?void 0:n.params)==null?void 0:m.id}),i=s.ref(null),l=s.ref({}),c=s.useModel(e,"titles"),d=s.ref(1),u=async()=>{var m,y,p,k,b;try{const{data:g}=await C.get(`/api/cms-manager/${o.value}/${a.value}`);i.value=(m=g==null?void 0:g.rows)==null?void 0:m[0],l.value=(y=g==null?void 0:g.rows)==null?void 0:y[0],d.value=d.value+1,c.value.secondLevel=(k=(p=g==null?void 0:g.rows)==null?void 0:p[0])==null?void 0:k.title,c.value.firstLevel=(b=g==null?void 0:g.type)==null?void 0:b.name}catch{}},f=async()=>{try{await C.put(`/api/cms-manager/${a.value}`,l.value),await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),u()}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},_=async()=>{try{await C.delete(`/api/cms-manager/${a.value}`),await t({type:"success",title:"Успішно!",message:"Об'єкт видалено успішно"}),await(r==null?void 0:r.back())}catch{await t({type:"error",title:"Помилка!",message:"При спробі видалити об'єкт виникла помилка"})}};s.watch(o,u),s.onMounted(()=>u());const w={title:{ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},body:{ua:"Контент",type:"TextEditor",validators:["required"]},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(m,y)=>{var k,b;const p=s.resolveComponent("VsForm");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",Nu,[s.createElementVNode("div",Du,[s.createElementVNode("h2",Vu,s.toDisplayString((k=i.value)==null?void 0:k.title),1),s.createElementVNode("p",Ou,s.toDisplayString((b=i.value)==null?void 0:b.description),1)]),s.createElementVNode("div",{class:"flex items-center gap-1"},[s.createElementVNode("button",{onClick:_,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-red-500 rounded-lg !border-gray-200 hover:bg-red-700 duration-300"}," Видалити "),s.createElementVNode("button",{onClick:f,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),s.createElementVNode("div",null,[s.createElementVNode("div",Mu,[(s.openBlock(),s.createBlock(p,{key:d.value,class:"w-full",scheme:w,modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=g=>l.value=g)},null,8,["modelValue"]))])])],64)}}},Tu={class:"flex items-center justify-between"},Bu={class:"mt-[10px]"},$u={class:"font-medium text-2xl"},Ru={class:"text-gray-600"},Fu={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Yu={__name:"vs-manager-single-content",setup(e){const t=yt(),n=s.computed(()=>{var d;return(d=t==null?void 0:t.params)==null?void 0:d.template}),r=s.ref(null),o=s.ref({}),a=s.ref(1),i=async()=>{var d,u;try{const{data:f}=await C.get(`/api/cms-manager/${n.value}`);r.value=(d=f==null?void 0:f.rows)==null?void 0:d[0],o.value=(u=f==null?void 0:f.rows)==null?void 0:u[0],a.value=a.value+1}catch{}},l=async()=>{var d;try{await C.put(`/api/cms-manager/${(d=r.value)==null?void 0:d.id}`,o.value),await $notify({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),i()}catch{await $notify({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};s.watch(n,i),s.onMounted(()=>i());const c={title:{ua:"Назва",type:"Text",placeholder:"Назва"},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(d,u)=>{var _,w;const f=s.resolveComponent("VsForm");return s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("button",{onClick:u[0]||(u[0]=m=>d.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[s.createVNode(kr,{template:n.value},null,8,["template"]),u[2]||(u[2]=s.createTextVNode(" Повернутися назад "))]),s.createElementVNode("div",Tu,[s.createElementVNode("div",Bu,[s.createElementVNode("h2",$u,s.toDisplayString((_=r.value)==null?void 0:_.title),1),s.createElementVNode("p",Ru,s.toDisplayString((w=r.value)==null?void 0:w.description),1)]),s.createElementVNode("div",{class:"flex items-center gap-1"},[s.createElementVNode("button",{onClick:l,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),s.createElementVNode("div",null,[s.createElementVNode("div",Fu,[(s.openBlock(),s.createBlock(f,{key:a.value,class:"w-full",scheme:c,modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=m=>o.value=m)},null,8,["modelValue"]))])])])}}},Pu={},Au={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function vu(e,t){return s.openBlock(),s.createElementBlock("svg",Au,t[0]||(t[0]=[s.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),s.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)]))}const Lu=W(Pu,[["render",vu]]),Uu={},Iu={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",class:"lucide lucide-chevron-right"};function ju(e,t){return s.openBlock(),s.createElementBlock("svg",Iu,t[0]||(t[0]=[s.createElementVNode("path",{d:"m9 18 6-6-6-6"},null,-1)]))}const Ss=W(Uu,[["render",ju]]),Wu={class:"flex items-center space-x-1 text-sm"},Hu=["onClick"],zu={__name:"MediaBreadcrumb",props:{currentPath:{type:Array,required:!0}},emits:["navigate"],setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("nav",Wu,[s.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 px-2",onClick:n[0]||(n[0]=r=>t.$emit("navigate",[]))},[s.createVNode(Lu,{class:"h-4 w-4"})]),e.currentPath.length>0?(s.openBlock(),s.createBlock(Ss,{key:0,class:"h-4 w-4 text-muted-foreground"})):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.currentPath,(r,o)=>(s.openBlock(),s.createElementBlock("div",{key:o,class:"flex items-center"},[s.createElementVNode("button",{class:s.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 px-2",{"font-semibold":o===e.currentPath.length-1}]),onClick:a=>t.$emit("navigate",e.currentPath.slice(0,o+1))},s.toDisplayString(r),11,Hu),o<e.currentPath.length-1?(s.openBlock(),s.createBlock(Ss,{key:0,class:"h-4 w-4 text-muted-foreground"})):s.createCommentVNode("",!0)]))),128))]))}},qu={},Gu={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",class:"lucide lucide-layout-grid h-4 w-4"};function Ju(e,t){return s.openBlock(),s.createElementBlock("svg",Gu,t[0]||(t[0]=[s.createElementVNode("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"},null,-1),s.createElementVNode("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"},null,-1),s.createElementVNode("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"},null,-1),s.createElementVNode("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"},null,-1)]))}const Zu=W(qu,[["render",Ju]]),Ku={},Xu={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",class:"lucide lucide-list"};function Qu(e,t){return s.openBlock(),s.createElementBlock("svg",Xu,t[0]||(t[0]=[s.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)]))}const ef=W(Ku,[["render",Qu]]),tf={},nf={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",class:"lucide lucide-plus"};function rf(e,t){return s.openBlock(),s.createElementBlock("svg",nf,t[0]||(t[0]=[s.createElementVNode("path",{d:"M5 12h14"},null,-1),s.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const Ns=W(tf,[["render",rf]]),sf={class:"flex items-center gap-2"},of={class:"border rounded-md inline-flex"},af={__name:"MediaViewControls",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue","create-folder","file-change"],setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",sf,[s.createElementVNode("div",of,[s.createElementVNode("button",{class:s.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground h-10 px-3",{"bg-gray-100":e.modelValue==="grid"}]),onClick:n[0]||(n[0]=r=>t.$emit("update:modelValue","grid")),"aria-label":"Grid view"},[s.createVNode(Zu,{class:"h-4 w-4"})],2),s.createElementVNode("button",{class:s.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground h-10 px-3",{"bg-gray-100":e.modelValue==="list"}]),onClick:n[1]||(n[1]=r=>t.$emit("update:modelValue","list")),"aria-label":"List view"},[s.createVNode(ef,{class:"h-4 w-4"})],2)]),s.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-3",onClick:n[2]||(n[2]=r=>t.$emit("create-folder"))},[s.createVNode(Ns,{class:"h-4 w-4 mr-2"}),n[5]||(n[5]=s.createTextVNode(" Нова папка "))]),s.createElementVNode("div",null,[s.createElementVNode("input",{type:"file",onChange:n[3]||(n[3]=r=>t.$emit("file-change",r)),ref:"fileInputRef",class:"hidden",multiple:""},null,544),s.createElementVNode("button",{class:"flex bg-black text-white px-3 py-1.5 rounded-md items-center gap-x-2",onClick:n[4]||(n[4]=r=>t.$refs.fileInputRef.click())},[s.createVNode(Ns,{class:"h-4 w-4 mr-2"}),n[6]||(n[6]=s.createTextVNode(" Завантажити "))])])]))}},lf={},cf={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function df(e,t){return s.openBlock(),s.createElementBlock("svg",cf,t[0]||(t[0]=[s.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),s.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const vt=W(lf,[["render",df]]);function Rn(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return Number.parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}function Fn(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}const uf={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4"},ff={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"},hf=["onClick"],mf={class:"flex flex-col items-center text-center"},pf={class:"h-16 w-16 flex items-center justify-center mb-2"},yf={key:0,class:"h-16 w-16 relative"},gf=["src","alt"],_f={class:"w-full truncate text-sm font-medium"},wf={key:0,class:"text-xs text-muted-foreground"},xf=["onClick"],kf={class:"text-sm"},bf={__name:"MediaGrid",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null}},emits:["file-click"],setup(e){return(t,n)=>{const r=s.resolveComponent("File");return s.openBlock(),s.createElementBlock("div",uf,[e.files.length===0?(s.openBlock(),s.createElementBlock("div",ff,[s.createVNode(r,{class:"h-12 w-12 mb-2"}),n[0]||(n[0]=s.createElementVNode("p",null,"Немає файлів у цій папці",-1))])):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.files,o=>{var a;return s.openBlock(),s.createElementBlock(s.Fragment,{key:o.id},[o.type==="file"?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["border rounded-lg p-3 h-[140px] cursor-pointer hover:bg-gray-100",{"bg-accent text-accent-foreground ring-2 ring-primary":((a=e.selectedFile)==null?void 0:a.id)===o.id}]),onClick:i=>t.$emit("file-click",o)},[s.createElementVNode("div",mf,[s.createElementVNode("div",pf,[(o==null?void 0:o.filetype)==="image"&&(o!=null&&o.filepath)?(s.openBlock(),s.createElementBlock("div",yf,[s.createElementVNode("img",{src:o==null?void 0:o.filepath,alt:(o==null?void 0:o.alt)||(o==null?void 0:o.filename),class:"h-full w-full object-cover rounded"},null,8,gf)])):(s.openBlock(),s.createBlock(r,{key:1,class:"h-12 w-12 text-gray-500"}))]),s.createElementVNode("div",_f,s.toDisplayString(o==null?void 0:o.filename),1),o.filesize?(s.openBlock(),s.createElementBlock("div",wf,s.toDisplayString(s.unref(Rn)(o.filesize)),1)):s.createCommentVNode("",!0)])],10,hf)):o.type==="dir"?(s.openBlock(),s.createElementBlock("div",{key:1,class:"border rounded-lg p-3 hover:bg-gray-100 h-[140px] cursor-pointer flex flex-col items-center justify-center",onClick:i=>t.$emit("file-click",o)},[s.createVNode(vt,{class:"h-12 w-12 text-blue-500"}),s.createElementVNode("span",kf,s.toDisplayString(o==null?void 0:o.name),1)],8,xf)):s.createCommentVNode("",!0)],64)}),128))])}}},Ef={},Sf={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Nf(e,t){return s.openBlock(),s.createElementBlock("svg",Sf,t[0]||(t[0]=[s.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),s.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const Ds=W(Ef,[["render",Nf]]),Df={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},Vf={key:1,class:"w-full caption-bottom text-sm"},Of={class:"[&_tr:last-child]:border-0"},Mf=["onClick"],Cf={class:"p-4 align-middle font-medium"},Tf={class:"flex items-center gap-2"},Bf={key:1,class:"h-8 w-8 relative"},$f=["src","alt"],Rf={class:"truncate max-w-[200px]"},Ff={class:"p-4 align-middle"},Yf={class:"p-4 align-middle"},Pf={class:"p-4 align-middle hidden md:table-cell"},Af={__name:"MediaList",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null}},emits:["file-click"],setup(e){return(t,n)=>{const r=s.resolveComponent("File");return s.openBlock(),s.createElementBlock("div",null,[e.files.length===0?(s.openBlock(),s.createElementBlock("div",Df,[s.createVNode(r,{class:"h-12 w-12 mb-2"}),n[0]||(n[0]=s.createElementVNode("p",null,"Немає файлів у цій папці",-1))])):(s.openBlock(),s.createElementBlock("table",Vf,[n[1]||(n[1]=s.createElementVNode("thead",{class:"[&_tr]:border-b"},[s.createElementVNode("tr",{class:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"},[s.createElementVNode("th",{class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]"}," Назва "),s.createElementVNode("th",{class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground"}," Тип "),s.createElementVNode("th",{class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground"}," Розмір "),s.createElementVNode("th",{class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground hidden md:table-cell"}," Змінено ")])],-1)),s.createElementVNode("tbody",Of,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.files,o=>{var a,i,l,c;return s.openBlock(),s.createElementBlock("tr",{key:o.id,class:s.normalizeClass(["border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted cursor-pointer",{"bg-accent":((a=e.selectedFile)==null?void 0:a.id)===o.id}]),onClick:d=>t.$emit("file-click",o)},[s.createElementVNode("td",Cf,[s.createElementVNode("div",Tf,[o.type==="dir"?(s.openBlock(),s.createBlock(vt,{key:0,class:"h-5 w-5 text-blue-500"})):(o==null?void 0:o.filetype)==="image"&&(o!=null&&o.filepath)?(s.openBlock(),s.createElementBlock("div",Bf,[s.createElementVNode("img",{src:o==null?void 0:o.filepath,alt:(o==null?void 0:o.alt)||(o==null?void 0:o.filename),class:"h-full w-full object-cover rounded"},null,8,$f)])):(o==null?void 0:o.filetype)==="image"?(s.openBlock(),s.createBlock(Ds,{key:2,class:"h-5 w-5 text-green-500"})):(s.openBlock(),s.createBlock(r,{key:3,class:"h-5 w-5 text-gray-500"})),s.createElementVNode("span",Rf,s.toDisplayString((o==null?void 0:o.filename)||(o==null?void 0:o.name)),1)])]),s.createElementVNode("td",Ff,s.toDisplayString((o==null?void 0:o.type)==="dir"?"Папка":((l=(i=o==null?void 0:o.filetype)==null?void 0:i.charAt(0))==null?void 0:l.toUpperCase())+((c=o==null?void 0:o.filetype)==null?void 0:c.slice(1))),1),s.createElementVNode("td",Yf,s.toDisplayString((o==null?void 0:o.type)==="dir"?"--":s.unref(Rn)(o==null?void 0:o.filesize)),1),s.createElementVNode("td",Pf,s.toDisplayString(o!=null&&o.updated_at?s.unref(Fn)(o==null?void 0:o.updated_at):"--"),1)],10,Mf)}),128))])]))])}}},vf={},Lf={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"};function Uf(e,t){return s.openBlock(),s.createElementBlock("svg",Lf,t[0]||(t[0]=[s.createStaticVNode('<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><line x1="10" y1="9" x2="8" y2="9"></line>',5)]))}const If=W(vf,[["render",Uf]]),jf={class:"rounded-lg border bg-card text-card-foreground shadow-sm"},Wf={class:"p-6 space-y-4"},Hf={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},zf={class:"flex justify-center mb-4"},qf={key:1,class:"h-48 w-full flex items-center justify-center"},Gf=["src","alt"],Jf={class:"font-semibold text-lg truncate"},Zf={class:"text-sm text-muted-foreground"},Kf={class:"space-y-2"},Xf={class:"flex items-center gap-2"},Qf={class:"text-sm ml-auto"},eh={class:"flex items-center gap-2"},th={class:"text-sm ml-auto"},nh={class:"flex items-center gap-2"},rh={class:"text-sm ml-auto"},sh={key:0,class:"flex items-start gap-2"},oh={class:"text-sm ml-auto text-right"},ah={key:1,class:"flex items-start gap-2"},ih={class:"text-sm ml-auto text-right"},lh={__name:"MediaFileInfo",props:{file:{type:Object,default:null}},setup(e){return(t,n)=>{var i,l,c,d,u,f,_,w,m,y,p,k,b,g,D,V,P,$,Q,ee;const r=s.resolveComponent("File"),o=s.resolveComponent("HardDrive"),a=s.resolveComponent("Calendar");return s.openBlock(),s.createElementBlock("div",jf,[n[7]||(n[7]=s.createElementVNode("div",{class:"flex flex-col space-y-1.5 p-6"},[s.createElementVNode("h3",{class:"text-2xl font-semibold leading-none tracking-tight"}," Інформація про файл ")],-1)),s.createElementVNode("div",Wf,[e.file?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("div",zf,[e.file.filetype==="folder"?(s.openBlock(),s.createBlock(vt,{key:0,class:"h-24 w-24 text-blue-500"})):((i=e.file)==null?void 0:i.filetype)==="image"&&((l=e.file)!=null&&l.filepath)?(s.openBlock(),s.createElementBlock("div",qf,[s.createElementVNode("img",{src:(c=e.file)==null?void 0:c.filepath,alt:((d=e.file)==null?void 0:d.alt)||((u=e.file)==null?void 0:u.filename),class:"max-h-full max-w-full object-contain rounded"},null,8,Gf)])):((f=e.file)==null?void 0:f.filetype)==="image"?(s.openBlock(),s.createBlock(Ds,{key:2,class:"h-24 w-24 text-green-500"})):(s.openBlock(),s.createBlock(r,{key:3,class:"h-24 w-24 text-gray-500"}))]),s.createElementVNode("div",null,[s.createElementVNode("h3",Jf,s.toDisplayString((_=e.file)==null?void 0:_.filename),1),s.createElementVNode("p",Zf,s.toDisplayString(((w=e.file)==null?void 0:w.filetype)==="folder"?"Папка":((m=e.file)==null?void 0:m.filetype.charAt(0).toUpperCase())+((y=e.file)==null?void 0:y.filetype.slice(1))),1)]),n[6]||(n[6]=s.createElementVNode("div",{class:"h-px w-full bg-border"},null,-1)),s.createElementVNode("div",Kf,[s.createElementVNode("div",Xf,[s.createVNode(o,{class:"h-4 w-4 text-muted-foreground"}),n[1]||(n[1]=s.createElementVNode("span",{class:"text-sm"},"Розмір: ",-1)),s.createElementVNode("span",Qf,s.toDisplayString(((p=e.file)==null?void 0:p.filetype)==="folder"?"--":s.unref(Rn)((k=e.file)==null?void 0:k.filesize)),1)]),s.createElementVNode("div",eh,[s.createVNode(a,{class:"h-4 w-4 text-muted-foreground"}),n[2]||(n[2]=s.createElementVNode("span",{class:"text-sm"},"Створено: ",-1)),s.createElementVNode("span",th,s.toDisplayString((b=e.file)!=null&&b.created_at?s.unref(Fn)((g=e.file)==null?void 0:g.created_at):"--"),1)]),s.createElementVNode("div",nh,[s.createVNode(a,{class:"h-4 w-4 text-muted-foreground"}),n[3]||(n[3]=s.createElementVNode("span",{class:"text-sm"},"Змінено: ",-1)),s.createElementVNode("span",rh,s.toDisplayString((D=e.file)!=null&&D.updated_at?s.unref(Fn)((V=e.file)==null?void 0:V.updated_at):"--"),1)]),(P=e.file)!=null&&P.filepath?(s.openBlock(),s.createElementBlock("div",sh,[s.createVNode(vt,{class:"h-4 w-4 text-muted-foreground mt-0.5"}),n[4]||(n[4]=s.createElementVNode("span",{class:"text-sm"},"Шлях: ",-1)),s.createElementVNode("span",oh,s.toDisplayString(($=e.file)==null?void 0:$.filepath),1)])):s.createCommentVNode("",!0),(Q=e.file)!=null&&Q.description?(s.openBlock(),s.createElementBlock("div",ah,[s.createVNode(If,{class:"h-4 w-4 text-muted-foreground mt-0.5"}),n[5]||(n[5]=s.createElementVNode("span",{class:"text-sm"},"Опис: ",-1)),s.createElementVNode("span",ih,s.toDisplayString((ee=e.file)==null?void 0:ee.description),1)])):s.createCommentVNode("",!0)])],64)):(s.openBlock(),s.createElementBlock("div",Hf,n[0]||(n[0]=[s.createElementVNode("p",null,"Виберіть файл для перегляду деталей",-1)])))])])}}},ch={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},dh={__name:"MediaCreateFolder",props:{modelValue:{},modelModifiers:{}},emits:s.mergeModels(["update:modelValue","create"],["update:modelValue"]),setup(e,{emit:t}){const n=s.useModel(e,"modelValue"),r=t,o=s.ref({}),a={name:{name:"name",label:"Назва",type:"Text"}},i=()=>{r("create",{...o.value}),o.value={}};return(l,c)=>{const d=s.resolveComponent("VsForm"),u=s.resolveComponent("VsDialog");return s.openBlock(),s.createBlock(u,{visible:n.value,"onUpdate:visible":c[2]||(c[2]=f=>n.value=f),title:"Створити папку"},{footer:s.withCtx(()=>[s.createElementVNode("div",ch,[s.createElementVNode("button",{onClick:c[1]||(c[1]=f=>l.$emit("update:modelValue",!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"}," Скасувати "),s.createElementVNode("button",{onClick:i,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:s.withCtx(()=>[s.createVNode(d,{scheme:a,modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=f=>o.value=f)},null,8,["modelValue"])]),_:1},8,["visible"])}}},uh={class:"container mx-auto p-4 min-h-screen"},fh={class:"grid grid-cols-1 lg:grid-cols-4 gap-6"},hh={class:"lg:col-span-3 space-y-4"},mh={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4"},ph={__name:"vs-media-new",setup(e){const t=s.ref("grid"),n=s.ref([]),r=s.ref(null),o=s.ref([]),a=s.ref(!1),i=s.ref([]),l=w=>{n.value=w,i.value=[...i.value,w],r.value=null,_()},c=()=>{i.value.length>1&&(i.value.pop(),n.value=i.value[i.value.length-1],r.value=null,_())},d=w=>{var m;w.type==="dir"?l([...n.value,w.name]):r.value=w.id===((m=r.value)==null?void 0:m.id)?null:w},u=async w=>{const m=w.target.files[0];if(!m)return;const y=new FormData;y.append("file",m);try{const p=n.value.join("/");await C.post(`/api/site-media/upload?subdir=${p}`,y,{headers:{"Content-Type":"multipart/form-data","X-Skip-Session":"true"}}),await _()}catch(p){error.value="Failed to upload files",console.error("Upload error:",p)}},f=async w=>{try{const m=n.value.join("/");await C.post(`/api/site-media/upload?subdir=${m}/${w.name}`),a.value=!1,await _()}catch{error.value="Failed to create folder"}},_=async()=>{try{const w=n.value.join("/"),m=await C.get("/api/site-media",{params:{subdir:w}});m.data&&m.data.data?o.value=m.data.data.map(y=>({...y,id:y.type==="dir"?`dir-${y.name}`:y.name})):o.value=[]}catch(w){error.value="Failed to fetch files",console.error("Fetch error:",w),o.value=[]}};return s.onMounted(()=>{i.value=[[]],_()}),(w,m)=>(s.openBlock(),s.createElementBlock("div",uh,[m[4]||(m[4]=s.createElementVNode("h1",{class:"text-3xl font-bold mb-6"},"Медіа бібліотека",-1)),s.createElementVNode("div",fh,[s.createElementVNode("div",hh,[s.createElementVNode("div",mh,[s.createVNode(zu,{"current-path":n.value,onNavigate:l,onNavigateBack:c},null,8,["current-path"]),s.createVNode(af,{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=y=>t.value=y),onCreateFolder:m[1]||(m[1]=y=>a.value=!0),onFileChange:u},null,8,["modelValue"])]),m[3]||(m[3]=s.createElementVNode("div",{class:"h-px w-full bg-border"},null,-1)),t.value==="grid"?(s.openBlock(),s.createBlock(bf,{key:0,files:o.value,"selected-file":r.value,onFileClick:d},null,8,["files","selected-file"])):(s.openBlock(),s.createBlock(Af,{key:1,files:o.value,"selected-file":r.value,onFileClick:d},null,8,["files","selected-file"]))]),s.createVNode(lh,{file:r.value},null,8,["file"])]),s.createVNode(dh,{modelValue:a.value,"onUpdate:modelValue":m[2]||(m[2]=y=>a.value=y),onCreate:f},null,8,["modelValue"])]))}},yh={class:"w-full bg-white p-[20px] rounded-lg mt-[20px] border"},gh={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},_h={class:"sticky top-[0px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},wh={class:"divide-y divide-gray-200 dark:divide-neutral-700"},xh=["onClick"],kh={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},bh={__name:"vs-manager-collection-list",props:{list:Object},setup(e){const t=[{ua:"Назва",name:"name",format:"Text"},{ua:"Опис",name:"description",format:"Text"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(n,r)=>{var o;return s.openBlock(),s.createElementBlock("div",yh,[(o=e.list)!=null&&o.length?(s.openBlock(),s.createElementBlock("table",gh,[s.createElementVNode("thead",_h,[s.createElementVNode("tr",null,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(t,(a,i)=>s.createElementVNode("th",{key:i,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},s.toDisplayString(a==null?void 0:a.ua),1)),64))])]),s.createElementVNode("tbody",wh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.list,a=>(s.openBlock(),s.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:i=>n.$router.push(`/manager-collection/${a==null?void 0:a.template}`)},[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(t,i=>{var l;return s.createElementVNode("td",kh,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(Es)[(l=i==null?void 0:i.format)==null?void 0:l.toLowerCase()]||"div"),{value:a==null?void 0:a[i==null?void 0:i.name]},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(a==null?void 0:a[i==null?void 0:i.name]),1)]),_:2},1032,["value"]))])}),64))],8,xh))),256))])])):(s.openBlock(),s.createBlock(gt,{key:1}))])}}},Eh={class:"flex gap-2 w-full items-center justify-between"},Sh=["checked","onChange"],Nh={__name:"vs-permissions-checkbox",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=["view","add","edit","del"],r=e,o=t,a=(i,l)=>{let c=[...r.modelValue];l?c.includes(i)||c.push(i):c=c.filter(d=>d!==i),o("update:modelValue",c)};return(i,l)=>(s.openBlock(),s.createElementBlock("div",Eh,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(n,c=>{var d,u,f;return s.createElementVNode("div",{class:"w-[120px] flex items-center justify-center",key:c},[s.createElementVNode("label",{class:s.normalizeClass(["flex h-[20px] w-[20px] items-center justify-center border text-white rounded cursor-pointer",{"bg-blue-500 border-blue-500":(d=e.modelValue)==null?void 0:d.includes(c)}])},[s.createElementVNode("input",{type:"checkbox",class:"hidden",checked:(u=e.modelValue)==null?void 0:u.includes(c),onChange:_=>a(c,_.target.checked)},null,40,Sh),(f=e.modelValue)!=null&&f.includes(c)?(s.openBlock(),s.createBlock(ks,{key:0})):s.createCommentVNode("",!0)],2)])}),64))]))}},Dh={class:"flex items-center gap-2 mb-2"},Vh={class:"w-full flex flex-col gap-2"},Oh={class:"flex gap-2 items-center w-full p-3 md:gap-x-6"},Mh={class:"flex justify-between w-full"},Ch={class:"text-xs font-medium text-start w-[80px]"},Th={class:"flex gap-2 items-center w-full p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5"},Bh={class:"font-semibold text-gray-800 dark:text-neutral-200 w-full max-w-[300px]"},$h={class:"flex justify-between w-full"},Rh=["onClick"],Fh={class:"flex flex-col gap-2 p-3"},Yh={class:"w-full max-w-[300px]"},Ph={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Ah={__name:"vs-premissions-component",props:{permissions:{},permissionsModifiers:{}},emits:["update:permissions"],setup(e){const t=s.ref(""),n=s.useModel(e,"permissions"),r=u=>s.computed(()=>{var _;const f=(_=n.value)==null?void 0:_.find(w=>(w==null?void 0:w.user_id)===u);return(f==null?void 0:f.actions)||[]}),o=(u,f)=>{n.value||(n.value=[]);const _=n.value.findIndex(w=>(w==null?void 0:w.user_id)===u);_===-1?n.value.push({user_id:u,actions:f}):n.value[_].actions=f},a=(u,f)=>{const _=i.value[u];if(!_)return;const w=[...n.value||[]],m=_.every(y=>{var k;const p=w.find(b=>(b==null?void 0:b.user_id)===(y==null?void 0:y.user_id));return(k=p==null?void 0:p.actions)==null?void 0:k.includes(f)});_.forEach(y=>{const p=w.findIndex(b=>(b==null?void 0:b.user_id)===(y==null?void 0:y.user_id));let k=[];if(p!==-1&&(k=[...w[p].actions]),m){const b=k.indexOf(f);b>-1&&k.splice(b,1)}else k.includes(f)||k.push(f);p===-1?w.push({user_id:y.user_id,actions:k}):w[p].actions=k}),n.value=w},i=s.computed(()=>{if(!n.value)return{};const u={};return n.value.forEach(f=>{const _=f==null?void 0:f.content_type_id;_&&(u[_]||(u[_]=[]),u[_].push({user_id:f.user_id,subject:f.subject,content_type_id:_,actions:f.actions||[]}))}),u}),l=()=>{},c=()=>{var u;(u=n.value)==null||u.forEach(f=>{f.actions=[]}),t.value=""},d=s.computed(()=>{const u=t.value.toLowerCase().trim();if(!u)return i.value;const f={};return Object.entries(i.value).forEach(([_,w])=>{const m=w.filter(y=>[y==null?void 0:y.subject,y==null?void 0:y.content_type_id,_].filter(Boolean).join(" ").toLowerCase().includes(u));m.length>0&&(f[_]=m)}),f});return(u,f)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",Dh,[s.withDirectives(s.createElementVNode("input",{type:"text",placeholder:"Пошук за назвою",class:"w-full h-[36px] border focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring rounded-md px-2","onUpdate:modelValue":f[0]||(f[0]=_=>t.value=_),onInput:l},null,544),[[s.vModelText,t.value]]),s.createElementVNode("button",{class:"text-sm border h-[36px] rounded-md px-2 hover:bg-gray-100 transition-all duration-300",onClick:c}," Скинути ")]),s.createElementVNode("div",Vh,[s.createElementVNode("div",Oh,[f[1]||(f[1]=s.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200 w-full max-w-[300px]"}," Групи ",-1)),s.createElementVNode("div",Mh,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(["Перегляд","Додавання","Редагування","Видалення"],_=>s.createElementVNode("p",Ch,s.toDisplayString(_),1)),64))])]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(d.value,(_,w)=>(s.openBlock(),s.createElementBlock("div",{key:w},[s.createElementVNode("div",Th,[s.createElementVNode("h3",Bh,s.toDisplayString(w),1),s.createElementVNode("div",$h,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(["view","add","edit","del"],m=>s.createElementVNode("button",{key:m,class:"text-xs font-medium text-blue-600 text-start w-[80px] decoration-2 hover:underline focus:outline-none focus:underline",onClick:y=>a(w,m)}," Вибрати всі ",8,Rh)),64))])]),s.createElementVNode("div",Fh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(_,m=>(s.openBlock(),s.createElementBlock("div",{key:m.id,class:"flex gap-2 items-center w-full"},[s.createElementVNode("div",Yh,[s.createElementVNode("p",Ph,s.toDisplayString(m==null?void 0:m.subject),1)]),s.createVNode(Nh,{"model-value":r(m==null?void 0:m.user_id).value,"onUpdate:modelValue":y=>o(m==null?void 0:m.user_id,y),"item-id":m==null?void 0:m.user_id},null,8,["model-value","onUpdate:modelValue","item-id"])]))),128))])]))),128))])]))}},vh={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},Lh={class:"w-full max-w-[1440px]"},Uh={class:"mt-4 bg-white rounded-lg p-4 border"},Ih={__name:"vs-permissions",setup(e){const t=s.getCurrentInstance().proxy.$notify,n=s.ref([]);(async()=>{try{const{data:a}=await C.get("/api/site-permissions/1");n.value=a==null?void 0:a.permissions}catch{}})();const o=async()=>{try{await C.post("/api/site-permissions/1",{permissions:n.value}),t({title:"Успішно",message:"Права збережено",type:"success"})}catch{t({title:"Помилка",text:"Помилка при збереженні прав",type:"error"})}};return(a,i)=>{var l;return s.openBlock(),s.createElementBlock("section",vh,[s.createElementVNode("div",Lh,[s.createElementVNode("div",{class:"flex items-center justify-between mt-4"},[i[1]||(i[1]=s.createElementVNode("h1",{class:"text-xl font-bold"},"Permissions",-1)),s.createElementVNode("button",{onClick:o,class:"p-2 bg-blue-500 text-white rounded-md"}," Зберегти ")]),s.createElementVNode("div",Uh,[(l=n.value)!=null&&l.length?(s.openBlock(),s.createBlock(Ah,{key:0,permissions:n.value,"onUpdate:permissions":i[0]||(i[0]=c=>n.value=c)},null,8,["permissions"])):s.createCommentVNode("",!0)])])])}}},jh={},Wh={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"};function Hh(e,t){return s.openBlock(),s.createElementBlock("svg",Wh,t[0]||(t[0]=[s.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"},null,-1)]))}const zh=W(jh,[["render",Hh]]),qh={class:""},Gh={key:0,class:"ml-5"},Jh=W({__name:"vs-menu-tree-node",props:{item:{type:Object,required:!0},isSiblingDragOver:{type:[String,Number],default:null}},emits:["item-dropped","sibling-drag-enter","sibling-drag-leave","sibling-drop"],setup(e,{emit:t}){const n=e,r=t,o=s.ref(!1),a=s.ref(!1),i=s.ref(!1),l=s.computed(()=>n.item.children&&n.item.children.length>0),c=()=>{l.value&&(o.value=!o.value)},d=D=>{i.value=!0,D.dataTransfer.setData("application/json",JSON.stringify({id:n.item.id,title:n.item.title,url:n.item.url,children:n.item.children||[]})),D.dataTransfer.effectAllowed="move"},u=D=>{D.preventDefault(),D.dataTransfer.dropEffect="move"},f=D=>{a.value=!1,i.value=!1;try{const V=JSON.parse(D.dataTransfer.getData("application/json"));V.id!==n.item.id&&r("item-dropped",{draggedItemId:V.id,targetItemId:n.item.id,draggedItemData:V})}catch(V){console.error("Error parsing drag data:",V)}},_=D=>{a.value=!0},w=D=>{a.value=!1},m=()=>{a.value=!1,i.value=!1},y=D=>{r("item-dropped",D)},p=D=>{D.preventDefault(),D.dataTransfer.dropEffect="move"},k=(D,V)=>{try{const P=JSON.parse(D.dataTransfer.getData("application/json"));r("sibling-drop",D,V)}catch(P){console.error("Error parsing drag data:",P)}},b=(D,V)=>{r("sibling-drag-enter",D,V)},g=(D,V)=>{r("sibling-drag-leave",D,V)};return(D,V)=>{const P=s.resolveComponent("vs-menu-tree-node",!0);return s.openBlock(),s.createElementBlock("div",qh,[s.createElementVNode("div",{class:s.normalizeClass(["drop-zone",{"drop-zone-active":e.isSiblingDragOver===e.item.id}]),onDragover:s.withModifiers(p,["prevent"]),onDrop:V[0]||(V[0]=s.withModifiers($=>k($,e.item.id),["prevent"])),onDragenter:V[1]||(V[1]=s.withModifiers($=>b($,e.item.id),["prevent"])),onDragleave:V[2]||(V[2]=s.withModifiers($=>g($,e.item.id),["prevent"]))},null,34),s.createElementVNode("div",{class:s.normalizeClass(["draggable-item w-full",{"drag-over":a.value,dragging:i.value}]),draggable:"true",onDragstart:d,onDragover:s.withModifiers(u,["prevent"]),onDrop:s.withModifiers(f,["prevent"]),onDragenter:s.withModifiers(_,["prevent"]),onDragleave:s.withModifiers(w,["prevent"]),onDragend:m},[s.createElementVNode("button",{onClick:c,class:"text-inherit flex items-center gap-2 w-full hover:text-blue-600 p-1 px-3 rounded-lg hover:bg-gray-100"},[l.value?(s.openBlock(),s.createBlock(zh,{key:0,class:s.normalizeClass(["h-[8px] w-[8px] text-gray-500 duration-300",{"rotate-90":o.value}])},null,8,["class"])):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(e.item.title),1)])],34),l.value&&o.value?(s.openBlock(),s.createElementBlock("div",Gh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.item.children,$=>(s.openBlock(),s.createBlock(P,{key:$.id,item:$,"is-sibling-drag-over":e.isSiblingDragOver,onItemDropped:y,onSiblingDragEnter:b,onSiblingDragLeave:g,onSiblingDrop:k},null,8,["item","is-sibling-drag-over"]))),128))])):s.createCommentVNode("",!0)])}}},[["__scopeId","data-v-b98f5b2f"]]),Zh={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Kh=W({__name:"vs-menu-tree-component",props:{isSiblingDragOver:{type:[String,Number],default:null}},emits:["sibling-drag-enter","sibling-drag-leave","sibling-drop"],setup(e,{emit:t}){const n=s.ref(!1);s.ref(!1);const r=s.ref(null),o=s.ref(),a=s.ref([{id:1,title:"Главная",url:"/",children:[]},{id:2,title:"Блог",url:"/blog",children:[{id:3,title:"Последние посты",url:"/blog/latest",children:[{id:4,title:"Новости",url:"/blog/latest/news",children:[]},{id:5,title:"Статьи",url:"/blog/latest/articles",children:[{id:6,title:"Технологии",url:"/blog/latest/articles/tech",children:[]},{id:7,title:"Бизнес",url:"/blog/latest/articles/business",children:[]}]}]},{id:8,title:"Архив",url:"/blog/archive",children:[]}]},{id:9,title:"О нас",url:"/about",children:[{id:10,title:"Команда",url:"/about/team",children:[]},{id:11,title:"Контакты",url:"/about/contacts",children:[{id:12,title:"Офисы",url:"/about/contacts/offices",children:[]},{id:13,title:"Поддержка",url:"/about/contacts/support",children:[]}]}]},{id:14,title:"Услуги",url:"/services",children:[{id:15,title:"Веб-разработка",url:"/services/web",children:[]},{id:16,title:"Мобильные приложения",url:"/services/mobile",children:[]}]}]),i=s.computed(()=>({id:{type:"Text",validators:["required"],label:"ID"},title:{type:"Text",validators:["required"],label:"Назва"},url:{type:"Text",validators:["required"],label:"URL"},parentId:{type:"Select",label:"Родитель",options:l(a.value)}})),l=y=>{const p=[];return y.forEach(k=>{var b;p.push({text:k.title,id:k.id}),k!=null&&k.children&&((b=k==null?void 0:k.children)==null?void 0:b.length)>0&&p.push(...l(k.children))}),p},c=(y,p,k=null)=>{for(let b=0;b<y.length;b++){if(y[b].id===p)return{item:y[b],parent:k,index:b};if(y[b].children&&y[b].children.length>0){const g=c(y[b].children,p,y[b]);if(g)return g}}return null},d=({draggedItemId:y,targetItemId:p,draggedItemData:k})=>{if(y===p)return;const b=c(a.value,y),g=c(a.value,p);if(!b||!g)return;const{parent:D,index:V}=b,{item:P}=g;if(D&&D.id===p)return;const $=(ee,Ie)=>ee.id===Ie?!0:ee.children?ee.children.some(Lt=>$(Lt,Ie)):!1;if($(k,p))return;const Q={id:k.id,title:k.title,url:k.url,children:k.children||[]};D?D.children.splice(V,1):a.value.splice(V,1),P.children||(P.children=[]),P.children.push(Q)},u=(y,p)=>{for(const k of y){if(k.id===p)return k;if(k.children&&k.children.length>0){const b=u(k.children,p);if(b)return b}}return null},f=async()=>{const y={id:String(Math.random()),title:o.value.title,url:o.value.url,children:[]};if(o.value.parentId){const p=u(a.value,o.value.parentId);p&&p.children.push(y)}else a.value.push(y);n.value=!1,o.value={}},_=(y,p)=>{r.value=null;try{const k=JSON.parse(y.dataTransfer.getData("application/json")),b=c(a.value,k.id),g=c(a.value,p);if(!b||!g)return;const{parent:D,index:V}=b,{parent:P,index:$}=g,Q=(Ie,Lt)=>Ie.id===Lt?!0:Ie.children?Ie.children.some(tm=>Q(tm,Lt)):!1;if(Q(k,p))return;const ee={id:k.id,title:k.title,url:k.url,children:k.children||[]};D?D.children.splice(V,1):a.value.splice(V,1),P?P.children.splice($,0,ee):a.value.splice($,0,ee)}catch(k){console.error("Error parsing drag data:",k)}},w=(y,p)=>{r.value=p},m=(y,p)=>{r.value=null};return(y,p)=>{const k=s.resolveComponent("VsForm"),b=s.resolveComponent("VsDialog");return s.openBlock(),s.createElementBlock("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(g,D)=>(s.openBlock(),s.createElementBlock("div",{key:g.id},[s.createVNode(Jh,{item:g,onItemDropped:d,"is-sibling-drag-over":r.value,onSiblingDragEnter:w,onSiblingDragLeave:m,onSiblingDrop:_},null,8,["item","is-sibling-drag-over"])]))),128)),s.createElementVNode("button",{class:"px-3 text-blue-500 hover:text-blue-700 duration-300 hover:underline hover:underline-2",onClick:p[0]||(p[0]=g=>n.value=!0)}," Добавить "),s.createVNode(b,{visible:n.value,"onUpdate:visible":p[3]||(p[3]=g=>n.value=g),title:"Додати елемент меню"},{footer:s.withCtx(()=>[s.createElementVNode("div",Zh,[s.createElementVNode("button",{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",onClick:p[2]||(p[2]=g=>n.value=!1)}," Скасувати"),s.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:f}," Зберегти ")])]),default:s.withCtx(()=>[s.createVNode(k,{scheme:i.value,modelValue:o.value,"onUpdate:modelValue":p[1]||(p[1]=g=>o.value=g)},null,8,["scheme","modelValue"])]),_:1},8,["visible"])])}}},[["__scopeId","data-v-8b028afb"]]),Xh={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},Qh={class:"p-[20px] w-full max-w-[1440px]"},em={class:"w-full bg-white rounded-lg p-[20px] border mt-[20px]"},Vs={"vs-builder":La,"vs-builder-content":_a,"vs-manager-single":Ga,"vs-manager-single-content":Yu,"vs-manager-collection":ti,"vs-manager-collection-list":bh,"vs-manager-collection-content":Su,"vs-manager-collection-item-content":Cu,"vs-media":ph,"vs-permissions":Ih,"vs-menu-tree":{__name:"vs-menu-tree",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("section",Xh,[s.createElementVNode("div",Qh,[n[0]||(n[0]=s.createElementVNode("h1",null,"Дерево меню",-1)),s.createElementVNode("div",em,[s.createVNode(Kh)])])]))}}},Os={install:e=>{var t;(t=Object.entries(Vs))==null||t.forEach(([n,r])=>e.component(n,r))},components:Vs};return typeof window<"u"&&(window.v3Cms=Os),Os});
|