sprof 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sprof.js CHANGED
@@ -4300,7 +4300,7 @@ const ys = /* @__PURE__ */ $(yd, [["render", bd]]), Sd = [
4300
4300
  };
4301
4301
  a(Ge, "router"), a(Ge, "title", ""), a(Ge, "ChangeDocumentTitle", (e = "") => {
4302
4302
  const i = Ge.Route().meta.title ?? e;
4303
- i && (document.title = Ge.title + i);
4303
+ document.title = Ge.title + " | " + i;
4304
4304
  });
4305
4305
  let ot = Ge;
4306
4306
  class he {
@@ -16,7 +16,7 @@
16
16
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Gr]=this[Gr]={accessors:{}}).accessors,o=this.prototype;function s(a){const c=Lt(a);r[c]||(Ic(o,a),r[c]=!0)}return w.isArray(e)?e.forEach(s):s(e),this}};be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(be.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),w.freezeMethods(be);function pi(t,e){const n=this||Dt,r=e||n,o=be.from(r.headers);let s=r.data;return w.forEach(t,function(c){s=c.call(n,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function Zr(t){return!!(t&&t.__CANCEL__)}function yt(t,e,n){F.call(this,t??"canceled",F.ERR_CANCELED,e,n),this.name="CanceledError"}w.inherits(yt,F,{__CANCEL__:!0});function Jr(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new F("Request failed with status code "+n.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Rc(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Nc(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,s=0,a;return e=e!==void 0?e:1e3,function(d){const u=Date.now(),h=r[s];a||(a=u),n[o]=d,r[o]=u;let f=s,m=0;for(;f!==o;)m+=n[f++],f=f%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),u-a<e)return;const g=h&&u-h;return g?Math.round(m*1e3/g):void 0}}function Ac(t,e){let n=0,r=1e3/e,o,s;const a=(u,h=Date.now())=>{n=h,o=null,s&&(clearTimeout(s),s=null),t(...u)};return[(...u)=>{const h=Date.now(),f=h-n;f>=r?a(u,h):(o=u,s||(s=setTimeout(()=>{s=null,a(o)},r-f)))},()=>o&&a(o)]}const wn=(t,e,n=3)=>{let r=0;const o=Nc(50,250);return Ac(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,d=a-r,u=o(d),h=a<=c;r=a;const f={loaded:a,total:c,progress:c?a/c:void 0,bytes:d,rate:u||void 0,estimated:u&&c&&h?(c-a)/u:void 0,event:s,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},n)},Xr=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Yr=t=>(...e)=>w.asap(()=>t(...e)),zc=pe.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,pe.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(pe.origin),pe.navigator&&/(msie|trident)/i.test(pe.navigator.userAgent)):()=>!0,Pc=pe.hasStandardBrowserEnv?{write(t,e,n,r,o,s){const a=[t+"="+encodeURIComponent(e)];w.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),w.isString(r)&&a.push("path="+r),w.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vc(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Tc(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Qr(t,e,n){let r=!Vc(e);return t&&(r||n==!1)?Tc(t,e):e}const Kr=t=>t instanceof be?{...t}:t;function at(t,e){e=e||{};const n={};function r(u,h,f,m){return w.isPlainObject(u)&&w.isPlainObject(h)?w.merge.call({caseless:m},u,h):w.isPlainObject(h)?w.merge({},h):w.isArray(h)?h.slice():h}function o(u,h,f,m){if(w.isUndefined(h)){if(!w.isUndefined(u))return r(void 0,u,f,m)}else return r(u,h,f,m)}function s(u,h){if(!w.isUndefined(h))return r(void 0,h)}function a(u,h){if(w.isUndefined(h)){if(!w.isUndefined(u))return r(void 0,u)}else return r(void 0,h)}function c(u,h,f){if(f in e)return r(u,h);if(f in t)return r(void 0,u)}const d={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(u,h,f)=>o(Kr(u),Kr(h),f,!0)};return w.forEach(Object.keys({...t,...e}),function(h){const f=d[h]||o,m=f(t[h],e[h],h);w.isUndefined(m)&&f!==c||(n[h]=m)}),n}const eo=t=>{const e=at({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:c}=e;e.headers=a=be.from(a),e.url=Ur(Qr(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(w.isFormData(n)){if(pe.hasStandardBrowserEnv||pe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((d=a.getContentType())!==!1){const[u,...h]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...h].join("; "))}}if(pe.hasStandardBrowserEnv&&(r&&w.isFunction(r)&&(r=r(e)),r||r!==!1&&zc(e.url))){const u=o&&s&&Pc.read(s);u&&a.set(o,u)}return e},Fc=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=eo(t);let s=o.data;const a=be.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:u}=o,h,f,m,g,C;function b(){g&&g(),C&&C(),o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let S=new XMLHttpRequest;S.open(o.method.toUpperCase(),o.url,!0),S.timeout=o.timeout;function $(){if(!S)return;const P=be.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),H={data:!c||c==="text"||c==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:P,config:t,request:S};Jr(function($e){n($e),b()},function($e){r($e),b()},H),S=null}"onloadend"in S?S.onloadend=$:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout($)},S.onabort=function(){S&&(r(new F("Request aborted",F.ECONNABORTED,t,S)),S=null)},S.onerror=function(){r(new F("Network Error",F.ERR_NETWORK,t,S)),S=null},S.ontimeout=function(){let N=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const H=o.transitional||Wr;o.timeoutErrorMessage&&(N=o.timeoutErrorMessage),r(new F(N,H.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,t,S)),S=null},s===void 0&&a.setContentType(null),"setRequestHeader"in S&&w.forEach(a.toJSON(),function(N,H){S.setRequestHeader(H,N)}),w.isUndefined(o.withCredentials)||(S.withCredentials=!!o.withCredentials),c&&c!=="json"&&(S.responseType=o.responseType),u&&([m,C]=wn(u,!0),S.addEventListener("progress",m)),d&&S.upload&&([f,g]=wn(d),S.upload.addEventListener("progress",f),S.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(h=P=>{S&&(r(!P||P.type?new yt(null,t,S):P),S.abort(),S=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));const L=Rc(o.url);if(L&&pe.protocols.indexOf(L)===-1){r(new F("Unsupported protocol "+L+":",F.ERR_BAD_REQUEST,t));return}S.send(s||null)})},Oc=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,c();const h=u instanceof Error?u:this.reason;r.abort(h instanceof F?h:new yt(h instanceof Error?h.message:h))}};let a=e&&setTimeout(()=>{a=null,s(new F(`timeout ${e} of ms exceeded`,F.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:d}=r;return d.unsubscribe=()=>w.asap(c),d}},Dc=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},Lc=async function*(t,e){for await(const n of Hc(t))yield*Dc(n,e)},Hc=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},to=(t,e,n,r)=>{const o=Lc(t,e);let s=0,a,c=d=>{a||(a=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:u,value:h}=await o.next();if(u){c(),d.close();return}let f=h.byteLength;if(n){let m=s+=f;n(m)}d.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(d){return c(d),o.return()}},{highWaterMark:2})},bn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",no=bn&&typeof ReadableStream=="function",qc=bn&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),io=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Uc=no&&io(()=>{let t=!1;const e=new Request(pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ro=64*1024,gi=no&&io(()=>w.isReadableStream(new Response("").body)),Cn={stream:gi&&(t=>t.body)};bn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Cn[e]&&(Cn[e]=w.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new F(`Response type '${e}' is not supported`,F.ERR_NOT_SUPPORT,r)})})})(new Response);const jc=async t=>{if(t==null)return 0;if(w.isBlob(t))return t.size;if(w.isSpecCompliantForm(t))return(await new Request(pe.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(w.isArrayBufferView(t)||w.isArrayBuffer(t))return t.byteLength;if(w.isURLSearchParams(t)&&(t=t+""),w.isString(t))return(await qc(t)).byteLength},Wc=async(t,e)=>{const n=w.toFiniteNumber(t.getContentLength());return n??jc(e)},yi={http:hc,xhr:Fc,fetch:bn&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:d,responseType:u,headers:h,withCredentials:f="same-origin",fetchOptions:m}=eo(t);u=u?(u+"").toLowerCase():"text";let g=Oc([o,s&&s.toAbortSignal()],a),C;const b=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let S;try{if(d&&Uc&&n!=="get"&&n!=="head"&&(S=await Wc(h,r))!==0){let H=new Request(e,{method:"POST",body:r,duplex:"half"}),Be;if(w.isFormData(r)&&(Be=H.headers.get("content-type"))&&h.setContentType(Be),H.body){const[$e,nt]=Xr(S,wn(Yr(d)));r=to(H.body,ro,$e,nt)}}w.isString(f)||(f=f?"include":"omit");const $="credentials"in Request.prototype;C=new Request(e,{...m,signal:g,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:r,duplex:"half",credentials:$?f:void 0});let L=await fetch(C,m);const P=gi&&(u==="stream"||u==="response");if(gi&&(c||P&&b)){const H={};["status","statusText","headers"].forEach(Rt=>{H[Rt]=L[Rt]});const Be=w.toFiniteNumber(L.headers.get("content-length")),[$e,nt]=c&&Xr(Be,wn(Yr(c),!0))||[];L=new Response(to(L.body,ro,$e,()=>{nt&&nt(),b&&b()}),H)}u=u||"text";let N=await Cn[w.findKey(Cn,u)||"text"](L,t);return!P&&b&&b(),await new Promise((H,Be)=>{Jr(H,Be,{data:N,headers:be.from(L.headers),status:L.status,statusText:L.statusText,config:t,request:C})})}catch($){throw b&&b(),$&&$.name==="TypeError"&&/Load failed|fetch/i.test($.message)?Object.assign(new F("Network Error",F.ERR_NETWORK,t,C),{cause:$.cause||$}):F.from($,$&&$.code,t,C)}})};w.forEach(yi,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const oo=t=>`- ${t}`,_c=t=>w.isFunction(t)||t===null||t===!1,so={getAdapter:t=>{t=w.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let s=0;s<e;s++){n=t[s];let a;if(r=n,!_c(n)&&(r=yi[(a=String(n)).toLowerCase()],r===void 0))throw new F(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
17
17
  `+s.map(oo).join(`
18
18
  `):" "+oo(s[0]):"as no adapter specified";throw new F("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:yi};function wi(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new yt(null,t)}function ao(t){return wi(t),t.headers=be.from(t.headers),t.data=pi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),so.getAdapter(t.adapter||Dt.adapter)(t).then(function(r){return wi(t),r.data=pi.call(t,t.transformResponse,r),r.headers=be.from(r.headers),r},function(r){return Zr(r)||(wi(t),r&&r.response&&(r.response.data=pi.call(t,t.transformResponse,r.response),r.response.headers=be.from(r.response.headers))),Promise.reject(r)})}const lo="1.11.0",Sn={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Sn[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const co={};Sn.transitional=function(e,n,r){function o(s,a){return"[Axios v"+lo+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,c)=>{if(e===!1)throw new F(o(a," has been removed"+(n?" in "+n:"")),F.ERR_DEPRECATED);return n&&!co[a]&&(co[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,c):!0}},Sn.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Gc(t,e,n){if(typeof t!="object")throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const s=r[o],a=e[s];if(a){const c=t[s],d=c===void 0||a(c,s,t);if(d!==!0)throw new F("option "+s+" must be "+d,F.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new F("Unknown option "+s,F.ERR_BAD_OPTION)}}const kn={assertOptions:Gc,validators:Sn},Ve=kn.validators;let lt=class{constructor(e){this.defaults=e||{},this.interceptors={request:new jr,response:new jr}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
19
- `+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=at(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&kn.assertOptions(r,{silentJSONParsing:Ve.transitional(Ve.boolean),forcedJSONParsing:Ve.transitional(Ve.boolean),clarifyTimeoutError:Ve.transitional(Ve.boolean)},!1),o!=null&&(w.isFunction(o)?n.paramsSerializer={serialize:o}:kn.assertOptions(o,{encode:Ve.function,serialize:Ve.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),kn.assertOptions(n,{baseUrl:Ve.spelling("baseURL"),withXsrfToken:Ve.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&w.merge(s.common,s[n.method]);s&&w.forEach(["delete","get","head","post","put","patch","common"],C=>{delete s[C]}),n.headers=be.concat(a,s);const c=[];let d=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(d=d&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let h,f=0,m;if(!d){const C=[ao.bind(this),void 0];for(C.unshift(...c),C.push(...u),m=C.length,h=Promise.resolve(n);f<m;)h=h.then(C[f++],C[f++]);return h}m=c.length;let g=n;for(f=0;f<m;){const C=c[f++],b=c[f++];try{g=C(g)}catch(S){b.call(this,S);break}}try{h=ao.call(this,g)}catch(C){return Promise.reject(C)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(e){e=at(this.defaults,e);const n=Qr(e.baseURL,e.url,e.allowAbsoluteUrls);return Ur(n,e.params,e.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(e){lt.prototype[e]=function(n,r){return this.request(at(r||{},{method:e,url:n,data:(r||{}).data}))}}),w.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,c){return this.request(at(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}lt.prototype[e]=n(),lt.prototype[e+"Form"]=n(!0)});let Zc=class nl{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(c=>{r.subscribe(c),s=c}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,c){r.reason||(r.reason=new yt(s,a,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new nl(function(o){e=o}),cancel:e}}};function Jc(t){return function(n){return t.apply(null,n)}}function Xc(t){return w.isObject(t)&&t.isAxiosError===!0}const bi={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(bi).forEach(([t,e])=>{bi[e]=t});function uo(t){const e=new lt(t),n=$r(lt.prototype.request,e);return w.extend(n,lt.prototype,e,{allOwnKeys:!0}),w.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return uo(at(t,o))},n}const K=uo(Dt);K.Axios=lt,K.CanceledError=yt,K.CancelToken=Zc,K.isCancel=Zr,K.VERSION=lo,K.toFormData=gn,K.AxiosError=F,K.Cancel=K.CanceledError,K.all=function(e){return Promise.all(e)},K.spread=Jc,K.isAxiosError=Xc,K.mergeConfig=at,K.AxiosHeaders=be,K.formToJSON=t=>_r(w.isHTMLForm(t)?new FormData(t):t),K.getAdapter=so.getAdapter,K.HttpStatusCode=bi,K.default=K;const{Axios:bg,AxiosError:Cg,CanceledError:Sg,isCancel:kg,CancelToken:Eg,VERSION:xg,all:vg,Cancel:Mg,isAxiosError:Bg,spread:$g,toFormData:Ig,AxiosHeaders:Rg,HttpStatusCode:Ng,formToJSON:Ag,getAdapter:zg,mergeConfig:Pg}=K;var Ht=(t=>(t.GET="get",t.POST="post",t.PUT="put",t.DELETE="delete",t))(Ht||{});const qt=(()=>{function t(){const d=o();return!(!d||d==="undefined")}function e(d){d.accessToken&&localStorage.setItem("access_token",d.accessToken),d.refreshToken&&localStorage.setItem("refresh_token",d.refreshToken)}function n(){const d=localStorage.getItem("user");return d?JSON.parse(d).id:""}function r(){const d=localStorage.getItem("user");if(d)return JSON.parse(d)}function o(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(d){if(!t())return;const u=qt.getUser();u&&(u.human=d,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:t,setTokens:e,getAccessToken:o,getRefreshToken:s,getUserId:n,clearTokens:a,getUser:r,updateHuman:c}})();class Ci{constructor(e){l(this,"code",400);l(this,"err","");M.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,n){const r=e.config;if(e.response){if(e.response.status===401&&!r._retry)return r._retry=!0,n.defaults.headers.common.token=qt.getAccessToken(),e.config.headers.token=qt.getAccessToken(),e.config.baseURL=void 0,n.request(r);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){ye.Error("Неверный логин или пароль");return}ye.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const o=new Ci(e.response.data).getErr();o&&ye.Error(o)}return Promise.reject(e)}}}const wt=K.create();wt.interceptors.response.use(t=>t,async t=>await Ci.Handle(t,wt));class Ut{static async Get(e,n,r){return await wt({method:Ht.GET,url:e,headers:n,responseType:r})}static async Post(e,n,r,o){return n["Content-Type"]="multipart/form-data",await wt({method:Ht.POST,url:e,headers:n,responseType:r,data:o})}static async Put(e,n,r){return n["Content-Type"]="multipart/form-data",await wt({method:Ht.PUT,url:e,headers:n,data:r})}static async Delete(e,n){return await wt({method:Ht.DELETE,url:e,headers:n})}}class En{constructor(e){l(this,"name","");M.BuildClass(this,e)}static Set(){}static Get(e,n){const r=sessionStorage.getItem(e);if(r){const o=JSON.parse(r),s=new Date,a=new Date(o.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(n||10)?null:o.data}else return null}static async TryGet(e,n,r){let o;return o=En.Get(e,r),o||(o=await n()),o}}function Yc(t){var e=[];if(t.length===0)return"";if(typeof t[0]!="string")throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var o=t[r];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(r>0&&(o=o.replace(/^[\/]+/,"")),r<t.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),e.push(o))}var s=e.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function ho(){var t;return typeof arguments[0]=="object"?t=arguments[0]:t=[].slice.call(arguments),Yc(t)}var Si=(t=>(t.ContentType="Content-Type",t.Token="token",t))(Si||{}),fo=(t=>(t.ApplicationJson="application/json",t.MultipartFormData="multipart/form-data",t))(fo||{});function Qc(t,e,n){try{const r=new URL(t);return r.port=e.toString(),ho(r.toString(),n)}catch{throw new Error(`Invalid host URL: ${t}`)}}const Z=class Z{static Setup(e="http://localhost",n="9000",r="api"){this.baseUrl=Qc(e,n,r),this.host=e,this.apiVersion=r}static newWebSocket(e){const n=this.host.replace("http","ws")+"/ws/"+e;return new WebSocket(n)}static download(e,n){const r=Z.getDownloadFileName(e,n.headers),o=URL.createObjectURL(n.data),s=document.createElement("a");s.href=o,s.setAttribute("download",r),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(e,n){if(e)return e;const r=n["content-disposition"];if(!r)return"file";const o=r.indexOf('"')+1,s=r.lastIndexOf('"'),a=r.substring(o,s);return a||"file"}static getHeaders(e){const n=Pe.Get(Re.AccessToken);return e||(e=Z.headers),n&&(e[Si.Token]=n),e??Z.headers}static returnResponse(e,n){if(n)return e!=null&&e.isBlob?Z.download(e.downloadFileName,n):n.data}static async Get(e){return Z.returnResponse(e,await Ut.Get(Z.buildUrl((e==null?void 0:e.query)??""),Z.getHeaders(e==null?void 0:e.headers),Z.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return Z.returnResponse(e,await Ut.Post(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers),Z.getResponseType(e.isBlob),Z.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return Z.returnResponse(e,await Ut.Put(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers),Z.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return Z.returnResponse(e,await Ut.Delete(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:n}=e;return new EventSource(Z.buildUrl(n))}static buildUrl(e=""){try{return ho(this.baseUrl,e)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,n){const r=new FormData;if(r.append("form",JSON.stringify(e)),n)for(const o of n)o.file&&r.append(o.id??"files",o.file,o.originalName);return r}};l(Z,"baseUrl",""),l(Z,"apiVersion","api"),l(Z,"host",""),l(Z,"headers",{[Si.ContentType]:fo.ApplicationJson});let Y=Z;const E=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Kc={},ed={style:{"text-align":"center"}};function td(t,e){return i.openBlock(),i.createElementBlock("div",ed,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const ki=E(Kc,[["render",td]]),nd=[{path:"/:pathMatch(.*)*",name:"NotFound",component:ki}],Me=class Me{static Set(e,n=""){this.router=e,this.title=n,this.AddRoutes(nd)}static Get(){return this.router}static AddRoutes(e){e.forEach(n=>{this.Get().addRoute(n)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return Me.GetStringParam("id")}static Slug(){return Me.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return Me.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const n=this.Get().resolve({path:e});window.open(n==null?void 0:n.href,"_blank")}static GetPath(){var n;const e=(n=Me.Route())==null?void 0:n.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let n=e;n[0]==="/"&&(n=e.substring(1)),await Me.To(`/admin/${n}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var n;return(n=this.Route())==null?void 0:n.params[e]}static SetQueryParam(e,n){const r=new URL(window.location);r.searchParams.set(e,String(n)),history.replaceState(null,"",r)}static Resolve(e){return this.Get().resolve(e)}};l(Me,"router"),l(Me,"title",""),l(Me,"ChangeDocumentTitle",(e="")=>{const n=Me.Route().meta.title??e;n&&(document.title=Me.title+n)});let Te=Me;class Q{constructor(e,n){l(this,"items",i.reactive([]));l(this,"item");l(this,"options",i.reactive([]));l(this,"count",i.ref(0));l(this,"classConstructor");l(this,"url","");l(this,"searchStr",i.ref(""));this.classConstructor=e,this.item=i.reactive(new this.classConstructor),this.url=n}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetOptions(e="name",n="id"){const r=`${this.getUrl()}/options/${e}/${n}`,o=await Y.Get({query:r});o&&(this.options.splice(0,this.options.length),this.options.push(...o))}async GetAll(e){let n;const r=Y.Get;e&&e.withCache?n=await En.TryGet(this.getUrl(),r):n=await r({query:this.getUrl()}),Array.isArray(n)?this.SetAll(n):this.SetAllWithCount(n)}async Get(e){e||(e=Te.Id()),this.Set(await Y.Get({query:this.getUrl(e)}))}async GetBySlug(e){e||(e=Te.Slug()),this.Set(await R.H.HttpClient.Get({query:this.getUrl("by-slug/"+e)}))}async FTSP(e){var a;const r=((e==null?void 0:e.ftsp)??je.Get()).clearForHTTP(),o={payload:{ftsp:r},query:this.getUrl("ftsp")},s=await Y.Post(o);if(!(!s||!s.ftsp))if(Array.isArray(s.data))this.SetAll(s.data);else{if(r.p.append){this.AppendToAll((a=s.data)==null?void 0:a.items);return}this.SetAllWithCount(s.data)}}async Create(e){const n=e??this.item,r={payload:n,query:this.getUrl()};return n.getFileInfos&&(r.fileInfos=n.getFileInfos()),await Y.Post(r)}async CreateAndSet(e){const n=await this.Create(e);this.Set(n)}async CreateMany(e){if(!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Create(r)))}),Promise.all(n)}async Update(e){const n=e??this.item,r={query:this.getUrl(`${n.id}`),payload:n};return n.getFileInfos&&(r.fileInfos=n.getFileInfos(),r.fileInfos.forEach(o=>o.url="")),await Y.Put(r)}async UpdateAndSet(e){const n=await this.Update(e);this.Set(n)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(!e){console.warn("BaseStore/Remove. id is undefined");return}await Y.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}async UpdateMany(e){if(e||(e=this.items),!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Update(r)))}),Promise.all(n)}SetAll(e){e&&(this.items.splice(0,this.items.length),this.items.push(...e.map(n=>new this.classConstructor(n))))}SetAllWithCount(e){e&&(this.SetAll(e.items),this.count.value=e.count)}RemoveItem(e){const n=this.items.findIndex(r=>r.id===e);this.items.splice(n,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.push(...n);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){M.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.unshift(...n);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(e=>R.H.Strings.SearchInFields(this.searchStr.value,e.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function id(t,e){t=="left"&&e.next(),t=="right"&&e.prev()}const rd=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class od{static GetRandColor(e){return Ue.GetRandEL(e??rd)}}function mo(t,e){const n=[],r=e||Ee.Asc,o=r===Ee.Asc?Ee.Desc:Ee.Asc;return Object.values(t).forEach(s=>{n.push(s(r)),n.push(s(o))}),n.length>0&&!n.some(s=>s.default)&&(n[0].default=!0),e&&n.forEach(s=>{s.default&&(s.default=s.order===e)}),n}let sd=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",At.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",rn[At.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=rn[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Ue.GenerateNumsRange(this.startHour,this.endHour)}};const Ei=t=>t===8||t===46,ad=t=>t>46&&t<58,ld=t=>t>34&&t<41,cd=t=>t+".",dd=(t,e,n)=>{Ei(e)||ld(e)||(!ad(e)||n>9)&&t.preventDefault()};function ud(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let r=t.substring(3,5).replace(".","1");Number(r)>12&&(r="12");let o=t.substring(6,10).replace(".","1");Number(o)>2100&&(o="2100"),t=n+"."+r+"."+o}return t}function hd(t){const e=t.keyCode;let n=t.srcElement.value;const r=n.length;dd(t,e,r),!Ei(e)&&(r===2||r===5)&&(n=cd(n));const o=t.srcElement.value+String.fromCharCode(t.which);if(Ei(e)){t.srcElement.value=n;return}n.length===0&&Number(o)>3&&(n="3",t.preventDefault()),n.length===1&&Number(o)>31&&(n="31",t.preventDefault()),o.length===5&&Number(o.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=ud(n,r),t.srcElement.value=n}const fd=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],md="ru-RU";class Fe{constructor(){l(this,"locale","ru-RU")}static Format(e,n){if(!e)return"";const r={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return n&&(r.year=n.year||n.year===void 0?n.year:r.year,r.month=n.month||n.month===void 0?n.month:r.month,r.day=n.day||n.day===void 0?n.day:r.day,r.hour=n.hour??r.hour,r.minute=n.minute??r.minute),Intl.DateTimeFormat(md,r).format(new Date(e))}static FormatWithTime(e){return Fe.Format(e,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetPeriod(e,n,r){return`${this.Format(e,r)}-${this.Format(n,r)}`}static GetShortDayName(e){return e?fd[e.getDay()]:""}static GetCurrentWeekPeriod(e){const n=new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()-n.getDay()+1),o=new Date(n.getFullYear(),n.getMonth(),r.getDate()+7);return this.GetPeriod(r,o,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,n){const r=new Date,o=new Date,s=Fe.SplitHourTime(e),a=Fe.SplitHourTime(n);return r.setHours(s[0],s[1],0,0),o.setHours(a[0],a[1],0,0),(o.getTime()-r.getTime())/1e3/60}static HourTimeinMunutes(e){const n=Fe.SplitHourTime(e);return n[0]*60+n[1]}static SplitHourTime(e){const n=e.split(":");return[Number(n[0]),Number(n[1])]}static AddMinutesToHM(e,n){const r=new Date,o=Fe.SplitHourTime(e);r.setHours(o[0],o[1],0,0);const s=new Date(r.getTime()+n*6e4),a=s.getHours(),c=s.getMinutes();return`${a}:${c}`}static GetMonthsDiff(e,n){return n.getMonth()-e.getMonth()+12*(n.getFullYear()-e.getFullYear())}static StringToDate(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,n,r){return new Date(e)>=new Date(n)&&new Date(e)<=new Date(r)}static GetDatesFromPeriod(e,n){const r=[new Date(e)];let o=e;for(;o<=n;)o=Fe.AddDays(o,1),r.push(o);return r}static AddDays(e,n){const r=new Date(e);return r.setDate(r.getDate()+n),r}static Eq(e,n){return e.getTime()===n.getTime()}}class pd{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class po{static Get(e){const n=e.split(".");return n[n.length-1]}}const gd=(()=>{function t(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function n(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){t(s,[a]);return}const d=c.split(",");d.push(a),t(s,d)}function r(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const d=c.split(",").filter(u=>u!==a);t(s,d)}function o(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:n,removeFromFavourite:r,setFavourite:t,isFavourite:e,clearFavourite:o}})();/*!
19
+ `+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=at(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&kn.assertOptions(r,{silentJSONParsing:Ve.transitional(Ve.boolean),forcedJSONParsing:Ve.transitional(Ve.boolean),clarifyTimeoutError:Ve.transitional(Ve.boolean)},!1),o!=null&&(w.isFunction(o)?n.paramsSerializer={serialize:o}:kn.assertOptions(o,{encode:Ve.function,serialize:Ve.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),kn.assertOptions(n,{baseUrl:Ve.spelling("baseURL"),withXsrfToken:Ve.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&w.merge(s.common,s[n.method]);s&&w.forEach(["delete","get","head","post","put","patch","common"],C=>{delete s[C]}),n.headers=be.concat(a,s);const c=[];let d=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(d=d&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let h,f=0,m;if(!d){const C=[ao.bind(this),void 0];for(C.unshift(...c),C.push(...u),m=C.length,h=Promise.resolve(n);f<m;)h=h.then(C[f++],C[f++]);return h}m=c.length;let g=n;for(f=0;f<m;){const C=c[f++],b=c[f++];try{g=C(g)}catch(S){b.call(this,S);break}}try{h=ao.call(this,g)}catch(C){return Promise.reject(C)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(e){e=at(this.defaults,e);const n=Qr(e.baseURL,e.url,e.allowAbsoluteUrls);return Ur(n,e.params,e.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(e){lt.prototype[e]=function(n,r){return this.request(at(r||{},{method:e,url:n,data:(r||{}).data}))}}),w.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,c){return this.request(at(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}lt.prototype[e]=n(),lt.prototype[e+"Form"]=n(!0)});let Zc=class nl{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(c=>{r.subscribe(c),s=c}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,c){r.reason||(r.reason=new yt(s,a,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new nl(function(o){e=o}),cancel:e}}};function Jc(t){return function(n){return t.apply(null,n)}}function Xc(t){return w.isObject(t)&&t.isAxiosError===!0}const bi={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(bi).forEach(([t,e])=>{bi[e]=t});function uo(t){const e=new lt(t),n=$r(lt.prototype.request,e);return w.extend(n,lt.prototype,e,{allOwnKeys:!0}),w.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return uo(at(t,o))},n}const K=uo(Dt);K.Axios=lt,K.CanceledError=yt,K.CancelToken=Zc,K.isCancel=Zr,K.VERSION=lo,K.toFormData=gn,K.AxiosError=F,K.Cancel=K.CanceledError,K.all=function(e){return Promise.all(e)},K.spread=Jc,K.isAxiosError=Xc,K.mergeConfig=at,K.AxiosHeaders=be,K.formToJSON=t=>_r(w.isHTMLForm(t)?new FormData(t):t),K.getAdapter=so.getAdapter,K.HttpStatusCode=bi,K.default=K;const{Axios:bg,AxiosError:Cg,CanceledError:Sg,isCancel:kg,CancelToken:Eg,VERSION:xg,all:vg,Cancel:Mg,isAxiosError:Bg,spread:$g,toFormData:Ig,AxiosHeaders:Rg,HttpStatusCode:Ng,formToJSON:Ag,getAdapter:zg,mergeConfig:Pg}=K;var Ht=(t=>(t.GET="get",t.POST="post",t.PUT="put",t.DELETE="delete",t))(Ht||{});const qt=(()=>{function t(){const d=o();return!(!d||d==="undefined")}function e(d){d.accessToken&&localStorage.setItem("access_token",d.accessToken),d.refreshToken&&localStorage.setItem("refresh_token",d.refreshToken)}function n(){const d=localStorage.getItem("user");return d?JSON.parse(d).id:""}function r(){const d=localStorage.getItem("user");if(d)return JSON.parse(d)}function o(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(d){if(!t())return;const u=qt.getUser();u&&(u.human=d,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:t,setTokens:e,getAccessToken:o,getRefreshToken:s,getUserId:n,clearTokens:a,getUser:r,updateHuman:c}})();class Ci{constructor(e){l(this,"code",400);l(this,"err","");M.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,n){const r=e.config;if(e.response){if(e.response.status===401&&!r._retry)return r._retry=!0,n.defaults.headers.common.token=qt.getAccessToken(),e.config.headers.token=qt.getAccessToken(),e.config.baseURL=void 0,n.request(r);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){ye.Error("Неверный логин или пароль");return}ye.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const o=new Ci(e.response.data).getErr();o&&ye.Error(o)}return Promise.reject(e)}}}const wt=K.create();wt.interceptors.response.use(t=>t,async t=>await Ci.Handle(t,wt));class Ut{static async Get(e,n,r){return await wt({method:Ht.GET,url:e,headers:n,responseType:r})}static async Post(e,n,r,o){return n["Content-Type"]="multipart/form-data",await wt({method:Ht.POST,url:e,headers:n,responseType:r,data:o})}static async Put(e,n,r){return n["Content-Type"]="multipart/form-data",await wt({method:Ht.PUT,url:e,headers:n,data:r})}static async Delete(e,n){return await wt({method:Ht.DELETE,url:e,headers:n})}}class En{constructor(e){l(this,"name","");M.BuildClass(this,e)}static Set(){}static Get(e,n){const r=sessionStorage.getItem(e);if(r){const o=JSON.parse(r),s=new Date,a=new Date(o.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(n||10)?null:o.data}else return null}static async TryGet(e,n,r){let o;return o=En.Get(e,r),o||(o=await n()),o}}function Yc(t){var e=[];if(t.length===0)return"";if(typeof t[0]!="string")throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var o=t[r];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(r>0&&(o=o.replace(/^[\/]+/,"")),r<t.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),e.push(o))}var s=e.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function ho(){var t;return typeof arguments[0]=="object"?t=arguments[0]:t=[].slice.call(arguments),Yc(t)}var Si=(t=>(t.ContentType="Content-Type",t.Token="token",t))(Si||{}),fo=(t=>(t.ApplicationJson="application/json",t.MultipartFormData="multipart/form-data",t))(fo||{});function Qc(t,e,n){try{const r=new URL(t);return r.port=e.toString(),ho(r.toString(),n)}catch{throw new Error(`Invalid host URL: ${t}`)}}const Z=class Z{static Setup(e="http://localhost",n="9000",r="api"){this.baseUrl=Qc(e,n,r),this.host=e,this.apiVersion=r}static newWebSocket(e){const n=this.host.replace("http","ws")+"/ws/"+e;return new WebSocket(n)}static download(e,n){const r=Z.getDownloadFileName(e,n.headers),o=URL.createObjectURL(n.data),s=document.createElement("a");s.href=o,s.setAttribute("download",r),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(e,n){if(e)return e;const r=n["content-disposition"];if(!r)return"file";const o=r.indexOf('"')+1,s=r.lastIndexOf('"'),a=r.substring(o,s);return a||"file"}static getHeaders(e){const n=Pe.Get(Re.AccessToken);return e||(e=Z.headers),n&&(e[Si.Token]=n),e??Z.headers}static returnResponse(e,n){if(n)return e!=null&&e.isBlob?Z.download(e.downloadFileName,n):n.data}static async Get(e){return Z.returnResponse(e,await Ut.Get(Z.buildUrl((e==null?void 0:e.query)??""),Z.getHeaders(e==null?void 0:e.headers),Z.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return Z.returnResponse(e,await Ut.Post(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers),Z.getResponseType(e.isBlob),Z.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return Z.returnResponse(e,await Ut.Put(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers),Z.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return Z.returnResponse(e,await Ut.Delete(Z.buildUrl(e==null?void 0:e.query),Z.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:n}=e;return new EventSource(Z.buildUrl(n))}static buildUrl(e=""){try{return ho(this.baseUrl,e)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,n){const r=new FormData;if(r.append("form",JSON.stringify(e)),n)for(const o of n)o.file&&r.append(o.id??"files",o.file,o.originalName);return r}};l(Z,"baseUrl",""),l(Z,"apiVersion","api"),l(Z,"host",""),l(Z,"headers",{[Si.ContentType]:fo.ApplicationJson});let Y=Z;const E=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Kc={},ed={style:{"text-align":"center"}};function td(t,e){return i.openBlock(),i.createElementBlock("div",ed,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const ki=E(Kc,[["render",td]]),nd=[{path:"/:pathMatch(.*)*",name:"NotFound",component:ki}],Me=class Me{static Set(e,n=""){this.router=e,this.title=n,this.AddRoutes(nd)}static Get(){return this.router}static AddRoutes(e){e.forEach(n=>{this.Get().addRoute(n)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return Me.GetStringParam("id")}static Slug(){return Me.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return Me.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const n=this.Get().resolve({path:e});window.open(n==null?void 0:n.href,"_blank")}static GetPath(){var n;const e=(n=Me.Route())==null?void 0:n.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let n=e;n[0]==="/"&&(n=e.substring(1)),await Me.To(`/admin/${n}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var n;return(n=this.Route())==null?void 0:n.params[e]}static SetQueryParam(e,n){const r=new URL(window.location);r.searchParams.set(e,String(n)),history.replaceState(null,"",r)}static Resolve(e){return this.Get().resolve(e)}};l(Me,"router"),l(Me,"title",""),l(Me,"ChangeDocumentTitle",(e="")=>{const n=Me.Route().meta.title??e;document.title=Me.title+" | "+n});let Te=Me;class Q{constructor(e,n){l(this,"items",i.reactive([]));l(this,"item");l(this,"options",i.reactive([]));l(this,"count",i.ref(0));l(this,"classConstructor");l(this,"url","");l(this,"searchStr",i.ref(""));this.classConstructor=e,this.item=i.reactive(new this.classConstructor),this.url=n}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetOptions(e="name",n="id"){const r=`${this.getUrl()}/options/${e}/${n}`,o=await Y.Get({query:r});o&&(this.options.splice(0,this.options.length),this.options.push(...o))}async GetAll(e){let n;const r=Y.Get;e&&e.withCache?n=await En.TryGet(this.getUrl(),r):n=await r({query:this.getUrl()}),Array.isArray(n)?this.SetAll(n):this.SetAllWithCount(n)}async Get(e){e||(e=Te.Id()),this.Set(await Y.Get({query:this.getUrl(e)}))}async GetBySlug(e){e||(e=Te.Slug()),this.Set(await R.H.HttpClient.Get({query:this.getUrl("by-slug/"+e)}))}async FTSP(e){var a;const r=((e==null?void 0:e.ftsp)??je.Get()).clearForHTTP(),o={payload:{ftsp:r},query:this.getUrl("ftsp")},s=await Y.Post(o);if(!(!s||!s.ftsp))if(Array.isArray(s.data))this.SetAll(s.data);else{if(r.p.append){this.AppendToAll((a=s.data)==null?void 0:a.items);return}this.SetAllWithCount(s.data)}}async Create(e){const n=e??this.item,r={payload:n,query:this.getUrl()};return n.getFileInfos&&(r.fileInfos=n.getFileInfos()),await Y.Post(r)}async CreateAndSet(e){const n=await this.Create(e);this.Set(n)}async CreateMany(e){if(!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Create(r)))}),Promise.all(n)}async Update(e){const n=e??this.item,r={query:this.getUrl(`${n.id}`),payload:n};return n.getFileInfos&&(r.fileInfos=n.getFileInfos(),r.fileInfos.forEach(o=>o.url="")),await Y.Put(r)}async UpdateAndSet(e){const n=await this.Update(e);this.Set(n)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(!e){console.warn("BaseStore/Remove. id is undefined");return}await Y.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}async UpdateMany(e){if(e||(e=this.items),!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Update(r)))}),Promise.all(n)}SetAll(e){e&&(this.items.splice(0,this.items.length),this.items.push(...e.map(n=>new this.classConstructor(n))))}SetAllWithCount(e){e&&(this.SetAll(e.items),this.count.value=e.count)}RemoveItem(e){const n=this.items.findIndex(r=>r.id===e);this.items.splice(n,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.push(...n);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){M.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.unshift(...n);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(e=>R.H.Strings.SearchInFields(this.searchStr.value,e.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function id(t,e){t=="left"&&e.next(),t=="right"&&e.prev()}const rd=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class od{static GetRandColor(e){return Ue.GetRandEL(e??rd)}}function mo(t,e){const n=[],r=e||Ee.Asc,o=r===Ee.Asc?Ee.Desc:Ee.Asc;return Object.values(t).forEach(s=>{n.push(s(r)),n.push(s(o))}),n.length>0&&!n.some(s=>s.default)&&(n[0].default=!0),e&&n.forEach(s=>{s.default&&(s.default=s.order===e)}),n}let sd=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",At.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",rn[At.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=rn[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Ue.GenerateNumsRange(this.startHour,this.endHour)}};const Ei=t=>t===8||t===46,ad=t=>t>46&&t<58,ld=t=>t>34&&t<41,cd=t=>t+".",dd=(t,e,n)=>{Ei(e)||ld(e)||(!ad(e)||n>9)&&t.preventDefault()};function ud(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let r=t.substring(3,5).replace(".","1");Number(r)>12&&(r="12");let o=t.substring(6,10).replace(".","1");Number(o)>2100&&(o="2100"),t=n+"."+r+"."+o}return t}function hd(t){const e=t.keyCode;let n=t.srcElement.value;const r=n.length;dd(t,e,r),!Ei(e)&&(r===2||r===5)&&(n=cd(n));const o=t.srcElement.value+String.fromCharCode(t.which);if(Ei(e)){t.srcElement.value=n;return}n.length===0&&Number(o)>3&&(n="3",t.preventDefault()),n.length===1&&Number(o)>31&&(n="31",t.preventDefault()),o.length===5&&Number(o.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=ud(n,r),t.srcElement.value=n}const fd=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],md="ru-RU";class Fe{constructor(){l(this,"locale","ru-RU")}static Format(e,n){if(!e)return"";const r={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return n&&(r.year=n.year||n.year===void 0?n.year:r.year,r.month=n.month||n.month===void 0?n.month:r.month,r.day=n.day||n.day===void 0?n.day:r.day,r.hour=n.hour??r.hour,r.minute=n.minute??r.minute),Intl.DateTimeFormat(md,r).format(new Date(e))}static FormatWithTime(e){return Fe.Format(e,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetPeriod(e,n,r){return`${this.Format(e,r)}-${this.Format(n,r)}`}static GetShortDayName(e){return e?fd[e.getDay()]:""}static GetCurrentWeekPeriod(e){const n=new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()-n.getDay()+1),o=new Date(n.getFullYear(),n.getMonth(),r.getDate()+7);return this.GetPeriod(r,o,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,n){const r=new Date,o=new Date,s=Fe.SplitHourTime(e),a=Fe.SplitHourTime(n);return r.setHours(s[0],s[1],0,0),o.setHours(a[0],a[1],0,0),(o.getTime()-r.getTime())/1e3/60}static HourTimeinMunutes(e){const n=Fe.SplitHourTime(e);return n[0]*60+n[1]}static SplitHourTime(e){const n=e.split(":");return[Number(n[0]),Number(n[1])]}static AddMinutesToHM(e,n){const r=new Date,o=Fe.SplitHourTime(e);r.setHours(o[0],o[1],0,0);const s=new Date(r.getTime()+n*6e4),a=s.getHours(),c=s.getMinutes();return`${a}:${c}`}static GetMonthsDiff(e,n){return n.getMonth()-e.getMonth()+12*(n.getFullYear()-e.getFullYear())}static StringToDate(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,n,r){return new Date(e)>=new Date(n)&&new Date(e)<=new Date(r)}static GetDatesFromPeriod(e,n){const r=[new Date(e)];let o=e;for(;o<=n;)o=Fe.AddDays(o,1),r.push(o);return r}static AddDays(e,n){const r=new Date(e);return r.setDate(r.getDate()+n),r}static Eq(e,n){return e.getTime()===n.getTime()}}class pd{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class po{static Get(e){const n=e.split(".");return n[n.length-1]}}const gd=(()=>{function t(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function n(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){t(s,[a]);return}const d=c.split(",");d.push(a),t(s,d)}function r(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const d=c.split(",").filter(u=>u!==a);t(s,d)}function o(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:n,removeFromFavourite:r,setFavourite:t,isFavourite:e,clearFavourite:o}})();/*!
20
20
  * vue-router v4.5.1
21
21
  * (c) 2025 Eduardo San Martin Morote
22
22
  * @license MIT
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "sprof",
3
3
  "description": "components for the designer and uikit.",
4
4
  "author": "Stanislav Lushnikov, Daniil Gaivoronskiy",
5
- "version": "0.1.17",
5
+ "version": "0.1.18",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "./dist/sprof.umd.cjs",