shared-ritm 1.2.134 → 1.2.136

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.
@@ -4,7 +4,7 @@
4
4
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(g){return g instanceof this?g:new this(g)}static concat(g,...B){const Q=new this(g);return B.forEach(w=>Q.set(w)),Q}static accessor(g){const Q=(this[FY]=this[FY]={accessors:{}}).accessors,w=this.prototype;function C(E){const e=mC(E);Q[e]||(Ed(w,E),Q[e]=!0)}return q.isArray(g)?g.forEach(C):C(g),this}};Dg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Dg.prototype,({value:A},g)=>{let B=g[0].toUpperCase()+g.slice(1);return{get:()=>A,set(Q){this[B]=Q}}}),q.freezeMethods(Dg);function rt(A,g){const B=this||JC,Q=g||B,w=Dg.from(Q.headers);let C=Q.data;return q.forEach(A,function(e){C=e.call(B,C,w.normalize(),g?g.status:void 0)}),w.normalize(),C}function aY(A){return!!(A&&A.__CANCEL__)}function pw(A,g,B){ZA.call(this,A??"canceled",ZA.ERR_CANCELED,g,B),this.name="CanceledError"}q.inherits(pw,ZA,{__CANCEL__:!0});function sY(A,g,B){const Q=B.config.validateStatus;!B.status||!Q||Q(B.status)?A(B):g(new ZA("Request failed with status code "+B.status,[ZA.ERR_BAD_REQUEST,ZA.ERR_BAD_RESPONSE][Math.floor(B.status/100)-4],B.config,B.request,B))}function ed(A){const g=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return g&&g[1]||""}function Id(A,g){A=A||10;const B=new Array(A),Q=new Array(A);let w=0,C=0,E;return g=g!==void 0?g:1e3,function(I){const o=Date.now(),n=Q[C];E||(E=o),B[w]=I,Q[w]=o;let i=C,c=0;for(;i!==w;)c+=B[i++],i=i%A;if(w=(w+1)%A,w===C&&(C=(C+1)%A),o-E<g)return;const Y=n&&o-n;return Y?Math.round(c*1e3/Y):void 0}}function td(A,g){let B=0,Q=1e3/g,w,C;const E=(o,n=Date.now())=>{B=n,w=null,C&&(clearTimeout(C),C=null),A.apply(null,o)};return[(...o)=>{const n=Date.now(),i=n-B;i>=Q?E(o,n):(w=o,C||(C=setTimeout(()=>{C=null,E(w)},Q-i)))},()=>w&&E(w)]}const SE=(A,g,B=3)=>{let Q=0;const w=Id(50,250);return td(C=>{const E=C.loaded,e=C.lengthComputable?C.total:void 0,I=E-Q,o=w(I),n=E<=e;Q=E;const i={loaded:E,total:e,progress:e?E/e:void 0,bytes:I,rate:o||void 0,estimated:o&&e&&n?(e-E)/o:void 0,event:C,lengthComputable:e!=null,[g?"download":"upload"]:!0};A(i)},B)},uY=(A,g)=>{const B=A!=null;return[Q=>g[0]({lengthComputable:B,total:A,loaded:Q}),g[1]]},UY=A=>(...g)=>q.asap(()=>A(...g)),od=Cg.hasStandardBrowserEnv?((A,g)=>B=>(B=new URL(B,Cg.origin),A.protocol===B.protocol&&A.host===B.host&&(g||A.port===B.port)))(new URL(Cg.origin),Cg.navigator&&/(msie|trident)/i.test(Cg.navigator.userAgent)):()=>!0,nd=Cg.hasStandardBrowserEnv?{write(A,g,B,Q,w,C){const E=[A+"="+encodeURIComponent(g)];q.isNumber(B)&&E.push("expires="+new Date(B).toGMTString()),q.isString(Q)&&E.push("path="+Q),q.isString(w)&&E.push("domain="+w),C===!0&&E.push("secure"),document.cookie=E.join("; ")},read(A){const g=document.cookie.match(new RegExp("(^|;\\s*)("+A+")=([^;]*)"));return g?decodeURIComponent(g[3]):null},remove(A){this.write(A,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function id(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function cd(A,g){return g?A.replace(/\/?\/$/,"")+"/"+g.replace(/^\/+/,""):A}function lY(A,g,B){let Q=!id(g);return A&&(Q||B==!1)?cd(A,g):g}const hY=A=>A instanceof Dg?{...A}:A;function _Q(A,g){g=g||{};const B={};function Q(o,n,i,c){return q.isPlainObject(o)&&q.isPlainObject(n)?q.merge.call({caseless:c},o,n):q.isPlainObject(n)?q.merge({},n):q.isArray(n)?n.slice():n}function w(o,n,i,c){if(q.isUndefined(n)){if(!q.isUndefined(o))return Q(void 0,o,i,c)}else return Q(o,n,i,c)}function C(o,n){if(!q.isUndefined(n))return Q(void 0,n)}function E(o,n){if(q.isUndefined(n)){if(!q.isUndefined(o))return Q(void 0,o)}else return Q(void 0,n)}function e(o,n,i){if(i in g)return Q(o,n);if(i in A)return Q(void 0,o)}const I={url:C,method:C,data:C,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:e,headers:(o,n,i)=>w(hY(o),hY(n),i,!0)};return q.forEach(Object.keys(Object.assign({},A,g)),function(n){const i=I[n]||w,c=i(A[n],g[n],n);q.isUndefined(c)&&i!==e||(B[n]=c)}),B}const GY=A=>{const g=_Q({},A);let{data:B,withXSRFToken:Q,xsrfHeaderName:w,xsrfCookieName:C,headers:E,auth:e}=g;g.headers=E=Dg.from(E),g.url=YY(lY(g.baseURL,g.url,g.allowAbsoluteUrls),A.params,A.paramsSerializer),e&&E.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):"")));let I;if(q.isFormData(B)){if(Cg.hasStandardBrowserEnv||Cg.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if((I=E.getContentType())!==!1){const[o,...n]=I?I.split(";").map(i=>i.trim()).filter(Boolean):[];E.setContentType([o||"multipart/form-data",...n].join("; "))}}if(Cg.hasStandardBrowserEnv&&(Q&&q.isFunction(Q)&&(Q=Q(g)),Q||Q!==!1&&od(g.url))){const o=w&&C&&nd.read(C);o&&E.set(w,o)}return g},Yd=typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(B,Q){const w=GY(A);let C=w.data;const E=Dg.from(w.headers).normalize();let{responseType:e,onUploadProgress:I,onDownloadProgress:o}=w,n,i,c,Y,M;function D(){Y&&Y(),M&&M(),w.cancelToken&&w.cancelToken.unsubscribe(n),w.signal&&w.signal.removeEventListener("abort",n)}let r=new XMLHttpRequest;r.open(w.method.toUpperCase(),w.url,!0),r.timeout=w.timeout;function a(){if(!r)return;const u=Dg.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),U={data:!e||e==="text"||e==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:u,config:A,request:r};sY(function(d){B(d),D()},function(d){Q(d),D()},U),r=null}"onloadend"in r?r.onloadend=a:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(a)},r.onabort=function(){r&&(Q(new ZA("Request aborted",ZA.ECONNABORTED,A,r)),r=null)},r.onerror=function(){Q(new ZA("Network Error",ZA.ERR_NETWORK,A,r)),r=null},r.ontimeout=function(){let F=w.timeout?"timeout of "+w.timeout+"ms exceeded":"timeout exceeded";const U=w.transitional||rY;w.timeoutErrorMessage&&(F=w.timeoutErrorMessage),Q(new ZA(F,U.clarifyTimeoutError?ZA.ETIMEDOUT:ZA.ECONNABORTED,A,r)),r=null},C===void 0&&E.setContentType(null),"setRequestHeader"in r&&q.forEach(E.toJSON(),function(F,U){r.setRequestHeader(U,F)}),q.isUndefined(w.withCredentials)||(r.withCredentials=!!w.withCredentials),e&&e!=="json"&&(r.responseType=w.responseType),o&&([c,M]=SE(o,!0),r.addEventListener("progress",c)),I&&r.upload&&([i,Y]=SE(I),r.upload.addEventListener("progress",i),r.upload.addEventListener("loadend",Y)),(w.cancelToken||w.signal)&&(n=u=>{r&&(Q(!u||u.type?new pw(null,A,r):u),r.abort(),r=null)},w.cancelToken&&w.cancelToken.subscribe(n),w.signal&&(w.signal.aborted?n():w.signal.addEventListener("abort",n)));const s=ed(w.url);if(s&&Cg.protocols.indexOf(s)===-1){Q(new ZA("Unsupported protocol "+s+":",ZA.ERR_BAD_REQUEST,A));return}r.send(C||null)})},Md=(A,g)=>{const{length:B}=A=A?A.filter(Boolean):[];if(g||B){let Q=new AbortController,w;const C=function(o){if(!w){w=!0,e();const n=o instanceof Error?o:this.reason;Q.abort(n instanceof ZA?n:new pw(n instanceof Error?n.message:n))}};let E=g&&setTimeout(()=>{E=null,C(new ZA(`timeout ${g} of ms exceeded`,ZA.ETIMEDOUT))},g);const e=()=>{A&&(E&&clearTimeout(E),E=null,A.forEach(o=>{o.unsubscribe?o.unsubscribe(C):o.removeEventListener("abort",C)}),A=null)};A.forEach(o=>o.addEventListener("abort",C));const{signal:I}=Q;return I.unsubscribe=()=>q.asap(e),I}},rd=function*(A,g){let B=A.byteLength;if(B<g){yield A;return}let Q=0,w;for(;Q<B;)w=Q+g,yield A.slice(Q,w),Q=w},Dd=async function*(A,g){for await(const B of Fd(A))yield*rd(B,g)},Fd=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}const g=A.getReader();try{for(;;){const{done:B,value:Q}=await g.read();if(B)break;yield Q}}finally{await g.cancel()}},dY=(A,g,B,Q)=>{const w=Dd(A,g);let C=0,E,e=I=>{E||(E=!0,Q&&Q(I))};return new ReadableStream({async pull(I){try{const{done:o,value:n}=await w.next();if(o){e(),I.close();return}let i=n.byteLength;if(B){let c=C+=i;B(c)}I.enqueue(new Uint8Array(n))}catch(o){throw e(o),o}},cancel(I){return e(I),w.return()}},{highWaterMark:2})},LE=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",HY=LE&&typeof ReadableStream=="function",ad=LE&&(typeof TextEncoder=="function"?(A=>g=>A.encode(g))(new TextEncoder):async A=>new Uint8Array(await new Response(A).arrayBuffer())),fY=(A,...g)=>{try{return!!A(...g)}catch{return!1}},sd=HY&&fY(()=>{let A=!1;const g=new Request(Cg.origin,{body:new ReadableStream,method:"POST",get duplex(){return A=!0,"half"}}).headers.has("Content-Type");return A&&!g}),JY=64*1024,Dt=HY&&fY(()=>q.isReadableStream(new Response("").body)),VE={stream:Dt&&(A=>A.body)};LE&&(A=>{["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!VE[g]&&(VE[g]=q.isFunction(A[g])?B=>B[g]():(B,Q)=>{throw new ZA(`Response type '${g}' is not supported`,ZA.ERR_NOT_SUPPORT,Q)})})})(new Response);const ud=async A=>{if(A==null)return 0;if(q.isBlob(A))return A.size;if(q.isSpecCompliantForm(A))return(await new Request(Cg.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(q.isArrayBufferView(A)||q.isArrayBuffer(A))return A.byteLength;if(q.isURLSearchParams(A)&&(A=A+""),q.isString(A))return(await ad(A)).byteLength},Ud=async(A,g)=>{const B=q.toFiniteNumber(A.getContentLength());return B??ud(g)},Ft={http:SG,xhr:Yd,fetch:LE&&(async A=>{let{url:g,method:B,data:Q,signal:w,cancelToken:C,timeout:E,onDownloadProgress:e,onUploadProgress:I,responseType:o,headers:n,withCredentials:i="same-origin",fetchOptions:c}=GY(A);o=o?(o+"").toLowerCase():"text";let Y=Md([w,C&&C.toAbortSignal()],E),M;const D=Y&&Y.unsubscribe&&(()=>{Y.unsubscribe()});let r;try{if(I&&sd&&B!=="get"&&B!=="head"&&(r=await Ud(n,Q))!==0){let U=new Request(g,{method:"POST",body:Q,duplex:"half"}),l;if(q.isFormData(Q)&&(l=U.headers.get("content-type"))&&n.setContentType(l),U.body){const[d,H]=uY(r,SE(UY(I)));Q=dY(U.body,JY,d,H)}}q.isString(i)||(i=i?"include":"omit");const a="credentials"in Request.prototype;M=new Request(g,{...c,signal:Y,method:B.toUpperCase(),headers:n.normalize().toJSON(),body:Q,duplex:"half",credentials:a?i:void 0});let s=await fetch(M,c);const u=Dt&&(o==="stream"||o==="response");if(Dt&&(e||u&&D)){const U={};["status","statusText","headers"].forEach(h=>{U[h]=s[h]});const l=q.toFiniteNumber(s.headers.get("content-length")),[d,H]=e&&uY(l,SE(UY(e),!0))||[];s=new Response(dY(s.body,JY,d,()=>{H&&H(),D&&D()}),U)}o=o||"text";let F=await VE[q.findKey(VE,o)||"text"](s,A);return!u&&D&&D(),await new Promise((U,l)=>{sY(U,l,{data:F,headers:Dg.from(s.headers),status:s.status,statusText:s.statusText,config:A,request:M})})}catch(a){throw D&&D(),a&&a.name==="TypeError"&&/Load failed|fetch/i.test(a.message)?Object.assign(new ZA("Network Error",ZA.ERR_NETWORK,A,M),{cause:a.cause||a}):ZA.from(a,a&&a.code,A,M)}})};q.forEach(Ft,(A,g)=>{if(A){try{Object.defineProperty(A,"name",{value:g})}catch{}Object.defineProperty(A,"adapterName",{value:g})}});const mY=A=>`- ${A}`,ld=A=>q.isFunction(A)||A===null||A===!1,NY={getAdapter:A=>{A=q.isArray(A)?A:[A];const{length:g}=A;let B,Q;const w={};for(let C=0;C<g;C++){B=A[C];let E;if(Q=B,!ld(B)&&(Q=Ft[(E=String(B)).toLowerCase()],Q===void 0))throw new ZA(`Unknown adapter '${E}'`);if(Q)break;w[E||"#"+C]=Q}if(!Q){const C=Object.entries(w).map(([e,I])=>`adapter ${e} `+(I===!1?"is not supported by the environment":"is not available in the build"));let E=g?C.length>1?`since :
5
5
  `+C.map(mY).join(`
6
6
  `):" "+mY(C[0]):"as no adapter specified";throw new ZA("There is no suitable adapter to dispatch the request "+E,"ERR_NOT_SUPPORT")}return Q},adapters:Ft};function at(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new pw(null,A)}function RY(A){return at(A),A.headers=Dg.from(A.headers),A.data=rt.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),NY.getAdapter(A.adapter||JC.adapter)(A).then(function(Q){return at(A),Q.data=rt.call(A,A.transformResponse,Q),Q.headers=Dg.from(Q.headers),Q},function(Q){return aY(Q)||(at(A),Q&&Q.response&&(Q.response.data=rt.call(A,A.transformResponse,Q.response),Q.response.headers=Dg.from(Q.response.headers))),Promise.reject(Q)})}const PY="1.10.0",KE={};["object","boolean","number","function","string","symbol"].forEach((A,g)=>{KE[A]=function(Q){return typeof Q===A||"a"+(g<1?"n ":" ")+A}});const vY={};KE.transitional=function(g,B,Q){function w(C,E){return"[Axios v"+PY+"] Transitional option '"+C+"'"+E+(Q?". "+Q:"")}return(C,E,e)=>{if(g===!1)throw new ZA(w(E," has been removed"+(B?" in "+B:"")),ZA.ERR_DEPRECATED);return B&&!vY[E]&&(vY[E]=!0,console.warn(w(E," has been deprecated since v"+B+" and will be removed in the near future"))),g?g(C,E,e):!0}},KE.spelling=function(g){return(B,Q)=>(console.warn(`${Q} is likely a misspelling of ${g}`),!0)};function hd(A,g,B){if(typeof A!="object")throw new ZA("options must be an object",ZA.ERR_BAD_OPTION_VALUE);const Q=Object.keys(A);let w=Q.length;for(;w-- >0;){const C=Q[w],E=g[C];if(E){const e=A[C],I=e===void 0||E(e,C,A);if(I!==!0)throw new ZA("option "+C+" must be "+I,ZA.ERR_BAD_OPTION_VALUE);continue}if(B!==!0)throw new ZA("Unknown option "+C,ZA.ERR_BAD_OPTION)}}const xE={assertOptions:hd,validators:KE},xg=xE.validators;let $Q=class{constructor(g){this.defaults=g||{},this.interceptors={request:new MY,response:new MY}}async request(g,B){try{return await this._request(g,B)}catch(Q){if(Q instanceof Error){let w={};Error.captureStackTrace?Error.captureStackTrace(w):w=new Error;const C=w.stack?w.stack.replace(/^.+\n/,""):"";try{Q.stack?C&&!String(Q.stack).endsWith(C.replace(/^.+\n.+\n/,""))&&(Q.stack+=`
7
- `+C):Q.stack=C}catch{}}throw Q}}_request(g,B){typeof g=="string"?(B=B||{},B.url=g):B=g||{},B=_Q(this.defaults,B);const{transitional:Q,paramsSerializer:w,headers:C}=B;Q!==void 0&&xE.assertOptions(Q,{silentJSONParsing:xg.transitional(xg.boolean),forcedJSONParsing:xg.transitional(xg.boolean),clarifyTimeoutError:xg.transitional(xg.boolean)},!1),w!=null&&(q.isFunction(w)?B.paramsSerializer={serialize:w}:xE.assertOptions(w,{encode:xg.function,serialize:xg.function},!0)),B.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?B.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:B.allowAbsoluteUrls=!0),xE.assertOptions(B,{baseUrl:xg.spelling("baseURL"),withXsrfToken:xg.spelling("withXSRFToken")},!0),B.method=(B.method||this.defaults.method||"get").toLowerCase();let E=C&&q.merge(C.common,C[B.method]);C&&q.forEach(["delete","get","head","post","put","patch","common"],M=>{delete C[M]}),B.headers=Dg.concat(E,C);const e=[];let I=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(B)===!1||(I=I&&D.synchronous,e.unshift(D.fulfilled,D.rejected))});const o=[];this.interceptors.response.forEach(function(D){o.push(D.fulfilled,D.rejected)});let n,i=0,c;if(!I){const M=[RY.bind(this),void 0];for(M.unshift.apply(M,e),M.push.apply(M,o),c=M.length,n=Promise.resolve(B);i<c;)n=n.then(M[i++],M[i++]);return n}c=e.length;let Y=B;for(i=0;i<c;){const M=e[i++],D=e[i++];try{Y=M(Y)}catch(r){D.call(this,r);break}}try{n=RY.call(this,Y)}catch(M){return Promise.reject(M)}for(i=0,c=o.length;i<c;)n=n.then(o[i++],o[i++]);return n}getUri(g){g=_Q(this.defaults,g);const B=lY(g.baseURL,g.url,g.allowAbsoluteUrls);return YY(B,g.params,g.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(g){$Q.prototype[g]=function(B,Q){return this.request(_Q(Q||{},{method:g,url:B,data:(Q||{}).data}))}}),q.forEach(["post","put","patch"],function(g){function B(Q){return function(C,E,e){return this.request(_Q(e||{},{method:g,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:C,data:E}))}}$Q.prototype[g]=B(),$Q.prototype[g+"Form"]=B(!0)});let Gd=class EF{constructor(g){if(typeof g!="function")throw new TypeError("executor must be a function.");let B;this.promise=new Promise(function(C){B=C});const Q=this;this.promise.then(w=>{if(!Q._listeners)return;let C=Q._listeners.length;for(;C-- >0;)Q._listeners[C](w);Q._listeners=null}),this.promise.then=w=>{let C;const E=new Promise(e=>{Q.subscribe(e),C=e}).then(w);return E.cancel=function(){Q.unsubscribe(C)},E},g(function(C,E,e){Q.reason||(Q.reason=new pw(C,E,e),B(Q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(g){if(this.reason){g(this.reason);return}this._listeners?this._listeners.push(g):this._listeners=[g]}unsubscribe(g){if(!this._listeners)return;const B=this._listeners.indexOf(g);B!==-1&&this._listeners.splice(B,1)}toAbortSignal(){const g=new AbortController,B=Q=>{g.abort(Q)};return this.subscribe(B),g.signal.unsubscribe=()=>this.unsubscribe(B),g.signal}static source(){let g;return{token:new EF(function(w){g=w}),cancel:g}}};function dd(A){return function(B){return A.apply(null,B)}}function Hd(A){return q.isObject(A)&&A.isAxiosError===!0}const st={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(st).forEach(([A,g])=>{st[g]=A});function kY(A){const g=new $Q(A),B=$c($Q.prototype.request,g);return q.extend(B,$Q.prototype,g,{allOwnKeys:!0}),q.extend(B,g,null,{allOwnKeys:!0}),B.create=function(w){return kY(_Q(A,w))},B}const PB=kY(JC);PB.Axios=$Q,PB.CanceledError=pw,PB.CancelToken=Gd,PB.isCancel=aY,PB.VERSION=PY,PB.toFormData=WE,PB.AxiosError=ZA,PB.Cancel=PB.CanceledError,PB.all=function(g){return Promise.all(g)},PB.spread=dd,PB.isAxiosError=Hd,PB.mergeConfig=_Q,PB.AxiosHeaders=Dg,PB.formToJSON=A=>DY(q.isHTMLForm(A)?new FormData(A):A),PB.getAdapter=NY.getAdapter,PB.HttpStatusCode=st,PB.default=PB;const{Axios:rk,AxiosError:Dk,CanceledError:Fk,isCancel:ak,CancelToken:sk,VERSION:uk,all:Uk,Cancel:lk,isAxiosError:hk,spread:Gk,toFormData:dk,AxiosHeaders:Hk,HttpStatusCode:fk,formToJSON:Jk,getAdapter:mk,mergeConfig:Nk}=PB;class XB{constructor(){CF(this,"axiosInstance");this.axiosInstance=PB.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(g=>{const B=this.getToken();return B&&g.headers&&(g.headers.Authorization=`Bearer ${B}`),g},g=>Promise.reject(g)),this.axiosInstance.interceptors.response.use(g=>g.data,g=>{var B,Q;return(((B=g.response)==null?void 0:B.status)===401||((Q=g.response)==null?void 0:Q.status)===403)&&this.logout(),Promise.reject(g)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){this.removeToken(),window.location.href="/sign-in"}handleError(g){g.response?console.error("API Error:",g.response.status,g.response.data):g.request?console.error("No response received:",g.request):console.error("Error during request setup:",g.message)}async get(g,B){try{const Q=await this.axiosInstance.get(g,B);return(Q==null?void 0:Q.data)===!1?!1:(Q==null?void 0:Q.data)??Q}catch(Q){const w=Q;throw this.handleError(w),Q}}async delete(g,B){try{return await this.axiosInstance.delete(g,B)}catch(Q){const w=Q;throw this.handleError(w),Q}}async post(g,B,Q){try{const w=await this.axiosInstance.post(g,B,Q);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const C=w;throw this.handleError(C),w}}async patch(g,B,Q){try{return(await this.axiosInstance.patch(g,B,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}async put(g,B,Q){try{return(await this.axiosInstance.put(g,B,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}}class fd extends XB{async fetchCriticalPathTasks(g){return await this.get(`gantt/get_list_task_on_critical_path?${g}`)}async fetchGanttList(g){return await this.get(`/list/tasks/search?${g}&gantt=1`)}}let ut;function Jd(){return ut||(ut=new fd),ut}class md extends XB{async fetchPieProjects(g){return await this.get("repairs/pie/projects?"+g)}async fetchPieTasks(g){return await this.get("repairs/pie/tasks?"+g)}async fetchPiePersonnel(g){return await this.get("repairs/metrics/get_list_position?"+g)}async fetchPersonnelData(g){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+g)}async fetchPersonnelInfo(g){return await this.get(`repairs/metrics/list_position_intersection_details?${g}`)}async fetchPiePersonnelInfo(g){return await this.get(`repairs/metrics/get_list_user_by_position?${g}`)}async fetchPieCriticalPath(g){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+g)}async fetchPieCriticalPathInfo(g){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${g}`)}async fetchPieTmc(g){return await this.get("repairs/metrics/get_list_instrument_type?"+g)}async fetchPieTmcInfo(g){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${g}`)}async fetchPieUntimelyClosedTask(g){return await this.get("repairs/metrics/get_list_comment_type?"+g)}async fetchPieUntimelyClosedTaskInfo(g){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${g}`)}async fetchPieAdditionalTasks(g){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+g)}async fetchPieAdditionalTasksInfo(g){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${g}`)}async fetchPersonnel(g){return await this.get("repairs/statistic/personnel?"+g)}async fetchPieExpired(g){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+g)}async fetchPieExpiredInfo(g){return await this.get(`repairs/metrics/get_list_task_expired?${g}`)}async fetchEconomicsPerformance(g){return await this.get(`repairs/metrics/get_economic_performance?${g}`)}async fetchEconomicsInfo(g){return await this.get(`repairs/metrics/get_list_task_economic_performance?${g}`)}async fetchQualityMetrics(g){return await this.get(`repairs/metrics/get_quality_metrics?${g}`)}async fetchQualityInfo(g){return await this.get(`repairs/metrics/get_list_task_by_quality?${g}`)}async fetchPieWorkZone(g){return await this.get("repairs/metrics/get_statistics_on_controller_zones?"+g)}async fetchWorkZoneInfo(g){return await this.get("exposed_equipment_zones/list?"+g)}async fetchPieAllTasks(g){return await this.get("repairs/metrics/get_list_task_group_by_status?"+g)}async fetchPieAllTasksInfo(g){return await this.get("repairs/metrics/get_list_task_by_status?"+g)}}let Ut;function Nd(){return Ut||(Ut=new md),Ut}class Rd extends XB{async fetchProjectById(g){return this.get(`/projects/${g}`)}createProject(g){return this.post("/projects",g)}editProject(g,B){return this.put(`/projects/${g}`,B)}fetchProjects(g){return this.get("/search/projects",{params:g})}cloneProject(g){return this.post(`projects/${g.id}/clone`,g)}archiveProject(g,B){return this.put(`/projects/${g}`,B)}unArchiveProject(g,B){return this.put(`/projects/${g}`,B)}moveAprProject(g){return this.post("repairs/move_plan_to_real",{repairs:[g]})}restoreProject(g){return this.post("/restore_project",{projects_ids:[g]})}importTasks(g){return this.post("tasks/import",g)}importKtd(g){return this.post("/parse_ktd",g,{headers:{"Content-Type":"multipart/form-data"}})}checkStatusParser(g){return this.post("/check_parse_ktd",g)}fetchProjectTeamList(g){return this.put(`/projects/${g}`,null)}deleteProject(g){return this.delete(`/projects/${g}`)}getDynamicProgressWidget(g){return this.get(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${g}`)}removeRootIntervals(){return this.post("/delete/fake/projects",null)}addRootIntervals(g,B){return this.post(`/set/fake/projects/${g}`,B)}}let lt;function Pd(){return lt||(lt=new Rd),lt}class vd extends XB{fetchFilters(g){return this.get(`get_list_repair?smart=1&${g}`)}fetchRepairs(g,B,Q,w,C){return this.get("get_list_repair"+(g?`${B}&per_page=100000${C?"&"+C:""}&${Q?"":w}`:`?per_page=100000${C?"&"+C:""}&${w}`))}fetchRepairTemplates({equipmentId:g,categoryCode:B}){return this.get(`repairs/get_repair_template_list?per_page=100000&categoryCodeList[0]=${B}&equipmentIdList[0]=${g}`)}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(g){return this.post("/repairs/equipments",g)}createRepairFromTemplate(g){return this.post("/repairs/create_repair_from_repair_template",g)}startRepair(g){return this.post(`/repairs/${g}/start`,null)}finishRepair(g){return this.post("/repairs/complete_repair_list",{repairIdList:[g]})}finishPreparationProject(g){return this.post(`/repairs/${g}/finish_preparation`,null)}moveRepairToCurrent(g){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[g]})}moveArchiveToCurrent(g){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[g]})}moveRepairToApr(g){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[g]})}moveRepairToArchive(g){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[g]})}restoreRepair(g){return this.post("/restore_repair",{repairs_ids:[g]})}updateRepair(g,B){return this.put(`/repairs/${B}`,g)}copyRepair(g){return this.post(`/repairs/${g}/clone`,null)}deleteRepair(g){return this.delete(`/repairs/${g}`)}fetchIntersection(g){return this.get(`v3/repairs/${g}/personnel/intersection`)}}let ht;function kd(){return ht||(ht=new vd),ht}class Td extends XB{fetchTaskById(g){return this.get(`/tasks/${g}`)}fetchTasksList(g){return this.get("/list/tasks/search",{params:g})}fetchSubtasksList(g){return this.get(`/task/${g}/subtasks/list`)}fetchTaskBranch(g){return this.get(`/get_list_task_branch?task_id=${g}`)}fetchInstrumentsList(g){return this.get("admin/instruments",{params:g})}fetchInstrumentTypeListWithPreparedWarehouse(g){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:g})}fetchInstrumentsEquivalentList(g){return this.get("tasks/instrument/list",{params:g})}fetchDiffInstruments(g){return this.get(`tasks/${g.taskId}/fill/module`,{params:g})}replaceInstruments(g){return this.post("/instruments/equivalent/attach",g)}fetchTaskUsagePersonal(g){return this.get(`tasks/${g}/usage/users`)}fetchTaskUsageInstrument(g){return this.get(`tasks/${g}/usage/instruments`)}fetchEquipment(g){return this.get("repairs/equipment/list",{params:g})}fetchTaskVideoSources(g){return this.get("work_zone/get_list_video_source",{params:g})}fetchTaskVideoSourcesStream(g){return this.get("horizon/video-source",{params:g})}createWorkZone(g){return this.post("admin/work-zones",g)}createTask(g){return this.post("tasks",g)}editTask(g,B){return this.put(`tasks/${g}`,B)}mergeTask(g){return this.post("tasks/merge",g)}deleteTask(g){return this.delete(`tasks/${g}`)}changeStatus(g,B){return this.put(`task/${g}/change-status`,{status_id:B})}saveMetrics(g){return this.put("/update_quality_metrics",g)}checkReasonForStatus(g){return this.post("/tasks/check_reason_for_task",{task_id:g})}verifyTaskStatus(g,B){return this.get(`/task/${g}/change-status/verification`,{params:{status_id:B}})}checkBranchBeforeCloseTask(g){return this.post("/check_branch_before_close_task",{task_id:g})}}let Gt;function jd(){return Gt||(Gt=new Td),Gt}class pd extends XB{login(g,B){return this.post("/login",{email:g,password:B})}loginPhoto(g){return this.post("/login/from_photo",{photo:g})}loginVideo(g){return this.post("/login/video",g,{transformRequest:B=>B})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}changePassword(g,B,Q){return this.put(`/users/${g}/password`,{password:B,password_confirmation:Q})}}let dt;function yd(){return dt||(dt=new pd),dt}class zd extends XB{uploadFile(g){return this.post("/upload-file",g,{headers:{"Content-Type":"multipart/form-data"}})}}let Ht;function Wd(){return Ht||(Ht=new zd),Ht}class bd extends XB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}reloadVideoAnalytics(g){return this.post("/horizon/video-source/reload",{video_source_ids:g})}hardReloadStream(){return this.post("horizon/video-source/streams/add",null)}async fetchWorkZones(g){return await this.get("/search/work_zones",{params:g})}async fetchWorkZone(g){return await this.get(`/work_zone/get_work_zone/${g}`)}async editWorkZone(g,B){return await this.put(`/admin/work-zones/${g}`,B)}async deleteWorkZone(g){return await this.delete(`/admin/work-zones/${g}`)}async fetchVideoSources(g){return await this.get("/search/video_sources",{params:g})}async createVideoSource(g){return await this.post("horizon/video-source",g)}async editVideoSource(g,B){return await this.put(`/horizon/video-source/${g}`,B)}async deleteVideoSource(g){await this.delete(`/horizon/video-source/${g}`)}async fetchListRepairsVideoSource(g){return await this.get("work_zone/get_list_video_source_by_repair",{params:g})}async sendCombination(g){return await this.post("horizon/video-source/training",g)}async saveCombination(g){return await this.post("horizon/video-source/bind",g)}async fetchCombination(g){return await this.get("horizon/video-source/bind/show",{params:g})}async startTraining(g){return await this.post("horizon/video-source/training/start",g)}async stopTraining(g){return await this.post("horizon/video-source/training/stop",g)}async fetchTrainingInfo(g){return await this.get("horizon/video-source/training/info",{params:g})}async fetchTrainingStatus(g){return await this.get("horizon/video-source/training/status",{params:g})}async fetchVisualizationDataLink(g){return await this.get("horizon/video-source/link/video/training",{params:g})}async updateVisualizationData(g){return await this.get("horizon/video-source/download/video/training",{params:g})}}let ft;function Sd(){return ft||(ft=new bd),ft}class Ld extends XB{async editUser({id:g,model:B}){return await this.put(`/admin/users/${g}`,B)}async getUser(g){return await this.get(`/admin/users/${g}`)}async createUser(g){return await this.post("/admin/users",g)}async deleteUser({user_id:g,archive_reason:B}){return await this.post("/users/archive_user",{user_id:g,archive_reason:B})}async deleteUserPhotos({user_id:g,photos:B}){return await this.post("/users/photos/delete",{user_id:g,photos:B})}async restoreUser(g){return await this.post("/users/restore_user",{user_id:g})}async getRoles(g){return await this.get("/search/roles",{params:g})}async getPositions(g){return await this.get("/search/positions",{params:g})}async createPosition(g){return await this.post("/admin/positions",g)}async editPosition(g,B){return await this.put(`/admin/positions/${g}`,B)}async deletePosition(g){return await this.delete(`/admin/positions/${g}`)}async getTeams(g){return await this.get("/search/teams",{params:g})}async createTeam(g){return await this.post("/teams",g)}async editTeam(g,B){return await this.patch(`/teams/${g}`,B)}async deleteTeam(g){return await this.delete(`/teams/${g}`)}async checkUserVectors(g){return await this.get(`/user/get-vectors/${g}`)}async addUserVectors(g){return await this.post("/user/add-vector",g,{headers:{"Content-Type":"multipart/form-data"}})}async removeUserVectors(g){return await this.delete(`/user/delete-vectors/${g}`)}}let Jt;function Vd(){return Jt||(Jt=new Ld),Jt}class Kd extends XB{async fetchUserInstrumentsHistory(g,B){const Q={status:"issued",page:B,desc:"desc",column:"issued_in"};return await this.get(`users/${g}/instruments`,{params:Q})}async fetchWarehouses(g){return await this.get("search/warehouses",{params:g})}async fetchWarehouse(g){return await this.get(`admin/warehouses/${g}`)}async fetchStatusHistory(g){return await this.get(`warehouses/${g}/history/status`)}async createWarehouse(g){return await this.post("admin/warehouses",g)}async editWarehouse({id:g,model:B}){return await this.put(`admin/warehouses/${g}`,B)}deleteWarehouse(g){return this.delete(`admin/warehouses/${g}`)}async unsetWarehouseRfid(g){return await this.post("warehouses/unset-rfid",g)}}let mt;function xd(){return mt||(mt=new Kd),mt}class Xd extends XB{fetchControlZones(g){return this.get("/frame/list",{params:g})}async fetchControlZone(g){return this.get(`/frame/${g}`)}createControlZone(g){return this.post("/frame",g)}editControlZone(g,B){return this.put(`/frame/${g}`,B)}deleteControlZone(g){return this.delete(`/frame/${g}`)}fetchControlLogs(g){return this.get("/exposed_equipment_zones/list_for_controller",{params:g})}fetchControllers(g){return this.get("/frame/controllers/list",{params:g})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(g){return this.post("exposed_equipment_zones/hand/enter",g)}manualExit(g){return this.post("exposed_equipment_zones/hand/exit",g)}deleteControlLogs(g){return this.delete("exposed_equipment_zones",g)}fetchInstrumentTypeList(g){return this.get("search/instrument_types",{params:g})}fetchInstrumentCategoryList(g={}){return this.get("instrument_category/list",{params:g})}createInstrumentType(g){return this.post("admin/instruments",g)}editInstrumentType(g,B){return this.put(`admin/instruments/${g}`,B)}deleteInstrumentType(g){return this.delete(`admin/instruments/${g}`)}fetchRpdzLogList(g){return this.get("exposed_equipment_zones_history/list",{params:g})}}let Nt;function Od(){return Nt||(Nt=new Xd),Nt}class Zd extends XB{fetchSearchUsers(g){return this.get("search/users",{params:g})}fetchSearchInstruments(g){return this.get("search/instrument_type",{params:g})}fetchSearchModules(g){return this.get("search/modules",{params:g})}}let Rt;function qd(){return Rt||(Rt=new Zd),Rt}class _d extends XB{async detectModule(g){return await this.get(`module/${g}/detect`)}async createModule(g){return await this.post("admin/modules",g)}async editModule({id:g,model:B}){return await this.put(`admin/modules/${g}`,B)}deleteModule(g){return this.delete(`admin/modules/${g}`)}}let Pt;function $d(){return Pt||(Pt=new _d),Pt}class AH extends XB{async uploadComment(g){return await this.post("comments",g)}async deleteComment(g){return await this.delete(`comments/${g}`)}async editComment(g,B){return await this.put(`comments/${g}`,B)}}let vt;function BH(){return vt||(vt=new AH),vt}class gH extends XB{fetchEquipment(g){return this.get("repairs/equipment/list",{params:g})}createEquipment(g){return this.post("repairs/equipment",g)}editEquipment(g,B){return this.put(`repairs/equipment/${g}`,B)}deleteEquipment(g){return this.delete(`repairs/equipment/${g}`)}}let kt;function QH(){return kt||(kt=new gH),kt}class wH extends XB{fetchBrigades(g){return this.get("/search/brigades",{params:g})}editBrigade({id:g,model:B}){return this.put(`/brigades/${g}`,B)}getBrigade(g){return this.get(`/brigades/${g}`)}createBrigade(g){return this.post("/brigades",g)}deleteBrigade(g){return this.delete(`/brigades/${g}`)}}let Tt;function CH(){return Tt||(Tt=new wH),Tt}class EH extends XB{fetchScheduleConfig(){return this.get("schedule/config")}fetchSchedule(g){return this.get(`schedule/${g}`)}fetchScheduleTable(g){return this.get(`schedule/${g}/get_brigades_table`)}completeBrigadeSchedule(g,B){return this.post(`schedule/${g}/complete_brigade_schedule`,B)}autocompleteBrigadesSchedule(g,B){return this.post(`schedule/${g}/autocomplete`,B)}addBrigadeShift(g,B){return this.post(`schedule/${g}/shifts`,B)}swapBrigadeShifts(g,B){return this.patch(`schedule/${g}/shifts/switch_shift_templates`,B)}editBrigadeShifts(g,B){return this.patch(`schedule/${g}/shifts`,B)}deleteBrigadeShifts(g,B){return this.delete(`schedule/${g}/shifts`,{data:{shift_ids:B}})}deleteBrigadesFromSchedule(g,B){return this.patch(`schedule/${g}/delete_brigades`,{brigade_ids:B})}}let jt;function eH(){return jt||(jt=new EH),jt}/**
7
+ `+C):Q.stack=C}catch{}}throw Q}}_request(g,B){typeof g=="string"?(B=B||{},B.url=g):B=g||{},B=_Q(this.defaults,B);const{transitional:Q,paramsSerializer:w,headers:C}=B;Q!==void 0&&xE.assertOptions(Q,{silentJSONParsing:xg.transitional(xg.boolean),forcedJSONParsing:xg.transitional(xg.boolean),clarifyTimeoutError:xg.transitional(xg.boolean)},!1),w!=null&&(q.isFunction(w)?B.paramsSerializer={serialize:w}:xE.assertOptions(w,{encode:xg.function,serialize:xg.function},!0)),B.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?B.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:B.allowAbsoluteUrls=!0),xE.assertOptions(B,{baseUrl:xg.spelling("baseURL"),withXsrfToken:xg.spelling("withXSRFToken")},!0),B.method=(B.method||this.defaults.method||"get").toLowerCase();let E=C&&q.merge(C.common,C[B.method]);C&&q.forEach(["delete","get","head","post","put","patch","common"],M=>{delete C[M]}),B.headers=Dg.concat(E,C);const e=[];let I=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(B)===!1||(I=I&&D.synchronous,e.unshift(D.fulfilled,D.rejected))});const o=[];this.interceptors.response.forEach(function(D){o.push(D.fulfilled,D.rejected)});let n,i=0,c;if(!I){const M=[RY.bind(this),void 0];for(M.unshift.apply(M,e),M.push.apply(M,o),c=M.length,n=Promise.resolve(B);i<c;)n=n.then(M[i++],M[i++]);return n}c=e.length;let Y=B;for(i=0;i<c;){const M=e[i++],D=e[i++];try{Y=M(Y)}catch(r){D.call(this,r);break}}try{n=RY.call(this,Y)}catch(M){return Promise.reject(M)}for(i=0,c=o.length;i<c;)n=n.then(o[i++],o[i++]);return n}getUri(g){g=_Q(this.defaults,g);const B=lY(g.baseURL,g.url,g.allowAbsoluteUrls);return YY(B,g.params,g.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(g){$Q.prototype[g]=function(B,Q){return this.request(_Q(Q||{},{method:g,url:B,data:(Q||{}).data}))}}),q.forEach(["post","put","patch"],function(g){function B(Q){return function(C,E,e){return this.request(_Q(e||{},{method:g,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:C,data:E}))}}$Q.prototype[g]=B(),$Q.prototype[g+"Form"]=B(!0)});let Gd=class EF{constructor(g){if(typeof g!="function")throw new TypeError("executor must be a function.");let B;this.promise=new Promise(function(C){B=C});const Q=this;this.promise.then(w=>{if(!Q._listeners)return;let C=Q._listeners.length;for(;C-- >0;)Q._listeners[C](w);Q._listeners=null}),this.promise.then=w=>{let C;const E=new Promise(e=>{Q.subscribe(e),C=e}).then(w);return E.cancel=function(){Q.unsubscribe(C)},E},g(function(C,E,e){Q.reason||(Q.reason=new pw(C,E,e),B(Q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(g){if(this.reason){g(this.reason);return}this._listeners?this._listeners.push(g):this._listeners=[g]}unsubscribe(g){if(!this._listeners)return;const B=this._listeners.indexOf(g);B!==-1&&this._listeners.splice(B,1)}toAbortSignal(){const g=new AbortController,B=Q=>{g.abort(Q)};return this.subscribe(B),g.signal.unsubscribe=()=>this.unsubscribe(B),g.signal}static source(){let g;return{token:new EF(function(w){g=w}),cancel:g}}};function dd(A){return function(B){return A.apply(null,B)}}function Hd(A){return q.isObject(A)&&A.isAxiosError===!0}const st={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(st).forEach(([A,g])=>{st[g]=A});function kY(A){const g=new $Q(A),B=$c($Q.prototype.request,g);return q.extend(B,$Q.prototype,g,{allOwnKeys:!0}),q.extend(B,g,null,{allOwnKeys:!0}),B.create=function(w){return kY(_Q(A,w))},B}const PB=kY(JC);PB.Axios=$Q,PB.CanceledError=pw,PB.CancelToken=Gd,PB.isCancel=aY,PB.VERSION=PY,PB.toFormData=WE,PB.AxiosError=ZA,PB.Cancel=PB.CanceledError,PB.all=function(g){return Promise.all(g)},PB.spread=dd,PB.isAxiosError=Hd,PB.mergeConfig=_Q,PB.AxiosHeaders=Dg,PB.formToJSON=A=>DY(q.isHTMLForm(A)?new FormData(A):A),PB.getAdapter=NY.getAdapter,PB.HttpStatusCode=st,PB.default=PB;const{Axios:rk,AxiosError:Dk,CanceledError:Fk,isCancel:ak,CancelToken:sk,VERSION:uk,all:Uk,Cancel:lk,isAxiosError:hk,spread:Gk,toFormData:dk,AxiosHeaders:Hk,HttpStatusCode:fk,formToJSON:Jk,getAdapter:mk,mergeConfig:Nk}=PB;class XB{constructor(){CF(this,"axiosInstance");this.axiosInstance=PB.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(g=>{const B=this.getToken();return B&&g.headers&&(g.headers.Authorization=`Bearer ${B}`),g},g=>Promise.reject(g)),this.axiosInstance.interceptors.response.use(g=>g.data,g=>{var B,Q;return(((B=g.response)==null?void 0:B.status)===401||((Q=g.response)==null?void 0:Q.status)===403)&&this.logout(),Promise.reject(g)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){this.removeToken(),window.location.href="/sign-in"}handleError(g){g.response?console.error("API Error:",g.response.status,g.response.data):g.request?console.error("No response received:",g.request):console.error("Error during request setup:",g.message)}async get(g,B){try{const Q=await this.axiosInstance.get(g,B);return(Q==null?void 0:Q.data)===!1?!1:(Q==null?void 0:Q.data)??Q}catch(Q){const w=Q;throw this.handleError(w),Q}}async delete(g,B){try{return await this.axiosInstance.delete(g,B)}catch(Q){const w=Q;throw this.handleError(w),Q}}async post(g,B,Q){try{const w=await this.axiosInstance.post(g,B,Q);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const C=w;throw this.handleError(C),w}}async patch(g,B,Q){try{return(await this.axiosInstance.patch(g,B,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}async put(g,B,Q){try{return(await this.axiosInstance.put(g,B,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}}class fd extends XB{async fetchCriticalPathTasks(g){return await this.get(`gantt/get_list_task_on_critical_path?${g}`)}async fetchGanttList(g){return await this.get(`/list/tasks/search?${g}&gantt=1`)}}let ut;function Jd(){return ut||(ut=new fd),ut}class md extends XB{async fetchPieProjects(g){return await this.get("repairs/pie/projects?"+g)}async fetchPieTasks(g){return await this.get("repairs/pie/tasks?"+g)}async fetchPiePersonnel(g){return await this.get("repairs/metrics/get_list_position?"+g)}async fetchPersonnelData(g){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+g)}async fetchPersonnelInfo(g){return await this.get(`repairs/metrics/list_position_intersection_details?${g}`)}async fetchPiePersonnelInfo(g){return await this.get(`repairs/metrics/get_list_user_by_position?${g}`)}async fetchPieCriticalPath(g){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+g)}async fetchPieCriticalPathInfo(g){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${g}`)}async fetchPieTmc(g){return await this.get("repairs/metrics/get_list_instrument_type?"+g)}async fetchPieTmcInfo(g){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${g}`)}async fetchPieUntimelyClosedTask(g){return await this.get("repairs/metrics/get_list_comment_type?"+g)}async fetchPieUntimelyClosedTaskInfo(g){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${g}`)}async fetchPieAdditionalTasks(g){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+g)}async fetchPieAdditionalTasksInfo(g){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${g}`)}async fetchPersonnel(g){return await this.get("repairs/statistic/personnel?"+g)}async fetchPieExpired(g){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+g)}async fetchPieExpiredInfo(g){return await this.get(`repairs/metrics/get_list_task_expired?${g}`)}async fetchEconomicsPerformance(g){return await this.get(`repairs/metrics/get_economic_performance?${g}`)}async fetchEconomicsInfo(g){return await this.get(`repairs/metrics/get_list_task_economic_performance?${g}`)}async fetchQualityMetrics(g){return await this.get(`repairs/metrics/get_quality_metrics?${g}`)}async fetchQualityInfo(g){return await this.get(`repairs/metrics/get_list_task_by_quality?${g}`)}async fetchPieWorkZone(g){return await this.get("repairs/metrics/get_statistics_on_controller_zones?"+g)}async fetchWorkZoneInfo(g){return await this.get("exposed_equipment_zones/list?"+g)}async fetchPieAllTasks(g){return await this.get("repairs/metrics/get_list_task_group_by_status?"+g)}async fetchPieAllTasksInfo(g){return await this.get("repairs/metrics/get_list_task_by_status?"+g)}}let Ut;function Nd(){return Ut||(Ut=new md),Ut}class Rd extends XB{async fetchProjectById(g){return this.get(`/projects/${g}`)}createProject(g){return this.post("/projects",g)}editProject(g,B){return this.put(`/projects/${g}`,B)}fetchProjects(g){return this.get("/search/projects",{params:g})}cloneProject(g){return this.post(`projects/${g.id}/clone`,g)}archiveProject(g,B){return this.put(`/projects/${g}`,B)}unArchiveProject(g,B){return this.put(`/projects/${g}`,B)}moveAprProject(g){return this.post("repairs/move_plan_to_real",{repairs:[g]})}restoreProject(g){return this.post("/restore_project",{projects_ids:[g]})}importTasks(g){return this.post("tasks/import",g)}importKtd(g){return this.post("/parse_ktd",g,{headers:{"Content-Type":"multipart/form-data"}})}checkStatusParser(g){return this.post("/check_parse_ktd",g)}fetchProjectTeamList(g){return this.put(`/projects/${g}`,null)}deleteProject(g){return this.delete(`/projects/${g}`)}getDynamicProgressWidget(g){return this.get(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${g}`)}removeRootIntervals(){return this.post("/delete/fake/projects",null)}addRootIntervals(g,B){return this.post(`/set/fake/projects/${g}`,B)}}let lt;function Pd(){return lt||(lt=new Rd),lt}class vd extends XB{fetchFilters(g){return this.get(`get_list_repair?smart=1&${g}`)}fetchRepairs(g,B,Q,w,C){return this.get("get_list_repair"+(g?`${B}&per_page=100000${C?"&"+C:""}&${Q?"":w}`:`?per_page=100000${C?"&"+C:""}&${w}`))}fetchRepairTemplates({equipmentId:g,categoryCode:B}){return this.get(`repairs/get_repair_template_list?per_page=100000&categoryCodeList[0]=${B}&equipmentIdList[0]=${g}`)}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(g){return this.post("/repairs/equipments",g)}createRepairFromTemplate(g){return this.post("/repairs/create_repair_from_repair_template",g)}startRepair(g){return this.post(`/repairs/${g}/start`,null)}finishRepair(g){return this.post("/repairs/complete_repair_list",{repairIdList:[g]})}finishPreparationProject(g){return this.post(`/repairs/${g}/finish_preparation`,null)}moveRepairToCurrent(g){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[g]})}moveArchiveToCurrent(g){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[g]})}moveRepairToApr(g){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[g]})}moveRepairToArchive(g){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[g]})}restoreRepair(g){return this.post("/restore_repair",{repairs_ids:[g]})}updateRepair(g,B){return this.put(`/repairs/${B}`,g)}copyRepair(g){return this.post(`/repairs/${g}/clone`,null)}deleteRepair(g){return this.delete(`/repairs/${g}`)}fetchIntersection(g){return this.get(`v3/repairs/${g}/personnel/intersection`)}}let ht;function kd(){return ht||(ht=new vd),ht}class Td extends XB{fetchTaskById(g){return this.get(`/tasks/${g}`)}fetchTasksList(g){return this.get("/list/tasks/search",{params:g})}fetchSubtasksList(g){return this.get(`/task/${g}/subtasks/list`)}fetchTaskBranch(g){return this.get(`/get_list_task_branch?task_id=${g}`)}fetchInstrumentsList(g){return this.get("admin/instruments",{params:g})}fetchInstrumentTypeListWithPreparedWarehouse(g){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:g})}fetchInstrumentsEquivalentList(g){return this.get("tasks/instrument/list",{params:g})}fetchDiffInstruments(g){return this.get(`tasks/${g.taskId}/fill/module`,{params:g})}replaceInstruments(g){return this.post("/instruments/equivalent/attach",g)}fetchTaskUsagePersonal(g){return this.get(`tasks/${g}/usage/users`)}fetchTaskUsageInstrument(g){return this.get(`tasks/${g}/usage/instruments`)}fetchEquipment(g){return this.get("repairs/equipment/list",{params:g})}fetchTaskVideoSources(g){return this.get("work_zone/get_list_video_source",{params:g})}fetchTaskVideoSourcesStream(g){return this.get("horizon/video-source",{params:g})}createWorkZone(g){return this.post("admin/work-zones",g)}createTask(g){return this.post("tasks",g)}editTask(g,B){return this.put(`tasks/${g}`,B)}mergeTask(g){return this.post("tasks/merge",g)}deleteTask(g){return this.delete(`tasks/${g}`)}changeStatus(g,B){return this.put(`task/${g}/change-status`,{status_id:B})}saveMetrics(g){return this.put("/update_quality_metrics",g)}checkReasonForStatus(g){return this.post("/tasks/check_reason_for_task",{task_id:g})}verifyTaskStatus(g,B){return this.get(`/task/${g}/change-status/verification`,{params:{status_id:B}})}checkBranchBeforeCloseTask(g){return this.post("/check_branch_before_close_task",{task_id:g})}}let Gt;function jd(){return Gt||(Gt=new Td),Gt}class pd extends XB{login(g,B){return this.post("/login",{email:g,password:B})}loginPhoto(g){return this.post("/login/from_photo",{photo:g})}loginVideo(g){return this.post("/login/video",g,{transformRequest:B=>B})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}changePassword(g,B,Q){return this.put(`/users/${g}/password`,{password:B,password_confirmation:Q})}}let dt;function yd(){return dt||(dt=new pd),dt}class zd extends XB{uploadFile(g){return this.post("/upload-file",g,{headers:{"Content-Type":"multipart/form-data"}})}}let Ht;function Wd(){return Ht||(Ht=new zd),Ht}class bd extends XB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}reloadVideoAnalytics(g){return this.post("/horizon/video-source/reload",{video_source_ids:g})}hardReloadStream(){return this.post("horizon/video-source/streams/add",null)}async fetchWorkZones(g){return await this.get("/search/work_zones",{params:g})}async fetchWorkZone(g){return await this.get(`/work_zone/get_work_zone/${g}`)}async editWorkZone(g,B){return await this.put(`/admin/work-zones/${g}`,B)}async deleteWorkZone(g){return await this.delete(`/admin/work-zones/${g}`)}async fetchVideoSources(g){return await this.get("/search/video_sources",{params:g})}async createVideoSource(g){return await this.post("horizon/video-source",g)}async editVideoSource(g,B){return await this.put(`/horizon/video-source/${g}`,B)}async deleteVideoSource(g){await this.delete(`/horizon/video-source/${g}`)}async fetchListRepairsVideoSource(g){return await this.get("work_zone/get_list_video_source_by_repair",{params:g})}async sendCombination(g){return await this.post("horizon/video-source/training",g)}async saveCombination(g){return await this.post("horizon/video-source/bind",g)}async fetchCombination(g){return await this.get("horizon/video-source/bind/show",{params:g})}async startTraining(g){return await this.post("horizon/video-source/training/start",g)}async stopTraining(g){return await this.post("horizon/video-source/training/stop",g)}async fetchTrainingInfo(g){return await this.get("horizon/video-source/training/info",{params:g})}async fetchTrainingStatus(g){return await this.get("horizon/video-source/training/status",{params:g})}async fetchVisualizationDataLink(g){return await this.get("horizon/video-source/link/video/training",{params:g})}async updateVisualizationData(g){return await this.get("horizon/video-source/download/video/training",{params:g})}}let ft;function Sd(){return ft||(ft=new bd),ft}class Ld extends XB{async editUser({id:g,model:B}){return await this.put(`/admin/users/${g}`,B)}async getUser(g){return await this.get(`/admin/users/${g}`)}async getUserWarehouses(g){return await this.get("users/get_warehouse_list_by_user",{params:g})}async createUser(g){return await this.post("/admin/users",g)}async deleteUser({user_id:g,archive_reason:B}){return await this.post("/users/archive_user",{user_id:g,archive_reason:B})}async deleteUserPhotos({user_id:g,photos:B}){return await this.post("/users/photos/delete",{user_id:g,photos:B})}async restoreUser(g){return await this.post("/users/restore_user",{user_id:g})}async getRoles(g){return await this.get("/search/roles",{params:g})}async getPositions(g){return await this.get("/search/positions",{params:g})}async createPosition(g){return await this.post("/admin/positions",g)}async editPosition(g,B){return await this.put(`/admin/positions/${g}`,B)}async deletePosition(g){return await this.delete(`/admin/positions/${g}`)}async getTeams(g){return await this.get("/search/teams",{params:g})}async createTeam(g){return await this.post("/teams",g)}async editTeam(g,B){return await this.patch(`/teams/${g}`,B)}async deleteTeam(g){return await this.delete(`/teams/${g}`)}async checkUserVectors(g){return await this.get(`/user/get-vectors/${g}`)}async addUserVectors(g){return await this.post("/user/add-vector",g,{headers:{"Content-Type":"multipart/form-data"}})}async removeUserVectors(g){return await this.delete(`/user/delete-vectors/${g}`)}}let Jt;function Vd(){return Jt||(Jt=new Ld),Jt}class Kd extends XB{async fetchUserInstrumentsHistory(g,B){const Q={status:"issued",page:B,desc:"desc",column:"issued_in"};return await this.get(`users/${g}/instruments`,{params:Q})}async fetchWarehouses(g){return await this.get("search/warehouses",{params:g})}async fetchWarehouse(g){return await this.get(`admin/warehouses/${g}`)}async fetchStatusHistory(g){return await this.get(`warehouses/${g}/history/status`)}async createWarehouse(g){return await this.post("admin/warehouses",g)}async editWarehouse({id:g,model:B}){return await this.put(`admin/warehouses/${g}`,B)}deleteWarehouse(g){return this.delete(`admin/warehouses/${g}`)}async unsetWarehouseRfid(g){return await this.post("warehouses/unset-rfid",g)}}let mt;function xd(){return mt||(mt=new Kd),mt}class Xd extends XB{fetchControlZones(g){return this.get("/frame/list",{params:g})}async fetchControlZone(g){return this.get(`/frame/${g}`)}createControlZone(g){return this.post("/frame",g)}editControlZone(g,B){return this.put(`/frame/${g}`,B)}deleteControlZone(g){return this.delete(`/frame/${g}`)}fetchControlLogs(g){return this.get("/exposed_equipment_zones/list_for_controller",{params:g})}fetchControllers(g){return this.get("/frame/controllers/list",{params:g})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(g){return this.post("exposed_equipment_zones/hand/enter",g)}manualExit(g){return this.post("exposed_equipment_zones/hand/exit",g)}deleteControlLogs(g){return this.delete("exposed_equipment_zones",g)}fetchInstrumentTypeList(g){return this.get("search/instrument_types",{params:g})}fetchInstrumentCategoryList(g={}){return this.get("instrument_category/list",{params:g})}createInstrumentType(g){return this.post("admin/instruments",g)}editInstrumentType(g,B){return this.put(`admin/instruments/${g}`,B)}deleteInstrumentType(g){return this.delete(`admin/instruments/${g}`)}fetchRpdzLogList(g){return this.get("exposed_equipment_zones_history/list",{params:g})}}let Nt;function Od(){return Nt||(Nt=new Xd),Nt}class Zd extends XB{fetchSearchUsers(g){return this.get("search/users",{params:g})}fetchSearchInstruments(g){return this.get("search/instrument_type",{params:g})}fetchSearchModules(g){return this.get("search/modules",{params:g})}}let Rt;function qd(){return Rt||(Rt=new Zd),Rt}class _d extends XB{async detectModule(g){return await this.get(`module/${g}/detect`)}async createModule(g){return await this.post("admin/modules",g)}async editModule({id:g,model:B}){return await this.put(`admin/modules/${g}`,B)}deleteModule(g){return this.delete(`admin/modules/${g}`)}}let Pt;function $d(){return Pt||(Pt=new _d),Pt}class AH extends XB{async uploadComment(g){return await this.post("comments",g)}async deleteComment(g){return await this.delete(`comments/${g}`)}async editComment(g,B){return await this.put(`comments/${g}`,B)}}let vt;function BH(){return vt||(vt=new AH),vt}class gH extends XB{fetchEquipment(g){return this.get("repairs/equipment/list",{params:g})}createEquipment(g){return this.post("repairs/equipment",g)}editEquipment(g,B){return this.put(`repairs/equipment/${g}`,B)}deleteEquipment(g){return this.delete(`repairs/equipment/${g}`)}}let kt;function QH(){return kt||(kt=new gH),kt}class wH extends XB{fetchBrigades(g){return this.get("/search/brigades",{params:g})}editBrigade({id:g,model:B}){return this.put(`/brigades/${g}`,B)}getBrigade(g){return this.get(`/brigades/${g}`)}createBrigade(g){return this.post("/brigades",g)}deleteBrigade(g){return this.delete(`/brigades/${g}`)}}let Tt;function CH(){return Tt||(Tt=new wH),Tt}class EH extends XB{fetchScheduleConfig(){return this.get("schedule/config")}fetchSchedule(g){return this.get(`schedule/${g}`)}fetchScheduleTable(g){return this.get(`schedule/${g}/get_brigades_table`)}fetchBrigadesToSwap(g,B){return this.get(`schedule/${g}/selection_brigades_for_swap_shift_template`,{params:B})}completeBrigadeSchedule(g,B){return this.post(`schedule/${g}/complete_brigade_schedule`,B)}autocompleteBrigadesSchedule(g,B){return this.post(`schedule/${g}/autocomplete`,B)}addBrigadeShift(g,B){return this.post(`schedule/${g}/shifts`,B)}swapBrigadeShifts(g,B){return this.patch(`schedule/${g}/shifts/switch_shift_templates`,B)}editBrigadeShifts(g,B){return this.patch(`schedule/${g}/shifts`,B)}deleteBrigadeShifts(g,B){return this.delete(`schedule/${g}/shifts`,{data:{shift_ids:B}})}deleteBrigadesFromSchedule(g,B){return this.patch(`schedule/${g}/delete_brigades`,{brigade_ids:B})}}let jt;function eH(){return jt||(jt=new EH),jt}/**
8
8
  * @license
9
9
  * Copyright 2020 Google LLC. All Rights Reserved.
10
10
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,6 +1,6 @@
1
1
  import ApiService from '../settings/ApiService';
2
2
  import { ResponseApi } from '../types/Api_Service';
3
- import { Api_Create_Repair_With_Equipments, Api_Create_Repair_With_Template, Api_Equipment_Full_Dto, Api_Repair_Dto, Api_Repair_Template, Api_Update_Repair, OptionFilters } from '../types/Api_Repairs';
3
+ import { Api_Create_Repair_With_Equipments, Api_Create_Repair_With_Template, Api_Equipment_Full_Dto, Api_Repair_Dto, Api_Repair_Intersection, Api_Repair_Template, Api_Update_Repair, OptionFilters } from '../types/Api_Repairs';
4
4
  declare class RepairsService extends ApiService {
5
5
  fetchFilters(fullParams: string): Promise<OptionFilters>;
6
6
  fetchRepairs(isQuery: boolean, queries?: string, hasTeams?: boolean | string, teamsFilter?: string, typeFilter?: string): Promise<ResponseApi<Api_Repair_Dto[]>>;
@@ -22,7 +22,7 @@ declare class RepairsService extends ApiService {
22
22
  updateRepair(payload: Api_Update_Repair, id: string): Promise<void>;
23
23
  copyRepair(id: string): Promise<any>;
24
24
  deleteRepair(id: string): Promise<import("axios").AxiosResponse<any, any>>;
25
- fetchIntersection(id: string): Promise<any>;
25
+ fetchIntersection(id: string): Promise<Api_Repair_Intersection[][]>;
26
26
  }
27
27
  export default function useRepairsService(): RepairsService;
28
28
  export {};
@@ -1,18 +1,19 @@
1
1
  import ApiService from '../settings/ApiService';
2
- import { Api_Schedule_Add_Shift, Api_Schedule_Complete_Brigade, Api_Schedule_Config, Api_Schedule_Edit_Shifts, Api_Schedule_Swap_Shifts, Api_Schedule_Table_Brigade } from '@/api/types/Api_Schedule';
2
+ import { Api_Schedule_Add_Shift, Api_Schedule_Brigade_To_Swap, Api_Schedule_Complete_Brigade, Api_Schedule_Config, Api_Schedule_Edit_Shifts, Api_Schedule_Item, Api_Schedule_Swap_Shifts, Api_Schedule_Table_Brigade } from '@/api/types/Api_Schedule';
3
3
  declare class ScheduleService extends ApiService {
4
4
  fetchScheduleConfig(): Promise<Api_Schedule_Config>;
5
- fetchSchedule(id: string): Promise<any>;
6
- fetchScheduleTable(id: string): Promise<any>;
5
+ fetchSchedule(id: string): Promise<Api_Schedule_Item[]>;
6
+ fetchScheduleTable(id: string): Promise<Api_Schedule_Table_Brigade[]>;
7
+ fetchBrigadesToSwap(id: string, params: any): Promise<Api_Schedule_Brigade_To_Swap[]>;
7
8
  completeBrigadeSchedule(id: string, body: Api_Schedule_Complete_Brigade): Promise<Api_Schedule_Table_Brigade>;
8
9
  autocompleteBrigadesSchedule(id: string, body: {
9
10
  shifts: string[];
10
- }): Promise<any>;
11
- addBrigadeShift(id: string, body: Api_Schedule_Add_Shift): Promise<any>;
12
- swapBrigadeShifts(id: string, body: Api_Schedule_Swap_Shifts): Promise<any>;
11
+ }): Promise<Api_Schedule_Item[]>;
12
+ addBrigadeShift(id: string, body: Api_Schedule_Add_Shift): Promise<Api_Schedule_Item[]>;
13
+ swapBrigadeShifts(id: string, body: Api_Schedule_Swap_Shifts): Promise<Api_Schedule_Item[]>;
13
14
  editBrigadeShifts(id: string, body: Api_Schedule_Edit_Shifts): Promise<any>;
14
15
  deleteBrigadeShifts(id: string, shift_ids: string[]): Promise<any>;
15
- deleteBrigadesFromSchedule(id: string, brigade_ids: string[]): Promise<any>;
16
+ deleteBrigadesFromSchedule(id: string, brigade_ids: string[]): Promise<string>;
16
17
  }
17
18
  export default function useScheduleService(): ScheduleService;
18
19
  export {};
@@ -1,5 +1,5 @@
1
1
  import ApiService from '../settings/ApiService';
2
- import { Api_User, Api_User_Create, Api_User_Delete_Body, Api_User_Delete_Photos_Body, Api_User_Position, Api_User_Role, Api_User_Team, Api_User_Team_Search } from '../types/Api_User';
2
+ import { Api_User, Api_User_Create, Api_User_Delete_Body, Api_User_Delete_Photos_Body, Api_User_Position, Api_User_Role, Api_User_Team, Api_User_Team_Search, Api_User_Warehouse } from '../types/Api_User';
3
3
  import { ResponseApi } from '../types/Api_Service';
4
4
  declare class UserService extends ApiService {
5
5
  editUser({ id, model }: {
@@ -7,6 +7,10 @@ declare class UserService extends ApiService {
7
7
  model: any;
8
8
  }): Promise<Api_User>;
9
9
  getUser(id: string): Promise<Api_User>;
10
+ getUserWarehouses(params: {
11
+ user_id: string;
12
+ page?: number;
13
+ }): Promise<ResponseApi<Api_User_Warehouse[]>>;
10
14
  createUser(model: Api_User_Create): Promise<Api_User>;
11
15
  deleteUser({ user_id, archive_reason, }: Api_User_Delete_Body): Promise<{
12
16
  data: boolean;
@@ -93,11 +93,11 @@ export type Api_instruments_HistoryResponse = {
93
93
  }[];
94
94
  };
95
95
  export type Api_Warehouse_Search = Omit<Api_Instrument, 'created_at' | 'deleted_at' | 'invoice_ref_key' | 'last_status_updated_at' | 'pressure' | 'registry_module_id' | 'supervisor' | 'supervisor_id' | 'type' | 'weight'> & {
96
- issued_in: unknown | null;
96
+ issued_in: string | null;
97
97
  registry: {
98
98
  id: string;
99
99
  title: string;
100
- };
100
+ } | null;
101
101
  };
102
102
  export type Api_Warehouse_Create = {
103
103
  instrument_id: string;
@@ -48,6 +48,7 @@ export type Api_Project_Dto = {
48
48
  status: Api_Project_Status;
49
49
  category: Api_Project_Category;
50
50
  repair: Api_Project_Repair | null;
51
+ schedule_id: string | null;
51
52
  };
52
53
  export type Api_Project_Add_Root_Intervals_Payload = {
53
54
  history: number;
@@ -107,3 +107,23 @@ export type Api_Repair_Template = {
107
107
  };
108
108
  task_list: string;
109
109
  };
110
+ export type Api_Repair_Intersection = {
111
+ position: {
112
+ name: string;
113
+ display_name: string;
114
+ };
115
+ status: {
116
+ id: string;
117
+ name: string;
118
+ display_name: string;
119
+ };
120
+ task: {
121
+ id: string;
122
+ name: string;
123
+ project_id: string;
124
+ };
125
+ user: {
126
+ id: string;
127
+ full_name: string;
128
+ };
129
+ };
@@ -38,3 +38,21 @@ export type Api_Schedule_Edit_Shifts = {
38
38
  shift_ids: string[];
39
39
  shift_template_id: string;
40
40
  };
41
+ export type Api_Schedule_Shift = {
42
+ id: string;
43
+ from: string;
44
+ to: string;
45
+ shift_template: Api_Schedule_Shift_Template;
46
+ };
47
+ export type Api_Schedule_Item = {
48
+ brigade: Api_Schedule_Table_Brigade;
49
+ shifts: {
50
+ date: string;
51
+ shift: Api_Schedule_Shift;
52
+ }[];
53
+ };
54
+ export type Api_Schedule_Brigade_To_Swap = {
55
+ id: string;
56
+ name: string;
57
+ shift_template: Api_Schedule_Shift_Template;
58
+ };
@@ -1,4 +1,5 @@
1
1
  import { Api_Warehouse_Search } from '@/api/types/Api_Instruments';
2
+ import { Api_User_Archive_History_Item } from '@/api/types/Api_User';
2
3
  export type Api_Search_User_Passes = {
3
4
  id: string;
4
5
  type: string;
@@ -41,6 +42,7 @@ export type Api_Search_User = {
41
42
  positions: Api_Search_User_Positions[];
42
43
  teams: Api_Search_User_Teams[];
43
44
  photos: Api_Search_User_Photos[];
45
+ archiveHistory: Api_User_Archive_History_Item[];
44
46
  };
45
47
  export type Api_Search_Instruments = {
46
48
  id: string;
@@ -1,4 +1,5 @@
1
1
  import { Api_Tasks_Status_Dto } from '@/api/types/Api_Tasks';
2
+ import { Api_Instrument } from '@/api/types/Api_Instruments';
2
3
  export type Api_User_Team = {
3
4
  id: string;
4
5
  name: string;
@@ -103,3 +104,10 @@ export type Api_User_Delete_Photos_Body = {
103
104
  user_id: string;
104
105
  photos?: string[];
105
106
  };
107
+ export type Api_User_Warehouse = Pick<Api_Instrument, 'id' | 'RFID' | 'instrument_type' | 'inventory_number' | 'location' | 'misplacement' | 'module' | 'name' | 'responsible' | 'status' | 'storage' | 'updated_at'> & {
108
+ issued_in: string | null;
109
+ registry: {
110
+ id: string;
111
+ title: string;
112
+ } | null;
113
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.134",
3
+ "version": "1.2.136",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -5,6 +5,7 @@ import {
5
5
  Api_Create_Repair_With_Template,
6
6
  Api_Equipment_Full_Dto,
7
7
  Api_Repair_Dto,
8
+ Api_Repair_Intersection,
8
9
  Api_Repair_Template,
9
10
  Api_Update_Repair,
10
11
  OptionFilters,
@@ -110,7 +111,7 @@ class RepairsService extends ApiService {
110
111
  return this.delete<any>(`/repairs/${id}`)
111
112
  }
112
113
 
113
- public fetchIntersection(id: string): Promise<any> {
114
+ public fetchIntersection(id: string): Promise<Api_Repair_Intersection[][]> {
114
115
  return this.get(`v3/repairs/${id}/personnel/intersection`)
115
116
  }
116
117
  }
@@ -1,9 +1,11 @@
1
1
  import ApiService from '../settings/ApiService'
2
2
  import {
3
3
  Api_Schedule_Add_Shift,
4
+ Api_Schedule_Brigade_To_Swap,
4
5
  Api_Schedule_Complete_Brigade,
5
6
  Api_Schedule_Config,
6
7
  Api_Schedule_Edit_Shifts,
8
+ Api_Schedule_Item,
7
9
  Api_Schedule_Swap_Shifts,
8
10
  Api_Schedule_Table_Brigade,
9
11
  } from '@/api/types/Api_Schedule'
@@ -13,12 +15,18 @@ class ScheduleService extends ApiService {
13
15
  return this.get<Api_Schedule_Config>('schedule/config')
14
16
  }
15
17
 
16
- public fetchSchedule(id: string): Promise<any> {
17
- return this.get<any>(`schedule/${id}`)
18
+ public fetchSchedule(id: string): Promise<Api_Schedule_Item[]> {
19
+ return this.get<Api_Schedule_Item[]>(`schedule/${id}`)
18
20
  }
19
21
 
20
- public fetchScheduleTable(id: string): Promise<any> {
21
- return this.get<any>(`schedule/${id}/get_brigades_table`)
22
+ public fetchScheduleTable(id: string): Promise<Api_Schedule_Table_Brigade[]> {
23
+ return this.get<Api_Schedule_Table_Brigade[]>(`schedule/${id}/get_brigades_table`)
24
+ }
25
+
26
+ public fetchBrigadesToSwap(id: string, params: any): Promise<Api_Schedule_Brigade_To_Swap[]> {
27
+ return this.get<Api_Schedule_Brigade_To_Swap[]>(`schedule/${id}/selection_brigades_for_swap_shift_template`, {
28
+ params,
29
+ })
22
30
  }
23
31
 
24
32
  public completeBrigadeSchedule(id: string, body: Api_Schedule_Complete_Brigade): Promise<Api_Schedule_Table_Brigade> {
@@ -28,15 +36,15 @@ class ScheduleService extends ApiService {
28
36
  )
29
37
  }
30
38
 
31
- public autocompleteBrigadesSchedule(id: string, body: { shifts: string[] }): Promise<any> {
39
+ public autocompleteBrigadesSchedule(id: string, body: { shifts: string[] }): Promise<Api_Schedule_Item[]> {
32
40
  return this.post(`schedule/${id}/autocomplete`, body)
33
41
  }
34
42
 
35
- public addBrigadeShift(id: string, body: Api_Schedule_Add_Shift): Promise<any> {
43
+ public addBrigadeShift(id: string, body: Api_Schedule_Add_Shift): Promise<Api_Schedule_Item[]> {
36
44
  return this.post(`schedule/${id}/shifts`, body)
37
45
  }
38
46
 
39
- public swapBrigadeShifts(id: string, body: Api_Schedule_Swap_Shifts): Promise<any> {
47
+ public swapBrigadeShifts(id: string, body: Api_Schedule_Swap_Shifts): Promise<Api_Schedule_Item[]> {
40
48
  return this.patch(`schedule/${id}/shifts/switch_shift_templates`, body)
41
49
  }
42
50
 
@@ -48,7 +56,7 @@ class ScheduleService extends ApiService {
48
56
  return this.delete(`schedule/${id}/shifts`, { data: { shift_ids } })
49
57
  }
50
58
 
51
- public deleteBrigadesFromSchedule(id: string, brigade_ids: string[]): Promise<any> {
59
+ public deleteBrigadesFromSchedule(id: string, brigade_ids: string[]): Promise<string> {
52
60
  return this.patch(`schedule/${id}/delete_brigades`, { brigade_ids })
53
61
  }
54
62
  }
@@ -8,6 +8,7 @@ import {
8
8
  Api_User_Role,
9
9
  Api_User_Team,
10
10
  Api_User_Team_Search,
11
+ Api_User_Warehouse,
11
12
  } from '../types/Api_User'
12
13
  import { ResponseApi } from '../types/Api_Service'
13
14
 
@@ -20,6 +21,13 @@ class UserService extends ApiService {
20
21
  return await this.get<Api_User>(`/admin/users/${id}`)
21
22
  }
22
23
 
24
+ public async getUserWarehouses(params: {
25
+ user_id: string
26
+ page?: number
27
+ }): Promise<ResponseApi<Api_User_Warehouse[]>> {
28
+ return await this.get<ResponseApi<Api_User_Warehouse[]>>(`users/get_warehouse_list_by_user`, { params })
29
+ }
30
+
23
31
  public async createUser(model: Api_User_Create): Promise<Api_User> {
24
32
  return await this.post<Api_User_Create, Api_User>('/admin/users', model)
25
33
  }
@@ -112,11 +112,11 @@ export type Api_Warehouse_Search = Omit<
112
112
  | 'type'
113
113
  | 'weight'
114
114
  > & {
115
- issued_in: unknown | null
115
+ issued_in: string | null
116
116
  registry: {
117
117
  id: string
118
118
  title: string
119
- }
119
+ } | null
120
120
  }
121
121
 
122
122
  export type Api_Warehouse_Create = {
@@ -52,6 +52,7 @@ export type Api_Project_Dto = {
52
52
  status: Api_Project_Status
53
53
  category: Api_Project_Category
54
54
  repair: Api_Project_Repair | null
55
+ schedule_id: string | null
55
56
  }
56
57
 
57
58
  export type Api_Project_Add_Root_Intervals_Payload = {
@@ -115,3 +115,24 @@ export type Api_Repair_Template = {
115
115
  }
116
116
  task_list: string
117
117
  }
118
+
119
+ export type Api_Repair_Intersection = {
120
+ position: {
121
+ name: string
122
+ display_name: string
123
+ }
124
+ status: {
125
+ id: string
126
+ name: string
127
+ display_name: string
128
+ }
129
+ task: {
130
+ id: string
131
+ name: string
132
+ project_id: string
133
+ }
134
+ user: {
135
+ id: string
136
+ full_name: string
137
+ }
138
+ }
@@ -44,3 +44,21 @@ export type Api_Schedule_Edit_Shifts = {
44
44
  shift_ids: string[]
45
45
  shift_template_id: string
46
46
  }
47
+
48
+ export type Api_Schedule_Shift = {
49
+ id: string
50
+ from: string
51
+ to: string
52
+ shift_template: Api_Schedule_Shift_Template
53
+ }
54
+
55
+ export type Api_Schedule_Item = {
56
+ brigade: Api_Schedule_Table_Brigade
57
+ shifts: { date: string; shift: Api_Schedule_Shift }[]
58
+ }
59
+
60
+ export type Api_Schedule_Brigade_To_Swap = {
61
+ id: string
62
+ name: string
63
+ shift_template: Api_Schedule_Shift_Template
64
+ }
@@ -1,4 +1,5 @@
1
1
  import { Api_Warehouse_Search } from '@/api/types/Api_Instruments'
2
+ import { Api_User_Archive_History_Item } from '@/api/types/Api_User'
2
3
 
3
4
  export type Api_Search_User_Passes = {
4
5
  id: string
@@ -47,6 +48,7 @@ export type Api_Search_User = {
47
48
  positions: Api_Search_User_Positions[]
48
49
  teams: Api_Search_User_Teams[]
49
50
  photos: Api_Search_User_Photos[]
51
+ archiveHistory: Api_User_Archive_History_Item[]
50
52
  }
51
53
 
52
54
  export type Api_Search_Instruments = {
@@ -1,4 +1,5 @@
1
1
  import { Api_Tasks_Status_Dto } from '@/api/types/Api_Tasks'
2
+ import { Api_Instrument } from '@/api/types/Api_Instruments'
2
3
 
3
4
  export type Api_User_Team = {
4
5
  id: string
@@ -115,3 +116,25 @@ export type Api_User_Delete_Photos_Body = {
115
116
  user_id: string
116
117
  photos?: string[]
117
118
  }
119
+
120
+ export type Api_User_Warehouse = Pick<
121
+ Api_Instrument,
122
+ | 'id'
123
+ | 'RFID'
124
+ | 'instrument_type'
125
+ | 'inventory_number'
126
+ | 'location'
127
+ | 'misplacement'
128
+ | 'module'
129
+ | 'name'
130
+ | 'responsible'
131
+ | 'status'
132
+ | 'storage'
133
+ | 'updated_at'
134
+ > & {
135
+ issued_in: string | null
136
+ registry: {
137
+ id: string
138
+ title: string
139
+ } | null
140
+ }