@opengis/filter 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ (function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.FilterLib={},L.Vue))})(this,function(L,e){"use strict";const Bt={class:"flex items-center w-full rounded-lg group hover:bg-gray-100"},Vt={class:"flex items-center justify-between w-full text-sm"},Nt={class:"flex items-center cursor-pointer w-full"},St={key:0,width:"16",height:"auto",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="},Rt=["value"],_t={class:"w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]"},At={class:"flex flex-row items-center font-normal text-gray-800 gap-x-1"},Tt={key:0,class:"text-xs text-gray-500 dark:text-neutral-500 pr-1"},Re=e.defineComponent({__name:"list-item",props:{layout:{},count:{},type:{},label:{},value:{},isSelected:{type:Boolean},color:{}},emits:["itemClick"],setup(t,{emit:n}){const r=t,o=n;function l(){o("itemClick",r.value)}return(a,s)=>(e.openBlock(),e.createElementBlock("div",Bt,[e.createElementVNode("div",Vt,[e.createElementVNode("div",Nt,[e.createElementVNode("label",{for:"radio-9740",class:e.normalizeClass(["inline","popover"].includes(a.layout)?"text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center":"flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer"),onClick:e.withModifiers(l,["stop","prevent"])},[e.createElementVNode("div",{class:e.normalizeClass(["w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",[a.type==="checkbox"?"rounded-[4px]":"rounded-full",a.color?`bg-[${a.color}] border-[#ffffff]`:a.isSelected?"bg-[#2563eb] border-[#ffffff]":"bg-[#ffffff] border-[#d9d9d9]"]])},[a.isSelected?(e.openBlock(),e.createElementBlock("img",St)):e.createCommentVNode("",!0)],2),e.createElementVNode("input",{type:"checkbox",class:"hidden",id:"radio-9740",value:a.value},null,8,Rt),e.createElementVNode("div",_t,[e.createElementVNode("span",At,e.toDisplayString(a.label??"Відсутні данні"),1),a.count?(e.openBlock(),e.createElementBlock("div",Tt," ("+e.toDisplayString(a.count)+") ",1)):e.createCommentVNode("",!0)])],2)])])]))}});function _e(t,n){return function(){return t.apply(n,arguments)}}const{toString:Ot}=Object.prototype,{getPrototypeOf:de}=Object,{iterator:v,toStringTag:Ae}=Symbol,ee=(t=>n=>{const r=Ot.call(n);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),n=>ee(n)===t),te=t=>n=>typeof n===t,{isArray:K}=Array,J=te("undefined");function Y(t){return t!==null&&!J(t)&&t.constructor!==null&&!J(t.constructor)&&T(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Te=D("ArrayBuffer");function Dt(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Te(t.buffer),n}const Ft=te("string"),T=te("function"),Oe=te("number"),Q=t=>t!==null&&typeof t=="object",$t=t=>t===!0||t===!1,ne=t=>{if(ee(t)!=="object")return!1;const n=de(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Ae in t)&&!(v in t)},Mt=t=>{if(!Q(t)||Y(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Lt=D("Date"),jt=D("File"),Pt=D("Blob"),Ut=D("FileList"),zt=t=>Q(t)&&T(t.pipe),It=t=>{let n;return t&&(typeof FormData=="function"&&t instanceof FormData||T(t.append)&&((n=ee(t))==="formdata"||n==="object"&&T(t.toString)&&t.toString()==="[object FormData]"))},qt=D("URLSearchParams"),[Ht,Kt,Wt,Jt]=["ReadableStream","Request","Response","Headers"].map(D),Yt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function G(t,n,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let o,l;if(typeof t!="object"&&(t=[t]),K(t))for(o=0,l=t.length;o<l;o++)n.call(null,t[o],o,t);else{if(Y(t))return;const a=r?Object.getOwnPropertyNames(t):Object.keys(t),s=a.length;let d;for(o=0;o<s;o++)d=a[o],n.call(null,t[d],d,t)}}function De(t,n){if(Y(t))return null;n=n.toLowerCase();const r=Object.keys(t);let o=r.length,l;for(;o-- >0;)if(l=r[o],n===l.toLowerCase())return l;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Fe=t=>!J(t)&&t!==z;function ue(){const{caseless:t}=Fe(this)&&this||{},n={},r=(o,l)=>{const a=t&&De(n,l)||l;ne(n[a])&&ne(o)?n[a]=ue(n[a],o):ne(o)?n[a]=ue({},o):K(o)?n[a]=o.slice():n[a]=o};for(let o=0,l=arguments.length;o<l;o++)arguments[o]&&G(arguments[o],r);return n}const Qt=(t,n,r,{allOwnKeys:o}={})=>(G(n,(l,a)=>{r&&T(l)?t[a]=_e(l,r):t[a]=l},{allOwnKeys:o}),t),Gt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Xt=(t,n,r,o)=>{t.prototype=Object.create(n.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:n.prototype}),r&&Object.assign(t.prototype,r)},Zt=(t,n,r,o)=>{let l,a,s;const d={};if(n=n||{},t==null)return n;do{for(l=Object.getOwnPropertyNames(t),a=l.length;a-- >0;)s=l[a],(!o||o(s,t,n))&&!d[s]&&(n[s]=t[s],d[s]=!0);t=r!==!1&&de(t)}while(t&&(!r||r(t,n))&&t!==Object.prototype);return n},vt=(t,n,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=n.length;const o=t.indexOf(n,r);return o!==-1&&o===r},en=t=>{if(!t)return null;if(K(t))return t;let n=t.length;if(!Oe(n))return null;const r=new Array(n);for(;n-- >0;)r[n]=t[n];return r},tn=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&de(Uint8Array)),nn=(t,n)=>{const o=(t&&t[v]).call(t);let l;for(;(l=o.next())&&!l.done;){const a=l.value;n.call(t,a[0],a[1])}},on=(t,n)=>{let r;const o=[];for(;(r=t.exec(n))!==null;)o.push(r);return o},rn=D("HTMLFormElement"),ln=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,l){return o.toUpperCase()+l}),$e=(({hasOwnProperty:t})=>(n,r)=>t.call(n,r))(Object.prototype),an=D("RegExp"),Me=(t,n)=>{const r=Object.getOwnPropertyDescriptors(t),o={};G(r,(l,a)=>{let s;(s=n(l,a,t))!==!1&&(o[a]=s||l)}),Object.defineProperties(t,o)},sn=t=>{Me(t,(n,r)=>{if(T(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const o=t[r];if(T(o)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},cn=(t,n)=>{const r={},o=l=>{l.forEach(a=>{r[a]=!0})};return K(t)?o(t):o(String(t).split(n)),r},dn=()=>{},un=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function fn(t){return!!(t&&T(t.append)&&t[Ae]==="FormData"&&t[v])}const pn=t=>{const n=new Array(10),r=(o,l)=>{if(Q(o)){if(n.indexOf(o)>=0)return;if(Y(o))return o;if(!("toJSON"in o)){n[l]=o;const a=K(o)?[]:{};return G(o,(s,d)=>{const i=r(s,l+1);!J(i)&&(a[d]=i)}),n[l]=void 0,a}}return o};return r(t,0)},mn=D("AsyncFunction"),hn=t=>t&&(Q(t)||T(t))&&T(t.then)&&T(t.catch),Le=((t,n)=>t?setImmediate:n?((r,o)=>(z.addEventListener("message",({source:l,data:a})=>{l===z&&a===r&&o.length&&o.shift()()},!1),l=>{o.push(l),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",T(z.postMessage)),yn=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||Le,m={isArray:K,isArrayBuffer:Te,isBuffer:Y,isFormData:It,isArrayBufferView:Dt,isString:Ft,isNumber:Oe,isBoolean:$t,isObject:Q,isPlainObject:ne,isEmptyObject:Mt,isReadableStream:Ht,isRequest:Kt,isResponse:Wt,isHeaders:Jt,isUndefined:J,isDate:Lt,isFile:jt,isBlob:Pt,isRegExp:an,isFunction:T,isStream:zt,isURLSearchParams:qt,isTypedArray:tn,isFileList:Ut,forEach:G,merge:ue,extend:Qt,trim:Yt,stripBOM:Gt,inherits:Xt,toFlatObject:Zt,kindOf:ee,kindOfTest:D,endsWith:vt,toArray:en,forEachEntry:nn,matchAll:on,isHTMLForm:rn,hasOwnProperty:$e,hasOwnProp:$e,reduceDescriptors:Me,freezeMethods:sn,toObjectSet:cn,toCamelCase:ln,noop:dn,toFiniteNumber:un,findKey:De,global:z,isContextDefined:Fe,isSpecCompliantForm:fn,toJSONObject:pn,isAsyncFn:mn,isThenable:hn,setImmediate:Le,asap:yn,isIterable:t=>t!=null&&T(t[v])};function B(t,n,r,o,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),l&&(this.response=l,this.status=l.status?l.status:null)}m.inherits(B,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:m.toJSONObject(this.config),code:this.code,status:this.status}}});const je=B.prototype,Pe={};["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(t=>{Pe[t]={value:t}}),Object.defineProperties(B,Pe),Object.defineProperty(je,"isAxiosError",{value:!0}),B.from=(t,n,r,o,l,a)=>{const s=Object.create(je);return m.toFlatObject(t,s,function(i){return i!==Error.prototype},d=>d!=="isAxiosError"),B.call(s,t.message,n,r,o,l),s.cause=t,s.name=t.name,a&&Object.assign(s,a),s};const gn=null;function fe(t){return m.isPlainObject(t)||m.isArray(t)}function Ue(t){return m.endsWith(t,"[]")?t.slice(0,-2):t}function ze(t,n,r){return t?t.concat(n).map(function(l,a){return l=Ue(l),!r&&a?"["+l+"]":l}).join(r?".":""):n}function bn(t){return m.isArray(t)&&!t.some(fe)}const kn=m.toFlatObject(m,{},null,function(n){return/^is[A-Z]/.test(n)});function oe(t,n,r){if(!m.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,r=m.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,E){return!m.isUndefined(E[x])});const o=r.metaTokens,l=r.visitor||u,a=r.dots,s=r.indexes,i=(r.Blob||typeof Blob<"u"&&Blob)&&m.isSpecCompliantForm(n);if(!m.isFunction(l))throw new TypeError("visitor must be a function");function f(g){if(g===null)return"";if(m.isDate(g))return g.toISOString();if(m.isBoolean(g))return g.toString();if(!i&&m.isBlob(g))throw new B("Blob is not supported. Use a Buffer instead.");return m.isArrayBuffer(g)||m.isTypedArray(g)?i&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,x,E){let V=g;if(g&&!E&&typeof g=="object"){if(m.endsWith(x,"{}"))x=o?x:x.slice(0,-2),g=JSON.stringify(g);else if(m.isArray(g)&&bn(g)||(m.isFileList(g)||m.endsWith(x,"[]"))&&(V=m.toArray(g)))return x=Ue(x),V.forEach(function(k,y){!(m.isUndefined(k)||k===null)&&n.append(s===!0?ze([x],y,a):s===null?x:x+"[]",f(k))}),!1}return fe(g)?!0:(n.append(ze(E,x,a),f(g)),!1)}const c=[],h=Object.assign(kn,{defaultVisitor:u,convertValue:f,isVisitable:fe});function C(g,x){if(!m.isUndefined(g)){if(c.indexOf(g)!==-1)throw Error("Circular reference detected in "+x.join("."));c.push(g),m.forEach(g,function(V,w){(!(m.isUndefined(V)||V===null)&&l.call(n,V,m.isString(w)?w.trim():w,x,h))===!0&&C(V,x?x.concat(w):[w])}),c.pop()}}if(!m.isObject(t))throw new TypeError("data must be an object");return C(t),n}function Ie(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return n[o]})}function pe(t,n){this._pairs=[],t&&oe(t,this,n)}const qe=pe.prototype;qe.append=function(n,r){this._pairs.push([n,r])},qe.toString=function(n){const r=n?function(o){return n.call(this,o,Ie)}:Ie;return this._pairs.map(function(l){return r(l[0])+"="+r(l[1])},"").join("&")};function wn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function He(t,n,r){if(!n)return t;const o=r&&r.encode||wn;m.isFunction(r)&&(r={serialize:r});const l=r&&r.serialize;let a;if(l?a=l(n,r):a=m.isURLSearchParams(n)?n.toString():new pe(n,r).toString(o),a){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class Ke{constructor(){this.handlers=[]}use(n,r,o){return this.handlers.push({fulfilled:n,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){m.forEach(this.handlers,function(o){o!==null&&n(o)})}}const We={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pe,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},me=typeof window<"u"&&typeof document<"u",he=typeof navigator=="object"&&navigator||void 0,En=me&&(!he||["ReactNative","NativeScript","NS"].indexOf(he.product)<0),Cn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bn=me&&window.location.href||"http://localhost",A={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:me,hasStandardBrowserEnv:En,hasStandardBrowserWebWorkerEnv:Cn,navigator:he,origin:Bn},Symbol.toStringTag,{value:"Module"})),...xn};function Vn(t,n){return oe(t,new A.classes.URLSearchParams,{visitor:function(r,o,l,a){return A.isNode&&m.isBuffer(r)?(this.append(o,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...n})}function Nn(t){return m.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Sn(t){const n={},r=Object.keys(t);let o;const l=r.length;let a;for(o=0;o<l;o++)a=r[o],n[a]=t[a];return n}function Je(t){function n(r,o,l,a){let s=r[a++];if(s==="__proto__")return!0;const d=Number.isFinite(+s),i=a>=r.length;return s=!s&&m.isArray(l)?l.length:s,i?(m.hasOwnProp(l,s)?l[s]=[l[s],o]:l[s]=o,!d):((!l[s]||!m.isObject(l[s]))&&(l[s]=[]),n(r,o,l[s],a)&&m.isArray(l[s])&&(l[s]=Sn(l[s])),!d)}if(m.isFormData(t)&&m.isFunction(t.entries)){const r={};return m.forEachEntry(t,(o,l)=>{n(Nn(o),l,r,0)}),r}return null}function Rn(t,n,r){if(m.isString(t))try{return(n||JSON.parse)(t),m.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(t)}const X={transitional:We,adapter:["xhr","http","fetch"],transformRequest:[function(n,r){const o=r.getContentType()||"",l=o.indexOf("application/json")>-1,a=m.isObject(n);if(a&&m.isHTMLForm(n)&&(n=new FormData(n)),m.isFormData(n))return l?JSON.stringify(Je(n)):n;if(m.isArrayBuffer(n)||m.isBuffer(n)||m.isStream(n)||m.isFile(n)||m.isBlob(n)||m.isReadableStream(n))return n;if(m.isArrayBufferView(n))return n.buffer;if(m.isURLSearchParams(n))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let d;if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Vn(n,this.formSerializer).toString();if((d=m.isFileList(n))||o.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return oe(d?{"files[]":n}:n,i&&new i,this.formSerializer)}}return a||l?(r.setContentType("application/json",!1),Rn(n)):n}],transformResponse:[function(n){const r=this.transitional||X.transitional,o=r&&r.forcedJSONParsing,l=this.responseType==="json";if(m.isResponse(n)||m.isReadableStream(n))return n;if(n&&m.isString(n)&&(o&&!this.responseType||l)){const s=!(r&&r.silentJSONParsing)&&l;try{return JSON.parse(n)}catch(d){if(s)throw d.name==="SyntaxError"?B.from(d,B.ERR_BAD_RESPONSE,this,null,this.response):d}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};m.forEach(["delete","get","head","post","put","patch"],t=>{X.headers[t]={}});const _n=m.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"]),An=t=>{const n={};let r,o,l;return t&&t.split(`
2
+ `).forEach(function(s){l=s.indexOf(":"),r=s.substring(0,l).trim().toLowerCase(),o=s.substring(l+1).trim(),!(!r||n[r]&&_n[r])&&(r==="set-cookie"?n[r]?n[r].push(o):n[r]=[o]:n[r]=n[r]?n[r]+", "+o:o)}),n},Ye=Symbol("internals");function Z(t){return t&&String(t).trim().toLowerCase()}function re(t){return t===!1||t==null?t:m.isArray(t)?t.map(re):String(t)}function Tn(t){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(t);)n[o[1]]=o[2];return n}const On=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ye(t,n,r,o,l){if(m.isFunction(o))return o.call(this,n,r);if(l&&(n=r),!!m.isString(n)){if(m.isString(o))return n.indexOf(o)!==-1;if(m.isRegExp(o))return o.test(n)}}function Dn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,o)=>r.toUpperCase()+o)}function Fn(t,n){const r=m.toCamelCase(" "+n);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+r,{value:function(l,a,s){return this[o].call(this,n,l,a,s)},configurable:!0})})}let O=class{constructor(n){n&&this.set(n)}set(n,r,o){const l=this;function a(d,i,f){const u=Z(i);if(!u)throw new Error("header name must be a non-empty string");const c=m.findKey(l,u);(!c||l[c]===void 0||f===!0||f===void 0&&l[c]!==!1)&&(l[c||i]=re(d))}const s=(d,i)=>m.forEach(d,(f,u)=>a(f,u,i));if(m.isPlainObject(n)||n instanceof this.constructor)s(n,r);else if(m.isString(n)&&(n=n.trim())&&!On(n))s(An(n),r);else if(m.isObject(n)&&m.isIterable(n)){let d={},i,f;for(const u of n){if(!m.isArray(u))throw TypeError("Object iterator must return a key-value pair");d[f=u[0]]=(i=d[f])?m.isArray(i)?[...i,u[1]]:[i,u[1]]:u[1]}s(d,r)}else n!=null&&a(r,n,o);return this}get(n,r){if(n=Z(n),n){const o=m.findKey(this,n);if(o){const l=this[o];if(!r)return l;if(r===!0)return Tn(l);if(m.isFunction(r))return r.call(this,l,o);if(m.isRegExp(r))return r.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=Z(n),n){const o=m.findKey(this,n);return!!(o&&this[o]!==void 0&&(!r||ye(this,this[o],o,r)))}return!1}delete(n,r){const o=this;let l=!1;function a(s){if(s=Z(s),s){const d=m.findKey(o,s);d&&(!r||ye(o,o[d],d,r))&&(delete o[d],l=!0)}}return m.isArray(n)?n.forEach(a):a(n),l}clear(n){const r=Object.keys(this);let o=r.length,l=!1;for(;o--;){const a=r[o];(!n||ye(this,this[a],a,n,!0))&&(delete this[a],l=!0)}return l}normalize(n){const r=this,o={};return m.forEach(this,(l,a)=>{const s=m.findKey(o,a);if(s){r[s]=re(l),delete r[a];return}const d=n?Dn(a):String(a).trim();d!==a&&delete r[a],r[d]=re(l),o[d]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return m.forEach(this,(o,l)=>{o!=null&&o!==!1&&(r[l]=n&&m.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const o=new this(n);return r.forEach(l=>o.set(l)),o}static accessor(n){const o=(this[Ye]=this[Ye]={accessors:{}}).accessors,l=this.prototype;function a(s){const d=Z(s);o[d]||(Fn(l,s),o[d]=!0)}return m.isArray(n)?n.forEach(a):a(n),this}};O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),m.reduceDescriptors(O.prototype,({value:t},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(o){this[r]=o}}}),m.freezeMethods(O);function ge(t,n){const r=this||X,o=n||r,l=O.from(o.headers);let a=o.data;return m.forEach(t,function(d){a=d.call(r,a,l.normalize(),n?n.status:void 0)}),l.normalize(),a}function Qe(t){return!!(t&&t.__CANCEL__)}function W(t,n,r){B.call(this,t??"canceled",B.ERR_CANCELED,n,r),this.name="CanceledError"}m.inherits(W,B,{__CANCEL__:!0});function Ge(t,n,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?t(r):n(new B("Request failed with status code "+r.status,[B.ERR_BAD_REQUEST,B.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $n(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function Mn(t,n){t=t||10;const r=new Array(t),o=new Array(t);let l=0,a=0,s;return n=n!==void 0?n:1e3,function(i){const f=Date.now(),u=o[a];s||(s=f),r[l]=i,o[l]=f;let c=a,h=0;for(;c!==l;)h+=r[c++],c=c%t;if(l=(l+1)%t,l===a&&(a=(a+1)%t),f-s<n)return;const C=u&&f-u;return C?Math.round(h*1e3/C):void 0}}function Ln(t,n){let r=0,o=1e3/n,l,a;const s=(f,u=Date.now())=>{r=u,l=null,a&&(clearTimeout(a),a=null),t(...f)};return[(...f)=>{const u=Date.now(),c=u-r;c>=o?s(f,u):(l=f,a||(a=setTimeout(()=>{a=null,s(l)},o-c)))},()=>l&&s(l)]}const le=(t,n,r=3)=>{let o=0;const l=Mn(50,250);return Ln(a=>{const s=a.loaded,d=a.lengthComputable?a.total:void 0,i=s-o,f=l(i),u=s<=d;o=s;const c={loaded:s,total:d,progress:d?s/d:void 0,bytes:i,rate:f||void 0,estimated:f&&d&&u?(d-s)/f:void 0,event:a,lengthComputable:d!=null,[n?"download":"upload"]:!0};t(c)},r)},Xe=(t,n)=>{const r=t!=null;return[o=>n[0]({lengthComputable:r,total:t,loaded:o}),n[1]]},Ze=t=>(...n)=>m.asap(()=>t(...n)),jn=A.hasStandardBrowserEnv?((t,n)=>r=>(r=new URL(r,A.origin),t.protocol===r.protocol&&t.host===r.host&&(n||t.port===r.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,Pn=A.hasStandardBrowserEnv?{write(t,n,r,o,l,a){const s=[t+"="+encodeURIComponent(n)];m.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),m.isString(o)&&s.push("path="+o),m.isString(l)&&s.push("domain="+l),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Un(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zn(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function ve(t,n,r){let o=!Un(n);return t&&(o||r==!1)?zn(t,n):n}const et=t=>t instanceof O?{...t}:t;function I(t,n){n=n||{};const r={};function o(f,u,c,h){return m.isPlainObject(f)&&m.isPlainObject(u)?m.merge.call({caseless:h},f,u):m.isPlainObject(u)?m.merge({},u):m.isArray(u)?u.slice():u}function l(f,u,c,h){if(m.isUndefined(u)){if(!m.isUndefined(f))return o(void 0,f,c,h)}else return o(f,u,c,h)}function a(f,u){if(!m.isUndefined(u))return o(void 0,u)}function s(f,u){if(m.isUndefined(u)){if(!m.isUndefined(f))return o(void 0,f)}else return o(void 0,u)}function d(f,u,c){if(c in n)return o(f,u);if(c in t)return o(void 0,f)}const i={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:d,headers:(f,u,c)=>l(et(f),et(u),c,!0)};return m.forEach(Object.keys({...t,...n}),function(u){const c=i[u]||l,h=c(t[u],n[u],u);m.isUndefined(h)&&c!==d||(r[u]=h)}),r}const tt=t=>{const n=I({},t);let{data:r,withXSRFToken:o,xsrfHeaderName:l,xsrfCookieName:a,headers:s,auth:d}=n;n.headers=s=O.from(s),n.url=He(ve(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),d&&s.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let i;if(m.isFormData(r)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((i=s.getContentType())!==!1){const[f,...u]=i?i.split(";").map(c=>c.trim()).filter(Boolean):[];s.setContentType([f||"multipart/form-data",...u].join("; "))}}if(A.hasStandardBrowserEnv&&(o&&m.isFunction(o)&&(o=o(n)),o||o!==!1&&jn(n.url))){const f=l&&a&&Pn.read(a);f&&s.set(l,f)}return n},In=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,o){const l=tt(t);let a=l.data;const s=O.from(l.headers).normalize();let{responseType:d,onUploadProgress:i,onDownloadProgress:f}=l,u,c,h,C,g;function x(){C&&C(),g&&g(),l.cancelToken&&l.cancelToken.unsubscribe(u),l.signal&&l.signal.removeEventListener("abort",u)}let E=new XMLHttpRequest;E.open(l.method.toUpperCase(),l.url,!0),E.timeout=l.timeout;function V(){if(!E)return;const k=O.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),p={data:!d||d==="text"||d==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:k,config:t,request:E};Ge(function(S){r(S),x()},function(S){o(S),x()},p),E=null}"onloadend"in E?E.onloadend=V:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(V)},E.onabort=function(){E&&(o(new B("Request aborted",B.ECONNABORTED,t,E)),E=null)},E.onerror=function(){o(new B("Network Error",B.ERR_NETWORK,t,E)),E=null},E.ontimeout=function(){let y=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const p=l.transitional||We;l.timeoutErrorMessage&&(y=l.timeoutErrorMessage),o(new B(y,p.clarifyTimeoutError?B.ETIMEDOUT:B.ECONNABORTED,t,E)),E=null},a===void 0&&s.setContentType(null),"setRequestHeader"in E&&m.forEach(s.toJSON(),function(y,p){E.setRequestHeader(p,y)}),m.isUndefined(l.withCredentials)||(E.withCredentials=!!l.withCredentials),d&&d!=="json"&&(E.responseType=l.responseType),f&&([h,g]=le(f,!0),E.addEventListener("progress",h)),i&&E.upload&&([c,C]=le(i),E.upload.addEventListener("progress",c),E.upload.addEventListener("loadend",C)),(l.cancelToken||l.signal)&&(u=k=>{E&&(o(!k||k.type?new W(null,t,E):k),E.abort(),E=null)},l.cancelToken&&l.cancelToken.subscribe(u),l.signal&&(l.signal.aborted?u():l.signal.addEventListener("abort",u)));const w=$n(l.url);if(w&&A.protocols.indexOf(w)===-1){o(new B("Unsupported protocol "+w+":",B.ERR_BAD_REQUEST,t));return}E.send(a||null)})},qn=(t,n)=>{const{length:r}=t=t?t.filter(Boolean):[];if(n||r){let o=new AbortController,l;const a=function(f){if(!l){l=!0,d();const u=f instanceof Error?f:this.reason;o.abort(u instanceof B?u:new W(u instanceof Error?u.message:u))}};let s=n&&setTimeout(()=>{s=null,a(new B(`timeout ${n} of ms exceeded`,B.ETIMEDOUT))},n);const d=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),t=null)};t.forEach(f=>f.addEventListener("abort",a));const{signal:i}=o;return i.unsubscribe=()=>m.asap(d),i}},Hn=function*(t,n){let r=t.byteLength;if(r<n){yield t;return}let o=0,l;for(;o<r;)l=o+n,yield t.slice(o,l),o=l},Kn=async function*(t,n){for await(const r of Wn(t))yield*Hn(r,n)},Wn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:r,value:o}=await n.read();if(r)break;yield o}}finally{await n.cancel()}},nt=(t,n,r,o)=>{const l=Kn(t,n);let a=0,s,d=i=>{s||(s=!0,o&&o(i))};return new ReadableStream({async pull(i){try{const{done:f,value:u}=await l.next();if(f){d(),i.close();return}let c=u.byteLength;if(r){let h=a+=c;r(h)}i.enqueue(new Uint8Array(u))}catch(f){throw d(f),f}},cancel(i){return d(i),l.return()}},{highWaterMark:2})},ae=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ot=ae&&typeof ReadableStream=="function",Jn=ae&&(typeof TextEncoder=="function"?(t=>n=>t.encode(n))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),rt=(t,...n)=>{try{return!!t(...n)}catch{return!1}},Yn=ot&&rt(()=>{let t=!1;const n=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!n}),lt=64*1024,be=ot&&rt(()=>m.isReadableStream(new Response("").body)),se={stream:be&&(t=>t.body)};ae&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!se[n]&&(se[n]=m.isFunction(t[n])?r=>r[n]():(r,o)=>{throw new B(`Response type '${n}' is not supported`,B.ERR_NOT_SUPPORT,o)})})})(new Response);const Qn=async t=>{if(t==null)return 0;if(m.isBlob(t))return t.size;if(m.isSpecCompliantForm(t))return(await new Request(A.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(m.isArrayBufferView(t)||m.isArrayBuffer(t))return t.byteLength;if(m.isURLSearchParams(t)&&(t=t+""),m.isString(t))return(await Jn(t)).byteLength},Gn=async(t,n)=>{const r=m.toFiniteNumber(t.getContentLength());return r??Qn(n)},ke={http:gn,xhr:In,fetch:ae&&(async t=>{let{url:n,method:r,data:o,signal:l,cancelToken:a,timeout:s,onDownloadProgress:d,onUploadProgress:i,responseType:f,headers:u,withCredentials:c="same-origin",fetchOptions:h}=tt(t);f=f?(f+"").toLowerCase():"text";let C=qn([l,a&&a.toAbortSignal()],s),g;const x=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let E;try{if(i&&Yn&&r!=="get"&&r!=="head"&&(E=await Gn(u,o))!==0){let p=new Request(n,{method:"POST",body:o,duplex:"half"}),b;if(m.isFormData(o)&&(b=p.headers.get("content-type"))&&u.setContentType(b),p.body){const[S,j]=Xe(E,le(Ze(i)));o=nt(p.body,lt,S,j)}}m.isString(c)||(c=c?"include":"omit");const V="credentials"in Request.prototype;g=new Request(n,{...h,signal:C,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:V?c:void 0});let w=await fetch(g,h);const k=be&&(f==="stream"||f==="response");if(be&&(d||k&&x)){const p={};["status","statusText","headers"].forEach(N=>{p[N]=w[N]});const b=m.toFiniteNumber(w.headers.get("content-length")),[S,j]=d&&Xe(b,le(Ze(d),!0))||[];w=new Response(nt(w.body,lt,S,()=>{j&&j(),x&&x()}),p)}f=f||"text";let y=await se[m.findKey(se,f)||"text"](w,t);return!k&&x&&x(),await new Promise((p,b)=>{Ge(p,b,{data:y,headers:O.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:g})})}catch(V){throw x&&x(),V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)?Object.assign(new B("Network Error",B.ERR_NETWORK,t,g),{cause:V.cause||V}):B.from(V,V&&V.code,t,g)}})};m.forEach(ke,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch{}Object.defineProperty(t,"adapterName",{value:n})}});const at=t=>`- ${t}`,Xn=t=>m.isFunction(t)||t===null||t===!1,st={getAdapter:t=>{t=m.isArray(t)?t:[t];const{length:n}=t;let r,o;const l={};for(let a=0;a<n;a++){r=t[a];let s;if(o=r,!Xn(r)&&(o=ke[(s=String(r)).toLowerCase()],o===void 0))throw new B(`Unknown adapter '${s}'`);if(o)break;l[s||"#"+a]=o}if(!o){const a=Object.entries(l).map(([d,i])=>`adapter ${d} `+(i===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
4
+ `+a.map(at).join(`
5
+ `):" "+at(a[0]):"as no adapter specified";throw new B("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return o},adapters:ke};function we(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new W(null,t)}function it(t){return we(t),t.headers=O.from(t.headers),t.data=ge.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),st.getAdapter(t.adapter||X.adapter)(t).then(function(o){return we(t),o.data=ge.call(t,t.transformResponse,o),o.headers=O.from(o.headers),o},function(o){return Qe(o)||(we(t),o&&o.response&&(o.response.data=ge.call(t,t.transformResponse,o.response),o.response.headers=O.from(o.response.headers))),Promise.reject(o)})}const ct="1.11.0",ie={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{ie[t]=function(o){return typeof o===t||"a"+(n<1?"n ":" ")+t}});const dt={};ie.transitional=function(n,r,o){function l(a,s){return"[Axios v"+ct+"] Transitional option '"+a+"'"+s+(o?". "+o:"")}return(a,s,d)=>{if(n===!1)throw new B(l(s," has been removed"+(r?" in "+r:"")),B.ERR_DEPRECATED);return r&&!dt[s]&&(dt[s]=!0,console.warn(l(s," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(a,s,d):!0}},ie.spelling=function(n){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${n}`),!0)};function Zn(t,n,r){if(typeof t!="object")throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let l=o.length;for(;l-- >0;){const a=o[l],s=n[a];if(s){const d=t[a],i=d===void 0||s(d,a,t);if(i!==!0)throw new B("option "+a+" must be "+i,B.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new B("Unknown option "+a,B.ERR_BAD_OPTION)}}const ce={assertOptions:Zn,validators:ie},F=ce.validators;let q=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Ke,response:new Ke}}async request(n,r){try{return await this._request(n,r)}catch(o){if(o instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const a=l.stack?l.stack.replace(/^.+\n/,""):"";try{o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
+ `+a):o.stack=a}catch{}}throw o}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=I(this.defaults,r);const{transitional:o,paramsSerializer:l,headers:a}=r;o!==void 0&&ce.assertOptions(o,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),l!=null&&(m.isFunction(l)?r.paramsSerializer={serialize:l}:ce.assertOptions(l,{encode:F.function,serialize:F.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ce.assertOptions(r,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=a&&m.merge(a.common,a[r.method]);a&&m.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),r.headers=O.concat(s,a);const d=[];let i=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(i=i&&x.synchronous,d.unshift(x.fulfilled,x.rejected))});const f=[];this.interceptors.response.forEach(function(x){f.push(x.fulfilled,x.rejected)});let u,c=0,h;if(!i){const g=[it.bind(this),void 0];for(g.unshift(...d),g.push(...f),h=g.length,u=Promise.resolve(r);c<h;)u=u.then(g[c++],g[c++]);return u}h=d.length;let C=r;for(c=0;c<h;){const g=d[c++],x=d[c++];try{C=g(C)}catch(E){x.call(this,E);break}}try{u=it.call(this,C)}catch(g){return Promise.reject(g)}for(c=0,h=f.length;c<h;)u=u.then(f[c++],f[c++]);return u}getUri(n){n=I(this.defaults,n);const r=ve(n.baseURL,n.url,n.allowAbsoluteUrls);return He(r,n.params,n.paramsSerializer)}};m.forEach(["delete","get","head","options"],function(n){q.prototype[n]=function(r,o){return this.request(I(o||{},{method:n,url:r,data:(o||{}).data}))}}),m.forEach(["post","put","patch"],function(n){function r(o){return function(a,s,d){return this.request(I(d||{},{method:n,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}q.prototype[n]=r(),q.prototype[n+"Form"]=r(!0)});let vn=class Ct{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const o=this;this.promise.then(l=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](l);o._listeners=null}),this.promise.then=l=>{let a;const s=new Promise(d=>{o.subscribe(d),a=d}).then(l);return s.cancel=function(){o.unsubscribe(a)},s},n(function(a,s,d){o.reason||(o.reason=new W(a,s,d),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=o=>{n.abort(o)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new Ct(function(l){n=l}),cancel:n}}};function eo(t){return function(r){return t.apply(null,r)}}function to(t){return m.isObject(t)&&t.isAxiosError===!0}const xe={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(xe).forEach(([t,n])=>{xe[n]=t});function ut(t){const n=new q(t),r=_e(q.prototype.request,n);return m.extend(r,q.prototype,n,{allOwnKeys:!0}),m.extend(r,n,null,{allOwnKeys:!0}),r.create=function(l){return ut(I(t,l))},r}const _=ut(X);_.Axios=q,_.CanceledError=W,_.CancelToken=vn,_.isCancel=Qe,_.VERSION=ct,_.toFormData=oe,_.AxiosError=B,_.Cancel=_.CanceledError,_.all=function(n){return Promise.all(n)},_.spread=eo,_.isAxiosError=to,_.mergeConfig=I,_.AxiosHeaders=O,_.formToJSON=t=>Je(m.isHTMLForm(t)?new FormData(t):t),_.getAdapter=st.getAdapter,_.HttpStatusCode=xe,_.default=_;const{Axios:dl,AxiosError:ul,CanceledError:fl,isCancel:pl,CancelToken:ml,VERSION:hl,all:yl,Cancel:gl,isAxiosError:bl,spread:kl,toFormData:wl,AxiosHeaders:xl,HttpStatusCode:El,formToJSON:Cl,getAdapter:Bl,mergeConfig:Vl}=_;function ft(t,n){const{api:r,options:o=[],limit:l=20,dataKey:a="data"}=t,s=t.type==="checkbox";function d(N){return s?Array.isArray(N)?N:N?[N]:[]:N??""}const i=e.ref(d(t.modelValue)),f=e.ref(""),u=e.ref(!1),c=e.ref([]),h=e.ref("id"),C=e.ref("text"),g=e.ref(!1),x=e.ref(t.layout!=="popover"&&o.length>l);function E(N){const M=N.find(Boolean)??{},U=["id","value","code","key"].find(Se=>Se in M)??"id",nl=["text","label","name","title"].find(Se=>Se in M)??"text";return{autoValueKey:U,autoLabelKey:nl}}if(o.length>0){const N=E(o);h.value=N.autoValueKey,C.value=N.autoLabelKey}const V=e.computed(()=>{if(r)return c.value;const N=c.value;if(t.layout==="popover")return N;if(!f.value)return g.value?N:N.slice(0,l);const M=f.value.toLowerCase();return N.filter(U=>U[C.value].toLowerCase().includes(M))});let w=null;async function k(N){if(r){u.value=!0;try{const M=await _.get(r,{params:{json:1,key:N,limit:l}});if(c.value=M.data[a],c.value.length>0){const U=E(c.value);h.value=U.autoValueKey,C.value=U.autoLabelKey}}catch(M){console.error("Failed to fetch remote options:",M)}finally{u.value=!1}}}e.watch(f,N=>{r&&(w&&clearTimeout(w),w=setTimeout(()=>{k(N)},200))}),e.watch(()=>t.modelValue,N=>{i.value=d(N)},{immediate:!0}),r?k(""):c.value=o;function y(N){return s&&Array.isArray(i.value)?i.value.includes(N[h.value]):i.value===N[h.value]}function p(N){if(s&&!Array.isArray(i.value)&&(i.value=[]),s&&Array.isArray(i.value)){const M=i.value.includes(N[h.value]);i.value=M?i.value.filter(U=>U!==N[h.value]):[...i.value,N[h.value]]}else i.value=N[h.value];n("update:modelValue",i.value),n("change",{name:t.name,value:i.value})}function b(){s?i.value=[]:i.value=void 0,n("update:modelValue",i.value),n("clear",t.name)}function S(){w&&clearTimeout(w),f.value="",g.value=!1}function j(){g.value=!g.value}return e.onBeforeUnmount(()=>{w&&clearTimeout(w)}),{innerValue:i,searchTerm:f,filteredOptions:V,isSelected:y,selectItem:p,clear:b,resetSearch:S,toggleShowAll:j,isReqProc:u,showAll:g,isEnableShowAll:x,labelKey:C,valueKey:h,allOptions:c}}const $=(t,n)=>{const r=t.__vccOpts||t;for(const[o,l]of n)r[o]=l;return r},no={},oo={class:"w-48 mx-auto",viewBox:"0 0 178 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ro(t,n){return e.openBlock(),e.createElementBlock("svg",oo,n[0]||(n[0]=[e.createStaticVNode('<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>',12)]))}const pt=$(no,[["render",ro]]),lo={},ao={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-chevron-down w-[14px] rotate"};function so(t,n){return e.openBlock(),e.createElementBlock("svg",ao,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Ee=$(lo,[["render",so]]),io={},co={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-chevron-down w-[14px] rotate-[180deg]"};function uo(t,n){return e.openBlock(),e.createElementBlock("svg",co,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const mt=$(io,[["render",uo]]),fo={key:0,class:"h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center"},po={key:1,class:"w-full"},mo={class:"flex flex-col items-center justify-center p-5 text-center"},ho={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},yo={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},ht=e.defineComponent({__name:"radio",props:{id:{},name:{},type:{},label:{},width:{},options:{default:()=>[]},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=t,l=e.ref(null),a=r,{innerValue:s,searchTerm:d,filteredOptions:i,isSelected:f,selectItem:u,clear:c,resetSearch:h,toggleShowAll:C,isReqProc:g,showAll:x,isEnableShowAll:E,labelKey:V,valueKey:w,allOptions:k}=ft({...o,modelValue:o.modelValue??o.default??""},a);return e.onMounted(()=>{h()}),n({clear:c,inputTextRef:l}),e.watch(()=>o.modelValue,y=>{y===void 0&&(s.value=void 0)}),(y,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([y.layout==="popover"?"flex flex-col h-full":"flex flex-col vs-filter-checkbox"])},[y.type==="select"?(e.openBlock(),e.createElementBlock("div",fo,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=b=>e.isRef(d)?d.value=b:null),class:"w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",type:"text",ref_key:"inputTextRef",ref:l},null,512),[[e.vModelText,e.unref(d)]]),p[7]||(p[7]=e.createElementVNode("svg",{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",class:"icon icon-tabler icons-tabler-outline icon-tabler-search absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"},[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),e.createElementVNode("path",{d:"M21 21l-6 -6"})],-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:p[1]||(p[1]=b=>d.value=""),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2",height:"16",width:"16"},p[6]||(p[6]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([y.layout==="popover"?"flex-1 overflow-y-auto max-h-64 p-2":"",y.layout==="inline"?"flex-1 overflow-y-auto max-h-80":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),b=>(e.openBlock(),e.createBlock(Re,{layout:y.layout,key:b.id,count:b.count,label:b[e.unref(V)],color:b.color,type:"radio",value:b[e.unref(w)],"is-selected":e.unref(f)(b),onItemClick:S=>e.unref(u)(b)},null,8,["layout","count","label","color","value","is-selected","onItemClick"]))),128))],2),y.type==="select"&&e.unref(i).length===0&&!e.unref(g)?(e.openBlock(),e.createElementBlock("div",po,[e.createElementVNode("div",mo,[e.createVNode(pt),p[8]||(p[8]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"За вашим запитом нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])):e.createCommentVNode("",!0),y.layout!=="popover"&&y.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[!e.unref(x)&&e.unref(E)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:p[2]||(p[2]=(...b)=>e.unref(C)&&e.unref(C)(...b)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[p[9]||(p[9]=e.createTextVNode(" Показати більше ")),e.createVNode(Ee)])):e.createCommentVNode("",!0),e.unref(x)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:p[3]||(p[3]=(...b)=>e.unref(C)&&e.unref(C)(...b)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[p[10]||(p[10]=e.createTextVNode(" Показати менше ")),e.createVNode(mt)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),y.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[y.layout==="inline"?(e.openBlock(),e.createElementBlock("div",ho,[e.createTextVNode(e.toDisplayString(e.unref(s)?1:0)+" з "+e.toDisplayString(e.unref(k).length)+" обрано ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:p[4]||(p[4]=(...b)=>e.unref(c)&&e.unref(c)(...b))}," Очистити ",512),[[e.vShow,e.unref(s)!==""&&e.unref(s)!==void 0]])])):e.createCommentVNode("",!0),y.layout==="popover"?(e.openBlock(),e.createElementBlock("div",yo,[e.createElementVNode("span",null,e.toDisplayString(e.unref(s)?1:0)+" з "+e.toDisplayString(e.unref(k).length)+" обрано",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:p[5]||(p[5]=(...b)=>e.unref(c)&&e.unref(c)(...b))}," Очистити ",512),[[e.vShow,e.unref(s)!==""&&e.unref(s)!==void 0]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2))}}),go={key:0,class:"h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center"},bo={key:1,class:"w-full"},ko={class:"flex flex-col items-center justify-center p-5 text-center"},wo={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},xo={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},Ce=e.defineComponent({__name:"checkbox",props:{id:{},name:{},type:{},label:{},width:{},options:{default:()=>[]},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=t,l=r,a=e.ref(null),{innerValue:s,filteredOptions:d,isSelected:i,selectItem:f,clear:u,resetSearch:c,toggleShowAll:h,isReqProc:C,showAll:g,isEnableShowAll:x,searchTerm:E,labelKey:V,valueKey:w,allOptions:k}=ft({...o,type:"checkbox",modelValue:o.modelValue},l);return e.onMounted(()=>{c()}),e.watch(()=>o.modelValue,y=>{y===void 0&&(s.value=[])}),n({clear:u,inputTextRef:a}),(y,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([y.layout==="popover"?"flex flex-col h-full":"flex flex-col vs-filter-checkbox space-y-0.5"])},[y.type==="select"?(e.openBlock(),e.createElementBlock("div",go,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=b=>e.isRef(E)?E.value=b:null),class:"w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",type:"text",ref_key:"inputTextRef",ref:a},null,512),[[e.vModelText,e.unref(E)]]),p[7]||(p[7]=e.createElementVNode("svg",{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",class:"icon icon-tabler icons-tabler-outline icon-tabler-search absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"},[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),e.createElementVNode("path",{d:"M21 21l-6 -6"})],-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:p[1]||(p[1]=b=>E.value=""),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2",height:"16",width:"16"},p[6]||(p[6]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([y.layout==="popover"?"flex-1 overflow-y-auto max-h-64 p-2":"",y.layout==="inline"?"flex-1 overflow-y-auto max-h-80":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),b=>(e.openBlock(),e.createBlock(Re,{layout:y.layout,count:b.count,label:b[e.unref(V)],color:b.color,type:"checkbox",value:b[e.unref(w)],"is-selected":e.unref(i)(b),onItemClick:S=>e.unref(f)(b)},null,8,["layout","count","label","color","value","is-selected","onItemClick"]))),256))],2),y.type==="select"&&e.unref(d).length===0&&!e.unref(C)?(e.openBlock(),e.createElementBlock("div",bo,[e.createElementVNode("div",ko,[e.createVNode(pt),p[8]||(p[8]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"За вашим запитом нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])):e.createCommentVNode("",!0),y.layout!=="popover"&&y.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[!e.unref(g)&&e.unref(x)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:p[2]||(p[2]=(...b)=>e.unref(h)&&e.unref(h)(...b)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[p[9]||(p[9]=e.createTextVNode(" Показати більше ")),e.createVNode(Ee)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:p[3]||(p[3]=(...b)=>e.unref(h)&&e.unref(h)(...b)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[p[10]||(p[10]=e.createTextVNode(" Показати менше ")),e.createVNode(mt)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),y.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[y.layout==="inline"?(e.openBlock(),e.createElementBlock("div",wo,[e.createTextVNode(e.toDisplayString(e.unref(s).length)+" з "+e.toDisplayString(e.unref(k).length)+" обрано ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:p[4]||(p[4]=(...b)=>e.unref(u)&&e.unref(u)(...b))}," Очистити ",512),[[e.vShow,e.unref(s).length!==0]])])):e.createCommentVNode("",!0),y.layout==="popover"?(e.openBlock(),e.createElementBlock("div",xo,[e.createElementVNode("span",null,e.toDisplayString(e.unref(s).length)+" з "+e.toDisplayString(e.unref(k).length)+" обрано",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:p[5]||(p[5]=(...b)=>e.unref(u)&&e.unref(u)(...b))}," Очистити ",512),[[e.vShow,e.unref(s).length!==0]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2))}}),Eo={},Co={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"15px",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-search stroke-gray-500 transition-all"};function Bo(t,n){return e.openBlock(),e.createElementBlock("svg",Co,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),e.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)]))}const Vo=$(Eo,[["render",Bo]]),No={},So={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x stroke-gray-500 hover:stroke-red-500 transition-all",width:"15px",height:"15px"};function Ro(t,n){return e.openBlock(),e.createElementBlock("svg",So,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)]))}const _o=$(No,[["render",Ro]]);class Be{static getWidthClass(n){return typeof n=="number"?`max-w-[${n}px]`:typeof n=="string"?n.endsWith("%")||n.endsWith("px")?`max-w-[${n}]`:`max-w-${n}`:"w-full"}}const Ao={class:"absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"},To=["placeholder"],Oo=e.defineComponent({__name:"text-input",props:{id:{},name:{},type:{},label:{},width:{default:220},options:{},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{emit:n}){const r=t,o=e.ref((r.placeHolder||r.label).toString()),l=n,a=e.ref(r.modelValue??"");e.watch(()=>r.modelValue,i=>{i!==a.value&&(a.value=i??"")});function s(){l("update:modelValue",a.value),l("change",{name:r.name,value:a.value})}function d(){a.value="",l("update:modelValue",""),l("clear",r.name)}return(i,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vs-form-text relative bg-white rounded-lg [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",i.layout==="inline"?e.unref(Be).getWidthClass(i.width):"w-full mb-2"])},[e.createElementVNode("div",Ao,[e.createVNode(Vo)]),a.value!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:d,class:"absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"},[e.createVNode(_o)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":f[0]||(f[0]=u=>a.value=u),onInput:s,placeholder:o.value,class:"!pr-7 !pl-8 bg-white h-[38px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,40,To),[[e.vModelText,a.value]])],2))}});function yt(t={color:"blue"}){return e.computed(()=>{const r=`w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${t.color}-500 focus:border-transparent`;return t?.size==="sm"?`${r}h-[32px]`:`${r}h-[38px]`})}function Do(){return"rounded-md font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 px-4 py-2 w-full bg-transparent border text-black text-sm h-[38px]"}function Fo(){return"font-medium border-solid disabled:pointer-events-none disabled:opacity-50 border h-7 rounded-md text-xs px-2 py-1 hover:bg-gray-100"}function $o(t){return t==="ghost"?"inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400":t==="soft"?"inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900":"relative focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-2 bg-transparent h-[38px]"}const Mo={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},Lo=["placeholder","disabled"],jo={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},Po={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},Uo=["placeholder","disabled"],zo=["disabled"],Nl={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},Sl={key:1,class:"flex justify-end items-center text-xs text-gray-500 p-1 border-t"},Io=e.defineComponent({__name:"range-input",props:{id:{},name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=yt(),l=Do(),a=t,s=e.ref(a.modelValue??a.default??[]),d=r,i=e.computed({get:()=>a.modelValue??s.value,set:c=>{a.modelValue!==void 0?d("update:modelValue",c):s.value=c}});function f(){d("change",{name:a.name,value:i.value||s.value})}function u(){s.value=[],i.value=s.value,d("clear",a.name)}return e.watch(()=>a.modelValue,c=>{c!==void 0&&a.layout!=="popover"?(s.value=c,d("update:modelValue",c)):s.value=[]}),n({clear:u,currentValue:i}),(c,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(c.layout==="vertical"?"inline-flex items-center gap-2":"space-y-3 p-2")},[e.createElementVNode("div",null,[c.layout!=="vertical"?(e.openBlock(),e.createElementBlock("label",Mo,"Від")):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"number",class:e.normalizeClass(e.unref(o)),placeholder:c.placeHolder?.[0]??"min",step:"1",style:{outline:"none"},"onUpdate:modelValue":h[0]||(h[0]=C=>i.value[0]=C),disabled:c.disabled},null,10,Lo),[[e.vModelText,i.value[0]]])]),c.layout==="vertical"?(e.openBlock(),e.createElementBlock("label",jo," - ")):e.createCommentVNode("",!0),e.createElementVNode("div",null,[c.layout!=="vertical"?(e.openBlock(),e.createElementBlock("label",Po,"До")):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"number",class:e.normalizeClass(e.unref(o)),placeholder:c.placeHolder?.[1]??"max",min:"0",max:"1000000000000000",step:"1",style:{outline:"none"},"onUpdate:modelValue":h[1]||(h[1]=C=>i.value[1]=C),disabled:c.disabled},null,10,Uo),[[e.vModelText,i.value[1]]])]),["popover","inline","vertical"].includes(c.layout)?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:f,class:e.normalizeClass(e.unref(l)+(c.layout==="vertical"?" w-[50px]":" bg-blue-100 hover:bg-blue-200"))},e.toDisplayString(c.layout==="vertical"?"Ok":"Застосувати"),3)):e.createCommentVNode("",!0),["popover","inline"].includes(c.layout)?(e.openBlock(),e.createElementBlock("button",{key:2,disabled:!(i.value[0]||i.value[1]),onClick:u,class:e.normalizeClass(e.unref(l)+" hover:bg-gray-100")},"Очистити",10,zo)):e.createCommentVNode("",!0)],2)]),(c.cleanable&&s.value.length,e.createCommentVNode("",!0))],64))}}),qo=["disabled","title"],Ho={key:0,class:"absolute top-0 end-0 inline-flex min-h-[10px] min-w-[10px] z-10 items-center py-0.5 rounded-full text-xs font-medium transform -translate-y-1/2 translate-x-1/2 bg-blue-600 text-white px-1"},Ko={class:"w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full"},Wo={class:"w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-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 before:w-full p-2"},gt=e.defineComponent({__name:"popover-field",props:{disabled:{type:Boolean,default:!1},label:{},currentValue:{},fieldRef:{},width:{},mode:{},layout:{}},setup(t,{expose:n}){const r=t,o=e.computed(()=>$o(r.mode)),l=e.ref(!1),a=e.ref({top:0,left:0}),s=e.ref(null),d=e.ref(null),i=e.ref(null);function f(){const g=d.value,x=i.value;if(!g||!x)return;const E=g.getBoundingClientRect();a.value={top:E.bottom+8,left:E.left}}function u(){l.value=!l.value,l.value&&e.nextTick(()=>{f(),r.fieldRef?.inputTextRef&&r.fieldRef?.inputTextRef.focus()})}function c(g){!s.value?.contains(g.target)&&!i.value?.contains(g.target)&&(l.value=!1)}function h(g){g.key==="Escape"&&(l.value=!1)}e.onMounted(()=>{document.addEventListener("click",c,!0),document.addEventListener("keydown",h),window.addEventListener("scroll",f,!0)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",c,!0),document.removeEventListener("keydown",h),window.removeEventListener("scroll",f,!0)});function C(){l.value=!1}return n({close:C}),(g,x)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{onClick:u,disabled:g.disabled,ref_key:"triggerRef",ref:d,title:g.label,class:e.normalizeClass(o.value+(g.width?e.unref(Be).getWidthClass(g.width):"w-full"))},[e.createElementVNode("span",{class:e.normalizeClass(["truncate text-ellipsis block",g.width?e.unref(Be).getWidthClass(g.width-50):"w-full max-w-[200px]"])},e.toDisplayString(g.label),3),e.createVNode(Ee,{class:"h-4 w-4"}),(Array.isArray(g.currentValue)?g.currentValue===null||g.currentValue.length>0:g.currentValue===null||g.currentValue)&&g.layout==="inline"?(e.openBlock(),e.createElementBlock("span",Ho)):e.createCommentVNode("",!0)],10,qo),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"popperRef",ref:i,class:"vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",style:e.normalizeStyle({top:`${a.value.top}px`,left:`${a.value.left}px`}),"data-inside-popover":""},[e.createElementVNode("div",Ko,[e.createElementVNode("div",Wo,[e.renderSlot(g.$slots,"default")])])],4),[[e.vShow,l.value]])]))]))}});class R{static format(n){const r=n.getFullYear(),o=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0");return`${r}-${o}-${l}`}static getShiftedDay(n,r=0){const o=n?new Date(n):new Date;return o.setDate(o.getDate()+r),this.format(o)}static getLastWeekRange(n,r,o=0){if(n&&r){const f=new Date(n),u=new Date(r);return f.setDate(f.getDate()+o*7),u.setDate(u.getDate()+o*7),[this.format(f),this.format(u)]}const l=new Date,a=l.getDay(),s=a===0?13:a-1+7,d=new Date(l);d.setDate(l.getDate()-s+o*7);const i=new Date(d);return i.setDate(d.getDate()+6),[this.format(d),this.format(i)]}static getMonthRange(n,r,o=0){let l;n?l=new Date(n):l=new Date,l=new Date(l.getFullYear(),l.getMonth()+o,1);const a=l,s=new Date(l.getFullYear(),l.getMonth()+1,0);return[this.format(a),this.format(s)]}static getQuarterRange(n,r,o=0){const l=n||r,a=l?new Date(l):new Date;let s=Math.floor(a.getMonth()/3);s+=o;const d=(s%4+4)%4*3,i=a.getFullYear()+Math.floor(s/4),f=new Date(i,d,1),u=new Date(i,d+3,0);return[this.format(f),this.format(u)]}static getYear(n,r=0){let o;return n&&/^\d{4}$/.test(n)?o=parseInt(n,10):n?o=new Date(n).getFullYear():o=new Date().getFullYear(),String(o+r)}static getYearRange(n,r=0){let o;return n&&/^\d{4}$/.test(n)?o=parseInt(n,10):n?o=new Date(n).getFullYear():o=new Date().getFullYear(),[this.format(new Date(o+r,0,1)),this.format(new Date(o+r+1,0,0))]}static getRangeFromDaysBefore(n){const r=new Date,o=new Date(r.getTime());return o.setDate(r.getDate()-n),[this.format(o),this.format(r)]}}const Jo={},Yo={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:"text-blue-600 w-[16px] h-[16px]"};function Qo(t,n){return e.openBlock(),e.createElementBlock("svg",Yo,n[0]||(n[0]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)]))}const H=$(Jo,[["render",Qo]]),Go={},Xo={xmlns:"http://www.w3.org/2000/svg",width:"15px",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-chevron-down text-gray-800 rotate-[90deg]"};function Zo(t,n){return e.openBlock(),e.createElementBlock("svg",Xo,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const vo=$(Go,[["render",Zo]]),er={},tr={xmlns:"http://www.w3.org/2000/svg",width:"15px",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-chevron-down text-gray-800 rotate-[270deg]"};function nr(t,n){return e.openBlock(),e.createElementBlock("svg",tr,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const or=$(er,[["render",nr]]);function rr(t){return String(t).charAt(0).toUpperCase()+String(t).slice(1)}const lr={class:"mb-1"},ar={class:"mb-1"},sr={class:"inline-flex rounded-lg shrink-0 pl-1"},ir={class:"inline-flex rounded-lg shrink-0 pl-1"},cr={key:1,class:"flex gap-1 !w-[75%] rounded-lg"},dr=["max","disabled"],ur=["min","disabled"],fr={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},pr=["max","disabled"],mr={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},hr={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},yr=["min","disabled"],gr={class:"flex gap-1 pt-2"},br=["onClick"],Rl={key:0,class:"flex justify-end items-center text-xs text-gray-500 p-1 border-t"},bt={radio:ht,checkbox:Ce,check:Ce,text:Oo,range:Io,date:e.defineComponent({__name:"date-input",props:{id:{},name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=t,l=yt(),a=Fo(),s=r,d=e.ref(null),i=e.ref(o.modelValue??o.default??[]),f=e.ref(""),u=e.ref(0);function c(){const y=R.getRangeFromDaysBefore(u.value);return i.value=[...y],s("change",{name:o.name,value:i}),s("update:modelValue",i.value),y}function h(y){f.value=y,d.value?.close();const p=[];switch(f.value){case"today":p.push(R.getShiftedDay()),p.push(R.getShiftedDay());break;case"week":p.push(...R.getLastWeekRange());break;case"month":p.push(...R.getMonthRange());break;case"quarter":p.push(...R.getQuarterRange());break;case"year":p.push(...R.getYearRange());break;case"last_7_days":u.value=7,c();break;case"range":u.value=7,p.push(...c());break}i.value=[...p],s("change",{name:o.name,value:i}),s("update:modelValue",i.value)}function C(){const y=[];switch(f.value){case"today":y.push(R.getShiftedDay(i.value[0],1));break;case"week":y.push(...R.getLastWeekRange(i.value[0],i.value[1],1));break;case"month":y.push(...R.getMonthRange(i.value[0],i.value[1],1));break;case"quarter":y.push(...R.getQuarterRange(i.value[0],i.value[1],1));break;case"year":y.push(...R.getYearRange(i.value[0],1));break}i.value=[...y],s("change",{name:o.name,value:i}),s("update:modelValue",i.value)}function g(){const y=[];switch(f.value){case"today":y.push(R.getShiftedDay(i.value[0],-1));break;case"week":y.push(...R.getLastWeekRange(i.value[0],i.value[1],-1));break;case"month":y.push(...R.getMonthRange(i.value[0],i.value[1],-1));break;case"quarter":y.push(...R.getQuarterRange(i.value[0],i.value[1],-1));break;case"year":y.push(...R.getYearRange(i.value[0],-1));break}i.value=[...y],s("change",{name:o.name,value:i}),s("update:modelValue",i.value)}e.onMounted(()=>{let y=[];if(Array.isArray(o.modelValue)?y=o.modelValue:Array.isArray(o.default)&&(y=o.default),y.length===0)return;const[p,...b]=y;f.value=p;let S=[];switch(p){case"today":S.push(R.getShiftedDay(b[0]));break;case"week":S=R.getLastWeekRange(b[0],b[1]);break;case"month":S=R.getMonthRange(b[0],b[1]);break;case"quarter":S=R.getQuarterRange(b[0],b[1]);break;case"year":S.push(R.getYear(b[0]));break;case"last_7_days":u.value=Number(b[0]??7);return;case"range":i.value=[b[0]??"",b[1]??""];return;default:return}i.value=[...S],s("update:modelValue",i.value)});const x=["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"];function E(y){const[p,b,S]=y.split("-");return`${S}.${b}.${p}`}function V(y){const{value:p}=i;switch(y){case"today":return E(p[0]);case"range":return"Період";case"week":return p[0]&&p[1]?`${E(p[0])} – ${E(p[1])}`:"";case"quarter":if(p[0]){const b=new Date(p[0]),S=b.getFullYear(),j=b.getMonth();return`${Math.floor(j/3)+1} квартал ${S}`}return"";case"month":if(p[0]){const[b,S]=p[0].split("-");return`${x[parseInt(S,10)-1]} ${b}`}return"";case"year":return p[0]||"";case"last_7_days":return"За останні дні";default:return o.label??""}}const w=e.computed(()=>f.value?V(f.value):o.label??"");function k(){f.value="",i.value=[],s("update:modelValue",[]),s("clear",o.name)}return e.watch(()=>o.modelValue,y=>{y!==void 0?(i.value=y,s("update:modelValue",y)):(f.value="",i.value=[])}),e.watch(()=>i.value,y=>{y!==void 0&&s("update:modelValue",y),s("change",{name:o.name,value:i.value})}),n({clear:k,popoverRef:d}),(y,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[y.layout==="inline"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(y.layout!="inline"?"relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap":"flex")},[e.createVNode(gt,{ref_key:"popoverRef",ref:d,label:w.value,"current-value":i.value,mode:y.mode,onClear:k,layout:y.layout},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[0]||(p[0]=b=>h("range")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[p[11]||(p[11]=e.createTextVNode(" Період ")),f.value==="range"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),p[18]||(p[18]=e.createElementVNode("div",null,[e.createElementVNode("div",{class:"pt-1 mt-1 border-t"})],-1)),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[1]||(p[1]=b=>h("today")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[p[12]||(p[12]=e.createTextVNode(" Сьогодні ")),f.value==="today"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[2]||(p[2]=b=>h("week")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[p[13]||(p[13]=e.createTextVNode(" Тиждень ")),f.value==="week"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[3]||(p[3]=b=>h("month")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[p[14]||(p[14]=e.createTextVNode(" Місяць ")),f.value==="month"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[4]||(p[4]=b=>h("quarter")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[p[15]||(p[15]=e.createTextVNode(" Квартал ")),f.value==="quarter"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",lr,[e.createElementVNode("button",{type:"button",onClick:p[5]||(p[5]=b=>h("year")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[p[16]||(p[16]=e.createTextVNode(" Рік ")),f.value==="year"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",ar,[e.createElementVNode("button",{type:"button",onClick:p[6]||(p[6]=b=>k()),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[p[17]||(p[17]=e.createTextVNode(" Весь час ")),i.value[0]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H,{key:0}))])])]),_:1,__:[18]},8,["label","current-value","mode","layout"]),f.value!==""&&f.value!=="range"&&f.value!=="last_7_days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",sr,[e.createElementVNode("button",{type:"button",title:"Попередній період",class:"inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",onClick:g},[e.createVNode(vo)])]),e.createElementVNode("div",ir,[e.createElementVNode("button",{type:"button",title:"Наступний період",class:"inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",onClick:C},[e.createVNode(or)])])],64)):e.createCommentVNode("",!0),f.value!==""&&f.value==="range"?(e.openBlock(),e.createElementBlock("div",cr,[e.withDirectives(e.createElementVNode("input",{type:"date",max:i.value[1],locale:"uk-UA","onUpdate:modelValue":p[7]||(p[7]=b=>i.value[0]=b),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",disabled:y.disabled},null,8,dr),[[e.vModelText,i.value[0]]]),e.withDirectives(e.createElementVNode("input",{type:"date",min:i.value[0],locale:"uk-UA","onUpdate:modelValue":p[8]||(p[8]=b=>i.value[1]=b),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",disabled:y.disabled},null,8,ur),[[e.vModelText,i.value[1]]])])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),y.layout!=="inline"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass(y.layout==="popover"?"space-y-3 p-2":"flex items-center gap-2")},[e.createElementVNode("div",{class:e.normalizeClass(y.layout!=="popover"?"w-[48%]":"")},[y.layout==="popover"?(e.openBlock(),e.createElementBlock("label",fr,"Від")):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"date",max:i.value[1],locale:"uk-UA","onUpdate:modelValue":p[9]||(p[9]=b=>i.value[0]=b),class:e.normalizeClass(e.unref(l)),disabled:y.disabled},null,10,pr),[[e.vModelText,i.value[0]]])],2),y.layout!=="popover"?(e.openBlock(),e.createElementBlock("label",mr," - ")):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(y.layout!=="popover"?"w-[48%]":"")},[y.layout==="popover"?(e.openBlock(),e.createElementBlock("label",hr,"До")):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"date",min:i.value[0],locale:"uk-UA","onUpdate:modelValue":p[10]||(p[10]=b=>i.value[1]=b),class:e.normalizeClass(e.unref(l)),disabled:y.disabled},null,10,yr),[[e.vModelText,i.value[1]]])],2)],2),e.createElementVNode("div",gr,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["today","week","month","quarter","year"],b=>e.createElementVNode("button",{key:b,class:e.normalizeClass(e.unref(a)+(f.value===b?" bg-blue-100":"")),onClick:S=>h(b)},e.toDisplayString(e.unref(rr)(b)),11,br)),64)),e.createElementVNode("button",{class:e.normalizeClass(e.unref(a)),onClick:g}," < ",2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(a)),onClick:C}," > ",2)])],64)):e.createCommentVNode("",!0),(y.cleanable,e.createCommentVNode("",!0))],64))}}),select:ht};function Ve(t,n=!1){let r;switch(t.toLowerCase()){case"autocomplete":r="select";break;case"check":r="checkbox";break;default:r=t.toString().toLowerCase()}return["select"].includes(r)&&n?{component:Ce,type:"select"}:{component:bt[r]||bt.text,type:r}}const kr={},wr={xmlns:"http://www.w3.org/2000/svg",width:"15px",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-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"};function xr(t,n){return e.openBlock(),e.createElementBlock("svg",wr,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"},null,-1),e.createElementVNode("path",{d:"M20 4v5h-5"},null,-1)]))}const Er=$(kr,[["render",xr]]),Cr={style:{display:"inline-flex",margin:"0px",width:"100%"}},Br={class:"relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm"},Vr={class:"block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200"},Nr={class:"flex items-center"},Sr={class:"text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1"},Rr={class:"filter-layout__body"},_r=e.defineComponent({__name:"vertical-layout",props:{id:{},name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=t,l=r,a=e.ref(),s=Ve(o.type,o.multi),d=e.computed({get:()=>o.modelValue,set:c=>l("update:modelValue",c)});function i(c){l("clear",c)}function f(c,h){l("change",{name:c,value:h}),o.modelValue!==void 0&&l("update:modelValue",h)}function u(){a.value&&a.value.clear(),l("clear",o.name)}return e.watch(()=>o.default,c=>{d.value=c}),e.watch(()=>o.modelValue,c=>{d.value=c}),n({filterRef:a}),(c,h)=>(e.openBlock(),e.createElementBlock("div",Cr,[e.createElementVNode("div",Br,[e.createElementVNode("div",Vr,[e.createElementVNode("div",Nr,[e.createElementVNode("span",Sr,e.toDisplayString(c.label),1)]),typeof d.value=="string"&&d.value.trim()!==""||Array.isArray(d.value)&&d.value.length>0&&d.value.some(C=>C!=null&&String(C).trim()!=="")?(e.openBlock(),e.createBlock(Er,{key:0,onClick:u})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Rr,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s)?.component),e.mergeProps(o,{type:e.unref(s)?.type,onChange:h[0]||(h[0]=C=>f(C.name,C.value)),onClear:h[1]||(h[1]=C=>i(C)),ref_key:"filterRef",ref:a}),null,16,["type"]))])])]))}}),kt=e.defineComponent({__name:"inline-layout",props:{id:{},name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=t,l=r,a=e.ref(),s=Ve(o.type,o.multi),d=e.computed({get:()=>o.modelValue,set:c=>l("update:modelValue",c)});function i(c){l("clear",c)}function f(c,h){l("change",{name:c,value:h}),o.modelValue!==void 0&&l("update:modelValue",h)}function u(){a.value&&a.value.clear(),l("clear",o.name)}return e.watch(()=>o.default,c=>{d.value=c}),e.watch(()=>o.modelValue,c=>{d.value=c}),n({filterRef:a}),(c,h)=>["text","date"].includes(c.type.toLocaleLowerCase())?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s)?.component),e.mergeProps({key:0},o,{type:e.unref(s)?.type,onChange:h[0]||(h[0]=C=>f(C.name,C.value)),onClear:h[1]||(h[1]=C=>i(C)),disabled:c.disabled}),null,16,["type","disabled"])):(e.openBlock(),e.createBlock(gt,{key:1,"current-value":d.value,label:c.label,mode:c.mode,onClear:u,fieldRef:a.value,width:o.width,disabled:c.disabled,layout:"inline"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s)?.component),e.mergeProps({ref_key:"filterRef",ref:a},o,{type:e.unref(s)?.type,onChange:h[2]||(h[2]=C=>f(C.name,C.value)),onClear:h[3]||(h[3]=C=>i(C))}),null,16,["type"]))]),_:1},8,["current-value","label","mode","fieldRef","width","disabled"]))}}),Ar=e.defineComponent({__name:"popover-layout",props:{id:{},name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=t,l=r,a=e.ref(),s=e.ref(Ve(o.type,o.multi)),d=e.computed({get:()=>o.modelValue,set:u=>l("update:modelValue",u)});function i(u){l("clear",u)}function f(u,c){l("change",{name:u,value:c}),o.modelValue!==void 0&&l("update:modelValue",c)}return e.watch(()=>o.default,u=>{d.value=u}),e.watch(()=>o.modelValue,u=>{d.value=u}),e.watch(()=>o,u=>{d.value=u}),n({filterRef:a}),(u,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value?.component),e.mergeProps(o,{type:s.value?.type,modelValue:d.value,"onUpdate:modelValue":c[0]||(c[0]=h=>d.value=h),onChange:c[1]||(c[1]=h=>f(h.name,h.value)),onClear:c[2]||(c[2]=h=>i(h)),ref_key:"filterRef",ref:a}),null,16,["type","modelValue"]))}}),P=e.defineComponent({__name:"filter-field",props:{id:{},name:{},type:{},label:{},width:{},options:{default:()=>[]},placeHolder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean,default:!0},dataKey:{},valueKey:{},mode:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=t,l=r,a=e.ref(),s=e.computed({get:()=>o.modelValue,set:u=>l("update:modelValue",u)});function d(u){l("clear",u)}function i(u,c){l("change",{name:u,value:c}),o.modelValue!==void 0&&l("update:modelValue",c)}e.watch(()=>o.default,u=>{s.value=u}),e.watch(()=>o.modelValue,u=>{s.value=u}),n({filterRef:a});function f(){switch(o.layout){case"inline":return kt;case"vertical":return _r;case"popover":return Ar;default:return kt}}return(u,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f()),e.mergeProps(o,{onChange:c[0]||(c[0]=h=>i(h.name,h.value)),onClear:c[1]||(c[1]=h=>d(h)),modelValue:s.value,"onUpdate:modelValue":c[2]||(c[2]=h=>s.value=h)}),null,16,["modelValue"]))}});function Ne(t,n){const{slots:r}=t,o=e.ref(t.value??{}),l=e.computed(()=>(e.toRaw(r?.default?.())??[]).flatMap(k=>Array.isArray(k.children)?k.children:[k]));function a(w){delete o.value[w],n("clear",{data:e.toRaw(o.value),name:w})}function s(w,k){k===void 0?(a(w),n("change",{data:e.toRaw(o.value),name:w,undefined:void 0})):o.value={...o.value,[w]:k},n("change",{data:e.toRaw(o.value),name:w,value:k})}const d=e.computed(()=>l.value.map(w=>{const k=w.props?.name;return e.cloneVNode(w,{...w.props,layout:t.view,showClean:!0,modelValue:o[k],"onUpdate:modelValue":y=>{s(k,y)},onClear:()=>a(k)})})),i=e.computed(()=>new Map(d.value.map(w=>{const k=w.props?.name;return k?[k,w]:null}).filter(w=>w!==null)));function f(){o.value={},n("clearAll",{data:e.toRaw(o.value),name:"ALL"})}const u=e.ref(""),c=e.computed(()=>Object.values(o.value).filter(w=>Array.isArray(w)?w.some(k=>k!==""&&k!==null&&k!==void 0):w!==""&&w!==null&&w!==void 0).length),h=e.ref();e.watch(u,async()=>{await e.nextTick(),h?.value?.filterRef?.inputTextRef&&h.value.filterRef.inputTextRef.focus()});const C=e.computed(()=>t.schema?.value?Object.fromEntries(Object.entries(t.schema?.value).slice(0,t.limit)):{}),g=e.computed(()=>t.schema?.value?t.view!=="inline"?t.schema?.value:Object.fromEntries(Object.entries(t.schema?.value).slice(t.limit)):{}),x=e.computed(()=>{if(d.value.length===0)return[];let w=0;if(t.schema?.value){const k=Object.entries(t.schema.value).length;k<t.limit?w=t.limit-k:w=0}return d.value.slice(0,w)}),E=e.computed(()=>d.value.length===0?[]:t.view!=="inline"?d.value:d.value.slice(x.value.length));function V(){if(g.value){const[w]=Object.keys(g.value);u.value=w}else E.value.length>0?u.value=E.value[0].props.name:u.value=""}return{activeFilter:o,activeFilterCount:c,onFilterChange:s,clearFilter:a,clearAllFilters:f,limitedSchema:C,popoverSchema:g,filtersSlot:d,limitedFiltersSlot:x,popoverFiltersSlot:E,vnodeMap:i,onPopoverOpen:V,selectedFilter:u,filterRef:h}}const Tr=e.defineComponent({__name:"popover",emits:["open","close"],setup(t,{emit:n}){const r=e.ref(!1),o=e.ref(null),l=e.ref(null),a=e.ref(null),s=e.ref({top:"0px",left:"0px",position:"absolute"});function d(){r.value=!r.value}function i(){const c=a.value,h=o.value;if(!c||!h)return;const C=c.getBoundingClientRect();s.value={position:"absolute",top:`${C.bottom+window.scrollY+8}px`,left:`${C.left+window.scrollX}px`}}function f(c){const h=c.target;!a.value?.contains(c.target)&&!o.value?.contains(c.target)&&!h.closest("[data-inside-popover]")&&(r.value=!1)}e.onMounted(()=>{a.value=l.value?.querySelector("[data-popover-trigger]")||null,a.value?.addEventListener("click",d),document.addEventListener("click",f),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0)}),e.onBeforeUnmount(()=>{a.value?.removeEventListener("click",d),document.removeEventListener("click",f),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0)});const u=n;return e.watch(r,async c=>{c?(await e.nextTick(i),u("open")):u("close")}),(c,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:l},[e.renderSlot(c.$slots,"trigger"),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:o,class:"absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",style:e.normalizeStyle(s.value)},[e.renderSlot(c.$slots,"default")],4)):e.createCommentVNode("",!0)]))],512))}}),Or={},Dr={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-filter h-4 w-4"};function Fr(t,n){return e.openBlock(),e.createElementBlock("svg",Dr,n[0]||(n[0]=[e.createElementVNode("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"},null,-1)]))}const $r=$(Or,[["render",Fr]]),Mr={key:0,class:"inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-500 text-white text-xs px-1.5 py-0.5"},Lr={class:"flex"},jr={class:"w-64 border-r border-gray-200"},Pr={class:"p-2"},Ur=["onClick"],zr={class:"flex items-center gap-2"},Ir={class:"text-sm font-medium"},qr={key:0,class:"inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"},Hr=["onClick"],Kr={class:"flex items-center gap-2"},Wr={class:"text-sm font-medium"},Jr={key:0,class:"inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"},Yr={key:0,class:"p-2 border-t"},Qr={class:"flex-1 min-h-[300px] overflow-y-auto"},Gr={key:0,class:"flex items-center justify-center h-full text-gray-500"},wt=e.defineComponent({__name:"popover-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3}},emits:["change","clear","clearAll"],setup(t,{expose:n,emit:r}){const o=t,l=e.useSlots(),a=r,s=e.ref({}),{activeFilter:d,activeFilterCount:i,onFilterChange:f,clearFilter:u,clearAllFilters:c,popoverSchema:h,popoverFiltersSlot:C,onPopoverOpen:g,selectedFilter:x,filterRef:E}=Ne({...o,schema:s,slots:l},a);return e.watch(()=>o.schema,V=>{s.value=V},{deep:!0,immediate:!0}),n({clearFilter:u,clearAllFilters:c}),(V,w)=>(e.openBlock(),e.createBlock(Tr,{onOpen:e.unref(g),onClose:w[5]||(w[5]=k=>x.value="")},{trigger:e.withCtx(()=>[e.createElementVNode("button",{"data-popover-trigger":"","aria-haspopup":"dialog","aria-expanded":"false",class:e.normalizeClass(["ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input hover:bg-accent hover:text-accent-foreground border px-4 py-2 gap-2 bg-transparent h-[38px]",e.unref(i)>0?"bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100":"text-gray-800 hover:bg-gray-200 focus:bg-gray-200"]),type:"button"},[e.createVNode($r),w[6]||(w[6]=e.createTextVNode(" Фільтр ")),e.unref(i)>0?(e.openBlock(),e.createElementBlock("div",Mr,e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)],2)]),default:e.withCtx(()=>[e.createElementVNode("div",Lr,[e.createElementVNode("div",jr,[w[7]||(w[7]=e.createElementVNode("div",{class:"p-4 border-b"},[e.createElementVNode("p",{class:"text-sm text-gray-600"},"Select a field to start creating a filter.")],-1)),e.createElementVNode("div",Pr,[V.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(e.unref(h)),([k,y])=>(e.openBlock(),e.createElementBlock("button",{key:k,onClick:()=>{x.value=k},class:e.normalizeClass(["w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",e.unref(x)===k?"bg-blue-50 text-blue-700 border-l-2 border-blue-500":""])},[e.createElementVNode("div",zr,[e.createElementVNode("span",Ir,e.toDisplayString(y.label),1)]),(Array.isArray(e.unref(d)[k])?e.unref(d)[k].length>0:e.unref(d)[k])?(e.openBlock(),e.createElementBlock("div",qr)):e.createCommentVNode("",!0)],10,Ur))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(C),(k,y)=>(e.openBlock(),e.createElementBlock("button",{key:"slot-"+y,onClick:p=>x.value=k.props.name,class:e.normalizeClass(["w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",e.unref(x)===k.props.name?"bg-blue-50 text-blue-700 border-l-2 border-blue-500":""])},[e.createElementVNode("div",Kr,[e.createElementVNode("span",Wr,e.toDisplayString(k.props.label),1)]),e.unref(d)[k.props.name]?.length>0?(e.openBlock(),e.createElementBlock("div",Jr)):e.createCommentVNode("",!0)],10,Hr))),128))]),e.unref(i)>0?(e.openBlock(),e.createElementBlock("div",Yr,[e.createElementVNode("button",{class:"w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",onClick:w[0]||(w[0]=(...k)=>e.unref(c)&&e.unref(c)(...k)),"data-inside-popover":""}," Очистити всі ")])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Qr,[e.unref(x)===""?(e.openBlock(),e.createElementBlock("div",Gr,w[8]||(w[8]=[e.createElementVNode("p",{class:"text-sm"},"Select a field to start creating a filter.",-1)]))):e.createCommentVNode("",!0),e.unref(x)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(h)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(e.unref(h)),([k,y])=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(x)===k?(e.openBlock(),e.createBlock(P,e.mergeProps({key:0,name:k,layout:"popover",ref_for:!0,ref_key:"filterRef",ref:E},{ref_for:!0},y,{onChange:w[1]||(w[1]=p=>e.unref(f)(p.name,p.value)),onClear:w[2]||(w[2]=p=>{e.unref(u)(p),e.unref(f)(p,void 0)}),modelValue:e.unref(d)[k],"onUpdate:modelValue":p=>e.unref(d)[k]=p,cleanable:!0}),null,16,["name","modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(C),(k,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"slot-"+y},[e.unref(x)===k.props.name?(e.openBlock(),e.createBlock(P,e.mergeProps({key:0,layout:"popover"},{ref_for:!0},k.props,{ref_for:!0,ref_key:"filterRef",ref:E,onChange:w[3]||(w[3]=p=>e.unref(f)(p.name,p.value)),onClear:w[4]||(w[4]=p=>{e.unref(u)(p),e.unref(f)(p,void 0)}),modelValue:e.unref(d)[k.props.name],"onUpdate:modelValue":p=>e.unref(d)[k.props.name]=p,cleanable:!0}),null,16,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],64))),128))],64)):e.createCommentVNode("",!0)])])]),_:1},8,["onOpen"]))}}),Xr={class:"flex gap-1 items-center flex-wrap"},xt=e.defineComponent({__name:"inline-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3}},emits:["change","clear","clearAll"],setup(t,{emit:n}){const r=t,o=n,l=e.useSlots(),a=e.ref({}),{activeFilter:s,activeFilterCount:d,onFilterChange:i,clearFilter:f,clearAllFilters:u,limitedSchema:c,popoverSchema:h,filtersSlot:C,limitedFiltersSlot:g,popoverFiltersSlot:x}=Ne({...r,schema:a,slots:l},o),E=e.ref();function V(){console.log(E.value),E.value&&E.value.clearAllFilters(),u()}return e.watch(()=>r.schema,w=>{a.value=w},{deep:!0,immediate:!0}),(w,k)=>(e.openBlock(),e.createElementBlock("div",Xr,[w.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(e.unref(c)),([y,p])=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:y,name:y,mode:w.mode},{ref_for:!0},p,{onChange:k[0]||(k[0]=b=>e.unref(i)(b.name,b.value)),onClear:k[1]||(k[1]=b=>{e.unref(f)(b),e.unref(i)(b,void 0)}),layout:"inline",cleanable:!0,modelValue:e.unref(s)[y],"onUpdate:modelValue":b=>e.unref(s)[y]=b}),null,16,["name","mode","modelValue","onUpdate:modelValue"]))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(y,p)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:"slot-"+p,layout:"vertical"},{ref_for:!0},y.props,{onChange:k[2]||(k[2]=b=>e.unref(i)(b.name,b.value)),onClear:k[3]||(k[3]=b=>{e.unref(f)(b),e.unref(i)(b,void 0)}),cleanable:!0,modelValue:e.unref(s)[y.props.name],"onUpdate:modelValue":b=>e.unref(s)[y.props.name]=b}),null,16,["modelValue","onUpdate:modelValue"]))),128)),Object.entries(e.unref(h)).length>0||e.unref(x).length>0?(e.openBlock(),e.createBlock(wt,e.mergeProps({key:1},r,{onChange:k[4]||(k[4]=y=>e.unref(i)(y.name,y.value)),onClearAll:e.unref(u),onClear:k[5]||(k[5]=y=>e.unref(f)(y.name)),ref_key:"popoverRef",ref:E,cleanable:!0}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(C),(y,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y),e.mergeProps({key:"slot-"+p,layout:"inline"},{ref_for:!0},y.props,{cleanable:!0}),null,16))),128))]),_:1},16,["onClearAll"])):e.createCommentVNode("",!0),e.unref(d)>0?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:V,class:"relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 border border-transparent text-gray-800 hover:bg-gray-200 focus:bg-gray-200"}," Очистити ")):e.createCommentVNode("",!0)]))}}),Zr={key:0,class:"p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"},vr={class:"flex items-center vst-filters vsTailwind flex-col w-full"},el=e.defineComponent({__name:"vertical-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3}},emits:["change","clear","clearAll"],setup(t,{emit:n}){const r=t,o=n,l=e.useSlots(),{activeFilter:a,activeFilterCount:s,onFilterChange:d,clearFilter:i,clearAllFilters:f,filtersSlot:u}=Ne({...r,slots:l},o);return(c,h)=>c.view==="vertical"?(e.openBlock(),e.createElementBlock("div",Zr,[e.createElementVNode("div",vr,[e.unref(s)>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:h[0]||(h[0]=(...C)=>e.unref(f)&&e.unref(f)(...C)),"data-popover-trigger":"","aria-haspopup":"dialog","aria-expanded":"false",class:"w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",type:"button"}," Очистити ")):e.createCommentVNode("",!0),c.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Object.entries(c.schema),([C,g])=>(e.openBlock(),e.createBlock(P,e.mergeProps({name:C,layout:"vertical"},{ref_for:!0},g,{onChange:h[1]||(h[1]=x=>e.unref(d)(x.name,x.value)),onClear:h[2]||(h[2]=x=>{e.unref(i)(x),e.unref(d)(x,void 0)}),modelValue:e.unref(a)[C],"onUpdate:modelValue":x=>e.unref(a)[C]=x,showClean:!0}),null,16,["name","modelValue","onUpdate:modelValue"]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),(C,g)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:"slot-"+g,layout:"vertical"},{ref_for:!0},C.props,{onChange:h[3]||(h[3]=x=>e.unref(d)(x.name,x.value)),onClear:h[4]||(h[4]=x=>{e.unref(i)(x),e.unref(d)(x,void 0)}),modelValue:e.unref(a)[C.props.name],"onUpdate:modelValue":x=>e.unref(a)[C.props.name]=x,showClean:!0}),null,16,["modelValue","onUpdate:modelValue"]))),128))])])):e.createCommentVNode("",!0)}}),Et=e.defineComponent({__name:"filter",props:{schema:{},view:{default:"inline"},value:{},history:{type:Boolean},mode:{},limit:{default:3}},emits:["change","clear","clearAll"],setup(t,{emit:n}){const r=t,o=e.ref(r.value??{}),l=n;function a(u,c){o.value={...o.value,[u]:c},l("change",{data:e.toRaw(o.value),name:u,value:c})}function s(u){delete o.value[u],l("clear",{data:e.toRaw(o.value),name:u})}function d(){o.value={},l("clear",{data:e.toRaw(o.value),name:"ALL"}),l("change",{data:e.toRaw(o.value),name:"ALL",value:null})}const i=e.ref({});function f(){switch(r.view){case"inline":return xt;case"vertical":return el;case"popover":return wt;default:return xt}}return e.watch(()=>r.schema,u=>{if(!u){i.value={};return}Array.isArray(u)?i.value=u.filter(c=>c.type).reduce((c,h)=>(Object.assign(h,{name:h.id||h.name,type:h.type.toLowerCase()}),c[h.name]=h,h.data&&!h.api&&Object.assign(h,{api:`/api/suggest/${h.data}`}),c),{}):(Object.entries(u).forEach(([,c])=>{Object.assign(c,{name:c.name||c.id,type:c.type.toLowerCase()})}),i.value={...u})},{immediate:!0,deep:!0}),(u,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f()),e.mergeProps(r,{schema:i.value,onChange:c[0]||(c[0]=h=>a(h.name,h.value)),onClear:c[1]||(c[1]=h=>s(h.name)),onClearAll:d}),{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:3},16,["schema"]))}}),tl={install(t){t.component("Filter",Et),t.component("FilterField",P)}};L.Filter=Et,L.FilterField=P,L.default=tl,Object.defineProperties(L,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@opengis/filter",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
- "main": "dist/filter.es.js",
5
+ "main": "dist/filter.js",
6
6
  "files": [
7
7
  "dist"
8
8
  ],