shared-ritm 1.2.60 → 1.2.62

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.
@@ -15093,7 +15093,13 @@ function wg() {
15093
15093
  }
15094
15094
  class B2 extends It {
15095
15095
  async fetchUserInstrumentsHistory(t, n) {
15096
- return await this.get(`users/${t}/instruments`, { params: n });
15096
+ const o = {
15097
+ status: "issued",
15098
+ page: n,
15099
+ desc: "desc",
15100
+ column: "updated_at"
15101
+ };
15102
+ return await this.get(`users/${t}/instruments`, { params: o });
15097
15103
  }
15098
15104
  }
15099
15105
  let zr;
@@ -4,4 +4,4 @@
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,...Q){const w=new this(g);return Q.forEach(C=>w.set(C)),w}static accessor(g){const w=(this[SI]=this[SI]={accessors:{}}).accessors,C=this.prototype;function E(I){const Y=Lg(I);w[Y]||(Zo(C,I),w[Y]=!0)}return m.isArray(g)?g.forEach(E):E(g),this}};gB.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),m.reduceDescriptors(gB.prototype,({value:A},g)=>{let Q=g[0].toUpperCase()+g.slice(1);return{get:()=>A,set(w){this[Q]=w}}}),m.freezeMethods(gB);function _w(A,g){const Q=this||Wg,w=g||Q,C=gB.from(w.headers);let E=w.data;return m.forEach(A,function(Y){E=Y.call(Q,E,C.normalize(),g?g.status:void 0)}),C.normalize(),E}function yI(A){return!!(A&&A.__CANCEL__)}function Mg(A,g,Q){GA.call(this,A??"canceled",GA.ERR_CANCELED,g,Q),this.name="CanceledError"}m.inherits(Mg,GA,{__CANCEL__:!0});function bI(A,g,Q){const w=Q.config.validateStatus;!Q.status||!w||w(Q.status)?A(Q):g(new GA("Request failed with status code "+Q.status,[GA.ERR_BAD_REQUEST,GA.ERR_BAD_RESPONSE][Math.floor(Q.status/100)-4],Q.config,Q.request,Q))}function qo(A){const g=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return g&&g[1]||""}function _o(A,g){A=A||10;const Q=new Array(A),w=new Array(A);let C=0,E=0,I;return g=g!==void 0?g:1e3,function(F){const D=Date.now(),M=w[E];I||(I=D),Q[C]=F,w[C]=D;let c=E,i=0;for(;c!==C;)i+=Q[c++],c=c%A;if(C=(C+1)%A,C===E&&(E=(E+1)%A),D-I<g)return;const U=M&&D-M;return U?Math.round(i*1e3/U):void 0}}function $o(A,g){let Q=0,w=1e3/g,C,E;const I=(D,M=Date.now())=>{Q=M,C=null,E&&(clearTimeout(E),E=null),A.apply(null,D)};return[(...D)=>{const M=Date.now(),c=M-Q;c>=w?I(D,M):(C=D,E||(E=setTimeout(()=>{E=null,I(C)},w-c)))},()=>C&&I(C)]}const PQ=(A,g,Q=3)=>{let w=0;const C=_o(50,250);return $o(E=>{const I=E.loaded,Y=E.lengthComputable?E.total:void 0,F=I-w,D=C(F),M=I<=Y;w=I;const c={loaded:I,total:Y,progress:Y?I/Y:void 0,bytes:F,rate:D||void 0,estimated:D&&Y&&M?(Y-I)/D:void 0,event:E,lengthComputable:Y!=null,[g?"download":"upload"]:!0};A(c)},Q)},XI=(A,g)=>{const Q=A!=null;return[w=>g[0]({lengthComputable:Q,total:A,loaded:w}),g[1]]},xI=A=>(...g)=>m.asap(()=>A(...g)),Ai=XA.hasStandardBrowserEnv?((A,g)=>Q=>(Q=new URL(Q,XA.origin),A.protocol===Q.protocol&&A.host===Q.host&&(g||A.port===Q.port)))(new URL(XA.origin),XA.navigator&&/(msie|trident)/i.test(XA.navigator.userAgent)):()=>!0,Bi=XA.hasStandardBrowserEnv?{write(A,g,Q,w,C,E){const I=[A+"="+encodeURIComponent(g)];m.isNumber(Q)&&I.push("expires="+new Date(Q).toGMTString()),m.isString(w)&&I.push("path="+w),m.isString(C)&&I.push("domain="+C),E===!0&&I.push("secure"),document.cookie=I.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 gi(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function Qi(A,g){return g?A.replace(/\/?\/$/,"")+"/"+g.replace(/^\/+/,""):A}function pI(A,g,Q){let w=!gi(g);return A&&(w||Q==!1)?Qi(A,g):g}const OI=A=>A instanceof gB?{...A}:A;function SB(A,g){g=g||{};const Q={};function w(D,M,c,i){return m.isPlainObject(D)&&m.isPlainObject(M)?m.merge.call({caseless:i},D,M):m.isPlainObject(M)?m.merge({},M):m.isArray(M)?M.slice():M}function C(D,M,c,i){if(m.isUndefined(M)){if(!m.isUndefined(D))return w(void 0,D,c,i)}else return w(D,M,c,i)}function E(D,M){if(!m.isUndefined(M))return w(void 0,M)}function I(D,M){if(m.isUndefined(M)){if(!m.isUndefined(D))return w(void 0,D)}else return w(void 0,M)}function Y(D,M,c){if(c in g)return w(D,M);if(c in A)return w(void 0,D)}const F={url:E,method:E,data:E,baseURL:I,transformRequest:I,transformResponse:I,paramsSerializer:I,timeout:I,timeoutMessage:I,withCredentials:I,withXSRFToken:I,adapter:I,responseType:I,xsrfCookieName:I,xsrfHeaderName:I,onUploadProgress:I,onDownloadProgress:I,decompress:I,maxContentLength:I,maxBodyLength:I,beforeRedirect:I,transport:I,httpAgent:I,httpsAgent:I,cancelToken:I,socketPath:I,responseEncoding:I,validateStatus:Y,headers:(D,M,c)=>C(OI(D),OI(M),c,!0)};return m.forEach(Object.keys(Object.assign({},A,g)),function(M){const c=F[M]||C,i=c(A[M],g[M],M);m.isUndefined(i)&&c!==Y||(Q[M]=i)}),Q}const ZI=A=>{const g=SB({},A);let{data:Q,withXSRFToken:w,xsrfHeaderName:C,xsrfCookieName:E,headers:I,auth:Y}=g;g.headers=I=gB.from(I),g.url=LI(pI(g.baseURL,g.url,g.allowAbsoluteUrls),A.params,A.paramsSerializer),Y&&I.set("Authorization","Basic "+btoa((Y.username||"")+":"+(Y.password?unescape(encodeURIComponent(Y.password)):"")));let F;if(m.isFormData(Q)){if(XA.hasStandardBrowserEnv||XA.hasStandardBrowserWebWorkerEnv)I.setContentType(void 0);else if((F=I.getContentType())!==!1){const[D,...M]=F?F.split(";").map(c=>c.trim()).filter(Boolean):[];I.setContentType([D||"multipart/form-data",...M].join("; "))}}if(XA.hasStandardBrowserEnv&&(w&&m.isFunction(w)&&(w=w(g)),w||w!==!1&&Ai(g.url))){const D=C&&E&&Bi.read(E);D&&I.set(C,D)}return g},wi=typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(Q,w){const C=ZI(A);let E=C.data;const I=gB.from(C.headers).normalize();let{responseType:Y,onUploadProgress:F,onDownloadProgress:D}=C,M,c,i,U,o;function G(){U&&U(),o&&o(),C.cancelToken&&C.cancelToken.unsubscribe(M),C.signal&&C.signal.removeEventListener("abort",M)}let e=new XMLHttpRequest;e.open(C.method.toUpperCase(),C.url,!0),e.timeout=C.timeout;function t(){if(!e)return;const h=gB.from("getAllResponseHeaders"in e&&e.getAllResponseHeaders()),P={data:!Y||Y==="text"||Y==="json"?e.responseText:e.response,status:e.status,statusText:e.statusText,headers:h,config:A,request:e};bI(function(L){Q(L),G()},function(L){w(L),G()},P),e=null}"onloadend"in e?e.onloadend=t:e.onreadystatechange=function(){!e||e.readyState!==4||e.status===0&&!(e.responseURL&&e.responseURL.indexOf("file:")===0)||setTimeout(t)},e.onabort=function(){e&&(w(new GA("Request aborted",GA.ECONNABORTED,A,e)),e=null)},e.onerror=function(){w(new GA("Network Error",GA.ERR_NETWORK,A,e)),e=null},e.ontimeout=function(){let s=C.timeout?"timeout of "+C.timeout+"ms exceeded":"timeout exceeded";const P=C.transitional||VI;C.timeoutErrorMessage&&(s=C.timeoutErrorMessage),w(new GA(s,P.clarifyTimeoutError?GA.ETIMEDOUT:GA.ECONNABORTED,A,e)),e=null},E===void 0&&I.setContentType(null),"setRequestHeader"in e&&m.forEach(I.toJSON(),function(s,P){e.setRequestHeader(P,s)}),m.isUndefined(C.withCredentials)||(e.withCredentials=!!C.withCredentials),Y&&Y!=="json"&&(e.responseType=C.responseType),D&&([i,o]=PQ(D,!0),e.addEventListener("progress",i)),F&&e.upload&&([c,U]=PQ(F),e.upload.addEventListener("progress",c),e.upload.addEventListener("loadend",U)),(C.cancelToken||C.signal)&&(M=h=>{e&&(w(!h||h.type?new Mg(null,A,e):h),e.abort(),e=null)},C.cancelToken&&C.cancelToken.subscribe(M),C.signal&&(C.signal.aborted?M():C.signal.addEventListener("abort",M)));const N=qo(C.url);if(N&&XA.protocols.indexOf(N)===-1){w(new GA("Unsupported protocol "+N+":",GA.ERR_BAD_REQUEST,A));return}e.send(E||null)})},Ci=(A,g)=>{const{length:Q}=A=A?A.filter(Boolean):[];if(g||Q){let w=new AbortController,C;const E=function(D){if(!C){C=!0,Y();const M=D instanceof Error?D:this.reason;w.abort(M instanceof GA?M:new Mg(M instanceof Error?M.message:M))}};let I=g&&setTimeout(()=>{I=null,E(new GA(`timeout ${g} of ms exceeded`,GA.ETIMEDOUT))},g);const Y=()=>{A&&(I&&clearTimeout(I),I=null,A.forEach(D=>{D.unsubscribe?D.unsubscribe(E):D.removeEventListener("abort",E)}),A=null)};A.forEach(D=>D.addEventListener("abort",E));const{signal:F}=w;return F.unsubscribe=()=>m.asap(Y),F}},Ei=function*(A,g){let Q=A.byteLength;if(Q<g){yield A;return}let w=0,C;for(;w<Q;)C=w+g,yield A.slice(w,C),w=C},Ii=async function*(A,g){for await(const Q of Yi(A))yield*Ei(Q,g)},Yi=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}const g=A.getReader();try{for(;;){const{done:Q,value:w}=await g.read();if(Q)break;yield w}}finally{await g.cancel()}},qI=(A,g,Q,w)=>{const C=Ii(A,g);let E=0,I,Y=F=>{I||(I=!0,w&&w(F))};return new ReadableStream({async pull(F){try{const{done:D,value:M}=await C.next();if(D){Y(),F.close();return}let c=M.byteLength;if(Q){let i=E+=c;Q(i)}F.enqueue(new Uint8Array(M))}catch(D){throw Y(D),D}},cancel(F){return Y(F),C.return()}},{highWaterMark:2})},aQ=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",_I=aQ&&typeof ReadableStream=="function",Mi=aQ&&(typeof TextEncoder=="function"?(A=>g=>A.encode(g))(new TextEncoder):async A=>new Uint8Array(await new Response(A).arrayBuffer())),$I=(A,...g)=>{try{return!!A(...g)}catch{return!1}},Di=_I&&$I(()=>{let A=!1;const g=new Request(XA.origin,{body:new ReadableStream,method:"POST",get duplex(){return A=!0,"half"}}).headers.has("Content-Type");return A&&!g}),AY=64*1024,$w=_I&&$I(()=>m.isReadableStream(new Response("").body)),lQ={stream:$w&&(A=>A.body)};aQ&&(A=>{["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!lQ[g]&&(lQ[g]=m.isFunction(A[g])?Q=>Q[g]():(Q,w)=>{throw new GA(`Response type '${g}' is not supported`,GA.ERR_NOT_SUPPORT,w)})})})(new Response);const Fi=async A=>{if(A==null)return 0;if(m.isBlob(A))return A.size;if(m.isSpecCompliantForm(A))return(await new Request(XA.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(m.isArrayBufferView(A)||m.isArrayBuffer(A))return A.byteLength;if(m.isURLSearchParams(A)&&(A=A+""),m.isString(A))return(await Mi(A)).byteLength},ci=async(A,g)=>{const Q=m.toFiniteNumber(A.getContentLength());return Q??Fi(g)},AC={http:uo,xhr:wi,fetch:aQ&&(async A=>{let{url:g,method:Q,data:w,signal:C,cancelToken:E,timeout:I,onDownloadProgress:Y,onUploadProgress:F,responseType:D,headers:M,withCredentials:c="same-origin",fetchOptions:i}=ZI(A);D=D?(D+"").toLowerCase():"text";let U=Ci([C,E&&E.toAbortSignal()],I),o;const G=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let e;try{if(F&&Di&&Q!=="get"&&Q!=="head"&&(e=await ci(M,w))!==0){let P=new Request(g,{method:"POST",body:w,duplex:"half"}),f;if(m.isFormData(w)&&(f=P.headers.get("content-type"))&&M.setContentType(f),P.body){const[L,y]=XI(e,PQ(xI(F)));w=qI(P.body,AY,L,y)}}m.isString(c)||(c=c?"include":"omit");const t="credentials"in Request.prototype;o=new Request(g,{...i,signal:U,method:Q.toUpperCase(),headers:M.normalize().toJSON(),body:w,duplex:"half",credentials:t?c:void 0});let N=await fetch(o);const h=$w&&(D==="stream"||D==="response");if($w&&(Y||h&&G)){const P={};["status","statusText","headers"].forEach(j=>{P[j]=N[j]});const f=m.toFiniteNumber(N.headers.get("content-length")),[L,y]=Y&&XI(f,PQ(xI(Y),!0))||[];N=new Response(qI(N.body,AY,L,()=>{y&&y(),G&&G()}),P)}D=D||"text";let s=await lQ[m.findKey(lQ,D)||"text"](N,A);return!h&&G&&G(),await new Promise((P,f)=>{bI(P,f,{data:s,headers:gB.from(N.headers),status:N.status,statusText:N.statusText,config:A,request:o})})}catch(t){throw G&&G(),t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)?Object.assign(new GA("Network Error",GA.ERR_NETWORK,A,o),{cause:t.cause||t}):GA.from(t,t&&t.code,A,o)}})};m.forEach(AC,(A,g)=>{if(A){try{Object.defineProperty(A,"name",{value:g})}catch{}Object.defineProperty(A,"adapterName",{value:g})}});const BY=A=>`- ${A}`,Ui=A=>m.isFunction(A)||A===null||A===!1,gY={getAdapter:A=>{A=m.isArray(A)?A:[A];const{length:g}=A;let Q,w;const C={};for(let E=0;E<g;E++){Q=A[E];let I;if(w=Q,!Ui(Q)&&(w=AC[(I=String(Q)).toLowerCase()],w===void 0))throw new GA(`Unknown adapter '${I}'`);if(w)break;C[I||"#"+E]=w}if(!w){const E=Object.entries(C).map(([Y,F])=>`adapter ${Y} `+(F===!1?"is not supported by the environment":"is not available in the build"));let I=g?E.length>1?`since :
5
5
  `+E.map(BY).join(`
6
6
  `):" "+BY(E[0]):"as no adapter specified";throw new GA("There is no suitable adapter to dispatch the request "+I,"ERR_NOT_SUPPORT")}return w},adapters:AC};function BC(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new Mg(null,A)}function QY(A){return BC(A),A.headers=gB.from(A.headers),A.data=_w.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),gY.getAdapter(A.adapter||Wg.adapter)(A).then(function(w){return BC(A),w.data=_w.call(A,A.transformResponse,w),w.headers=gB.from(w.headers),w},function(w){return yI(w)||(BC(A),w&&w.response&&(w.response.data=_w.call(A,A.transformResponse,w.response),w.response.headers=gB.from(w.response.headers))),Promise.reject(w)})}const wY="1.9.0",dQ={};["object","boolean","number","function","string","symbol"].forEach((A,g)=>{dQ[A]=function(w){return typeof w===A||"a"+(g<1?"n ":" ")+A}});const CY={};dQ.transitional=function(g,Q,w){function C(E,I){return"[Axios v"+wY+"] Transitional option '"+E+"'"+I+(w?". "+w:"")}return(E,I,Y)=>{if(g===!1)throw new GA(C(I," has been removed"+(Q?" in "+Q:"")),GA.ERR_DEPRECATED);return Q&&!CY[I]&&(CY[I]=!0,console.warn(C(I," has been deprecated since v"+Q+" and will be removed in the near future"))),g?g(E,I,Y):!0}},dQ.spelling=function(g){return(Q,w)=>(console.warn(`${w} is likely a misspelling of ${g}`),!0)};function Gi(A,g,Q){if(typeof A!="object")throw new GA("options must be an object",GA.ERR_BAD_OPTION_VALUE);const w=Object.keys(A);let C=w.length;for(;C-- >0;){const E=w[C],I=g[E];if(I){const Y=A[E],F=Y===void 0||I(Y,E,A);if(F!==!0)throw new GA("option "+E+" must be "+F,GA.ERR_BAD_OPTION_VALUE);continue}if(Q!==!0)throw new GA("Unknown option "+E,GA.ERR_BAD_OPTION)}}const kQ={assertOptions:Gi,validators:dQ},eB=kQ.validators;let yB=class{constructor(g){this.defaults=g||{},this.interceptors={request:new KI,response:new KI}}async request(g,Q){try{return await this._request(g,Q)}catch(w){if(w instanceof Error){let C={};Error.captureStackTrace?Error.captureStackTrace(C):C=new Error;const E=C.stack?C.stack.replace(/^.+\n/,""):"";try{w.stack?E&&!String(w.stack).endsWith(E.replace(/^.+\n.+\n/,""))&&(w.stack+=`
7
- `+E):w.stack=E}catch{}}throw w}}_request(g,Q){typeof g=="string"?(Q=Q||{},Q.url=g):Q=g||{},Q=SB(this.defaults,Q);const{transitional:w,paramsSerializer:C,headers:E}=Q;w!==void 0&&kQ.assertOptions(w,{silentJSONParsing:eB.transitional(eB.boolean),forcedJSONParsing:eB.transitional(eB.boolean),clarifyTimeoutError:eB.transitional(eB.boolean)},!1),C!=null&&(m.isFunction(C)?Q.paramsSerializer={serialize:C}:kQ.assertOptions(C,{encode:eB.function,serialize:eB.function},!0)),Q.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?Q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:Q.allowAbsoluteUrls=!0),kQ.assertOptions(Q,{baseUrl:eB.spelling("baseURL"),withXsrfToken:eB.spelling("withXSRFToken")},!0),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&m.merge(E.common,E[Q.method]);E&&m.forEach(["delete","get","head","post","put","patch","common"],o=>{delete E[o]}),Q.headers=gB.concat(I,E);const Y=[];let F=!0;this.interceptors.request.forEach(function(G){typeof G.runWhen=="function"&&G.runWhen(Q)===!1||(F=F&&G.synchronous,Y.unshift(G.fulfilled,G.rejected))});const D=[];this.interceptors.response.forEach(function(G){D.push(G.fulfilled,G.rejected)});let M,c=0,i;if(!F){const o=[QY.bind(this),void 0];for(o.unshift.apply(o,Y),o.push.apply(o,D),i=o.length,M=Promise.resolve(Q);c<i;)M=M.then(o[c++],o[c++]);return M}i=Y.length;let U=Q;for(c=0;c<i;){const o=Y[c++],G=Y[c++];try{U=o(U)}catch(e){G.call(this,e);break}}try{M=QY.call(this,U)}catch(o){return Promise.reject(o)}for(c=0,i=D.length;c<i;)M=M.then(D[c++],D[c++]);return M}getUri(g){g=SB(this.defaults,g);const Q=pI(g.baseURL,g.url,g.allowAbsoluteUrls);return LI(Q,g.params,g.paramsSerializer)}};m.forEach(["delete","get","head","options"],function(g){yB.prototype[g]=function(Q,w){return this.request(SB(w||{},{method:g,url:Q,data:(w||{}).data}))}}),m.forEach(["post","put","patch"],function(g){function Q(w){return function(E,I,Y){return this.request(SB(Y||{},{method:g,headers:w?{"Content-Type":"multipart/form-data"}:{},url:E,data:I}))}}yB.prototype[g]=Q(),yB.prototype[g+"Form"]=Q(!0)});let oi=class cY{constructor(g){if(typeof g!="function")throw new TypeError("executor must be a function.");let Q;this.promise=new Promise(function(E){Q=E});const w=this;this.promise.then(C=>{if(!w._listeners)return;let E=w._listeners.length;for(;E-- >0;)w._listeners[E](C);w._listeners=null}),this.promise.then=C=>{let E;const I=new Promise(Y=>{w.subscribe(Y),E=Y}).then(C);return I.cancel=function(){w.unsubscribe(E)},I},g(function(E,I,Y){w.reason||(w.reason=new Mg(E,I,Y),Q(w.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 Q=this._listeners.indexOf(g);Q!==-1&&this._listeners.splice(Q,1)}toAbortSignal(){const g=new AbortController,Q=w=>{g.abort(w)};return this.subscribe(Q),g.signal.unsubscribe=()=>this.unsubscribe(Q),g.signal}static source(){let g;return{token:new cY(function(C){g=C}),cancel:g}}};function ii(A){return function(Q){return A.apply(null,Q)}}function ei(A){return m.isObject(A)&&A.isAxiosError===!0}const gC={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(gC).forEach(([A,g])=>{gC[g]=A});function EY(A){const g=new yB(A),Q=RI(yB.prototype.request,g);return m.extend(Q,yB.prototype,g,{allOwnKeys:!0}),m.extend(Q,g,null,{allOwnKeys:!0}),Q.create=function(C){return EY(SB(A,C))},Q}const rA=EY(Wg);rA.Axios=yB,rA.CanceledError=Mg,rA.CancelToken=oi,rA.isCancel=yI,rA.VERSION=wY,rA.toFormData=RQ,rA.AxiosError=GA,rA.Cancel=rA.CanceledError,rA.all=function(g){return Promise.all(g)},rA.spread=ii,rA.isAxiosError=ei,rA.mergeConfig=SB,rA.AxiosHeaders=gB,rA.formToJSON=A=>vI(m.isHTMLForm(A)?new FormData(A):A),rA.getAdapter=gY.getAdapter,rA.HttpStatusCode=gC,rA.default=rA;const{Axios:DH,AxiosError:FH,CanceledError:cH,isCancel:UH,CancelToken:GH,VERSION:oH,all:iH,Cancel:eH,isAxiosError:HH,spread:sH,toFormData:JH,AxiosHeaders:NH,HttpStatusCode:nH,formToJSON:tH,getAdapter:RH,mergeConfig:hH}=rA;class oB{constructor(){FY(this,"axiosInstance");this.axiosInstance=rA.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(g=>{const Q=this.getToken();return Q&&g.headers&&(g.headers.Authorization=`Bearer ${Q}`),g},g=>Promise.reject(g)),this.axiosInstance.interceptors.response.use(g=>g.data,g=>{var Q,w;return(((Q=g.response)==null?void 0:Q.status)===401||((w=g.response)==null?void 0:w.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,Q){try{const w=await this.axiosInstance.get(g,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 delete(g,Q){try{return await this.axiosInstance.delete(g,Q)}catch(w){const C=w;throw this.handleError(C),w}}async post(g,Q,w){try{const C=await this.axiosInstance.post(g,Q,w);return(C==null?void 0:C.data)===!1?!1:(C==null?void 0:C.data)||C}catch(C){const E=C;throw this.handleError(E),C}}async put(g,Q,w){try{return(await this.axiosInstance.put(g,Q,w)).data}catch(C){const E=C;throw this.handleError(E),C}}}class Hi extends oB{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 QC;function si(){return QC||(QC=new Hi),QC}class Ji extends oB{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_list_work_zone_instrument?"+g)}async fetchWorkZoneInfo(g){return await this.get("repairs/metrics/get_list_work_zone_instrument_by_status?"+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 wC;function Ni(){return wC||(wC=new Ji),wC}class ni extends oB{async fetchProjectById(g){return this.get(`/projects/${g}`)}createProject(g){return this.post("/projects",g)}editProject(g,Q){return this.put(`/projects/${g}`,Q)}fetchProjects(g){return this.get("/search/projects",{params:g})}cloneProject(g){return this.post(`projects/${g.id}/clone`,g)}archiveProject(g,Q){return this.put(`/projects/${g}`,Q)}unArchiveProject(g,Q){return this.put(`/projects/${g}`,Q)}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"}})}fetchProjectTeamList(g){return this.put(`/projects/${g}`,null)}deleteProject(g){return this.delete(`/projects/${g}`)}}let CC;function ti(){return CC||(CC=new ni),CC}class Ri extends oB{fetchFilters(g){return this.get(`get_list_repair?smart=1&${g}`)}fetchRepairs(g,Q,w,C,E){return this.get("get_list_repair"+(g?`${Q}&per_page=100000${E?"&"+E:""}&${w?"":C}`:`?per_page=100000${E?"&"+E:""}&${C}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(g){return this.post("/repairs/equipments",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,Q){return this.put(`/repairs/${Q}`,g)}copyRepair(g){return this.post(`/repairs/${g}/clone`,null)}deleteRepair(g){return this.delete(`/repairs/${g}`)}}let EC;function hi(){return EC||(EC=new Ri),EC}class Pi extends oB{async fetchTaskById(g){return await this.get(`/tasks/${g}`)}async fetchTasksList(g){return await this.get("/list/tasks/search",{params:g})}async fetchSubtasksList(g){return await this.get(`/task/${g}/subtasks/list`)}async fetchTaskBranch(g){return await this.get(`/get_list_task_branch?task_id=${g}`)}async fetchInstrumentsList(g){return await this.get("admin/instruments",{params:g})}async fetchInstrumentTypeListWithPreparedWarehouse(g){return await this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:g})}async fetchInstrumentsEquivalentList(g){return await this.get("tasks/instrument/list",{params:g})}async fetchDiffInstruments(g){return await this.get(`tasks/${g.taskId}/fill/module`,{params:g})}async replaceInstruments(g){return await this.post("/instruments/equivalent/attach",g)}async fetchTaskUsagePersonal(g){return await this.get(`tasks/${g.taskId}/usage/users`,{params:g})}async fetchTaskUsageInstrument(g){return await this.get(`tasks/${g.taskId}/usage/instruments`,{params:g})}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)}async createTask(g){return await this.post("tasks",g)}async editTask(g){return await this.put(`tasks/${g.taskId}`,g.data)}async mergeTask(g){return await this.post("tasks/merge",g)}async deleteTask(g){return await this.delete(`tasks/${g}`)}async changeStatus(g){const{taskId:Q,data:w}=g;return await this.put(`task/${Q}/change-status`,w)}async uploadComment(g){return await this.post("comments",g)}async deleteComment(g){return await this.delete(`comments/${g}`)}async editComment(g){const{commentId:Q,data:w}=g;return await this.put(`comments/${Q}`,w)}async saveMetrics(g){return await this.put("/update_quality_metrics",g)}async checkReasonForStatus(g){return await this.post("/tasks/check_reason_for_task",g)}async verifyTaskStatus(g){const{task_id:Q,data:w}=g;return await this.get(`/task/${Q}/change-status/verification`,{params:w})}async checkBranchBeforeCloseTask(g){return await this.post("/check_branch_before_close_task",g)}}let IC;function ai(){return IC||(IC=new Pi),IC}class li extends oB{login(g,Q){return this.post("/login",{email:g,password:Q})}loginPhoto(g){return this.post("/login/from_photo",{photo:g})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}changePassword(g,Q,w){return this.put(`/users/${g}/password`,{password:Q,password_confirmation:w})}}let YC;function di(){return YC||(YC=new li),YC}class ki extends oB{uploadFile(g){return this.post("/upload-file",g,{headers:{"Content-Type":"multipart/form-data"}})}}let MC;function mi(){return MC||(MC=new ki),MC}class ji extends oB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}}let DC;function ui(){return DC||(DC=new ji),DC}class Ti extends oB{async fetchUserInstrumentsHistory(g,Q){return await this.get(`users/${g}/instruments`,{params:Q})}}let FC;function ri(){return FC||(FC=new Ti),FC}class zi extends oB{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,Q){return this.put(`/frame/${g}`,Q)}deleteControlZone(g){return this.delete(`/frame/${g}`)}fetchControlLogs(g){return this.get("/exposed_equipment_zones/list",{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})}}let cC;function fi(){return cC||(cC=new zi),cC}function Wi(A){const g=B.ref(""),Q=B.ref(1),w=async(I="",Y=1)=>{await A.initialize({search:I,page:Y})},C=async I=>{g.value=I,Q.value=1,await w(I,Q.value)},E=async I=>{Q.value=I,await w(g.value,I)};return B.watch(()=>A.columnFilters.value,()=>w(g.value,Q.value),{deep:!0}),B.onMounted(()=>w(g.value,Q.value)),{search:g,currentPage:Q,loading:A.loading,handleSearch:C,handlePageChange:E,loadTable:w}}const Li=A=>{const g=B.ref({}),Q=B.ref({});A.columns.forEach(({name:F,filterType:D})=>{D&&(g.value[F]=D==="multi"?[]:void 0,Q.value[F]=!1)});const w=B.computed(()=>Array.isArray(A.rows)?A.rows:A.rows.value),C=(F,D)=>{const M=A.columns.find(c=>c.name===F);if((M==null?void 0:M.filterType)==="multi"){const c=g.value[F],i=c.indexOf(D);i>-1?c.splice(i,1):c.push(D),g.value[F]=[...c]}else g.value[F]=D,Q.value[F]=!1},E=B.computed(()=>{var D;const F={};for(const M of A.columns){const c=g.value[M.name],i=((D=A.filtersOptions)==null?void 0:D.value[M.name])||[];c&&(F[M.name]=Array.isArray(c)?i.filter(U=>c.includes(U.name)).map(U=>U.id):i.filter(U=>U.name===c).map(U=>U.id))}return F}),I=F=>{const D=A.columns.find(M=>M.name===F);g.value[F]=(D==null?void 0:D.filterType)==="multi"?[]:void 0},Y=(F,D)=>{Q.value[F]=D};return{rows:w,columns:B.computed(()=>A.columns),columnFilters:g,filterMenus:Q,toggleFilterValue:C,clearFilter:I,openFilterMenu:Y,selectedFilters:E}};function Ki(A,g=[]){const Q=B.ref([...new Set([...g,...A.map(E=>E.name)])]),w=B.computed(()=>A.filter(E=>Q.value.includes(E.name)));function C(E){E.dialog({title:"Выберите колонки",options:{type:"checkbox",model:[...Q.value],items:A.map(I=>({label:I.label,value:I.name,disable:g.includes(I.name)}))},cancel:!0,persistent:!0}).onOk(I=>{Q.value=Array.from(new Set([...I,...g]))})}return{selectedColumnNames:Q,visibleColumns:w,openColumnSelectorDialog:C}}MA.ApiService=oB,MA.AppButton=gQ,MA.AppCheckbox=YM,MA.AppConfirmDialog=mU,MA.AppDatePicker=zM,MA.AppDropdown=zU,MA.AppInput=$M,MA.AppInputSearch=AD,MA.AppLayout=CD,MA.AppLayoutHeader=Vc,MA.AppLayoutPage=yc,MA.AppLoader=bE,MA.AppModalSelect=FI,MA.AppSelect=qc,MA.AppSheet=CU,MA.AppSidebar=oU,MA.AppTable=tI,MA.AppTableLayout=xG,MA.AppTableModal=$U,MA.AppTablePagination=MI,MA.AppTableSearch=DI,MA.AppToggle=iU,MA.AppWrapper=JU,MA.notificationSettings=cI,MA.useAuthService=di,MA.useBaseTable=Wi,MA.useColumnSelector=Ki,MA.useControlsService=fi,MA.useFileService=mi,MA.useGanttService=si,MA.useInstrumentsService=ri,MA.useMetricsService=Ni,MA.useProjectsService=ti,MA.useRepairsService=hi,MA.useTableModel=Li,MA.useTasksService=ai,MA.useVideoService=ui,Object.defineProperty(MA,Symbol.toStringTag,{value:"Module"})});
7
+ `+E):w.stack=E}catch{}}throw w}}_request(g,Q){typeof g=="string"?(Q=Q||{},Q.url=g):Q=g||{},Q=SB(this.defaults,Q);const{transitional:w,paramsSerializer:C,headers:E}=Q;w!==void 0&&kQ.assertOptions(w,{silentJSONParsing:eB.transitional(eB.boolean),forcedJSONParsing:eB.transitional(eB.boolean),clarifyTimeoutError:eB.transitional(eB.boolean)},!1),C!=null&&(m.isFunction(C)?Q.paramsSerializer={serialize:C}:kQ.assertOptions(C,{encode:eB.function,serialize:eB.function},!0)),Q.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?Q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:Q.allowAbsoluteUrls=!0),kQ.assertOptions(Q,{baseUrl:eB.spelling("baseURL"),withXsrfToken:eB.spelling("withXSRFToken")},!0),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&m.merge(E.common,E[Q.method]);E&&m.forEach(["delete","get","head","post","put","patch","common"],o=>{delete E[o]}),Q.headers=gB.concat(I,E);const Y=[];let F=!0;this.interceptors.request.forEach(function(G){typeof G.runWhen=="function"&&G.runWhen(Q)===!1||(F=F&&G.synchronous,Y.unshift(G.fulfilled,G.rejected))});const D=[];this.interceptors.response.forEach(function(G){D.push(G.fulfilled,G.rejected)});let M,c=0,i;if(!F){const o=[QY.bind(this),void 0];for(o.unshift.apply(o,Y),o.push.apply(o,D),i=o.length,M=Promise.resolve(Q);c<i;)M=M.then(o[c++],o[c++]);return M}i=Y.length;let U=Q;for(c=0;c<i;){const o=Y[c++],G=Y[c++];try{U=o(U)}catch(e){G.call(this,e);break}}try{M=QY.call(this,U)}catch(o){return Promise.reject(o)}for(c=0,i=D.length;c<i;)M=M.then(D[c++],D[c++]);return M}getUri(g){g=SB(this.defaults,g);const Q=pI(g.baseURL,g.url,g.allowAbsoluteUrls);return LI(Q,g.params,g.paramsSerializer)}};m.forEach(["delete","get","head","options"],function(g){yB.prototype[g]=function(Q,w){return this.request(SB(w||{},{method:g,url:Q,data:(w||{}).data}))}}),m.forEach(["post","put","patch"],function(g){function Q(w){return function(E,I,Y){return this.request(SB(Y||{},{method:g,headers:w?{"Content-Type":"multipart/form-data"}:{},url:E,data:I}))}}yB.prototype[g]=Q(),yB.prototype[g+"Form"]=Q(!0)});let oi=class cY{constructor(g){if(typeof g!="function")throw new TypeError("executor must be a function.");let Q;this.promise=new Promise(function(E){Q=E});const w=this;this.promise.then(C=>{if(!w._listeners)return;let E=w._listeners.length;for(;E-- >0;)w._listeners[E](C);w._listeners=null}),this.promise.then=C=>{let E;const I=new Promise(Y=>{w.subscribe(Y),E=Y}).then(C);return I.cancel=function(){w.unsubscribe(E)},I},g(function(E,I,Y){w.reason||(w.reason=new Mg(E,I,Y),Q(w.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 Q=this._listeners.indexOf(g);Q!==-1&&this._listeners.splice(Q,1)}toAbortSignal(){const g=new AbortController,Q=w=>{g.abort(w)};return this.subscribe(Q),g.signal.unsubscribe=()=>this.unsubscribe(Q),g.signal}static source(){let g;return{token:new cY(function(C){g=C}),cancel:g}}};function ii(A){return function(Q){return A.apply(null,Q)}}function ei(A){return m.isObject(A)&&A.isAxiosError===!0}const gC={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(gC).forEach(([A,g])=>{gC[g]=A});function EY(A){const g=new yB(A),Q=RI(yB.prototype.request,g);return m.extend(Q,yB.prototype,g,{allOwnKeys:!0}),m.extend(Q,g,null,{allOwnKeys:!0}),Q.create=function(C){return EY(SB(A,C))},Q}const rA=EY(Wg);rA.Axios=yB,rA.CanceledError=Mg,rA.CancelToken=oi,rA.isCancel=yI,rA.VERSION=wY,rA.toFormData=RQ,rA.AxiosError=GA,rA.Cancel=rA.CanceledError,rA.all=function(g){return Promise.all(g)},rA.spread=ii,rA.isAxiosError=ei,rA.mergeConfig=SB,rA.AxiosHeaders=gB,rA.formToJSON=A=>vI(m.isHTMLForm(A)?new FormData(A):A),rA.getAdapter=gY.getAdapter,rA.HttpStatusCode=gC,rA.default=rA;const{Axios:DH,AxiosError:FH,CanceledError:cH,isCancel:UH,CancelToken:GH,VERSION:oH,all:iH,Cancel:eH,isAxiosError:HH,spread:sH,toFormData:JH,AxiosHeaders:NH,HttpStatusCode:nH,formToJSON:tH,getAdapter:RH,mergeConfig:hH}=rA;class oB{constructor(){FY(this,"axiosInstance");this.axiosInstance=rA.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(g=>{const Q=this.getToken();return Q&&g.headers&&(g.headers.Authorization=`Bearer ${Q}`),g},g=>Promise.reject(g)),this.axiosInstance.interceptors.response.use(g=>g.data,g=>{var Q,w;return(((Q=g.response)==null?void 0:Q.status)===401||((w=g.response)==null?void 0:w.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,Q){try{const w=await this.axiosInstance.get(g,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 delete(g,Q){try{return await this.axiosInstance.delete(g,Q)}catch(w){const C=w;throw this.handleError(C),w}}async post(g,Q,w){try{const C=await this.axiosInstance.post(g,Q,w);return(C==null?void 0:C.data)===!1?!1:(C==null?void 0:C.data)||C}catch(C){const E=C;throw this.handleError(E),C}}async put(g,Q,w){try{return(await this.axiosInstance.put(g,Q,w)).data}catch(C){const E=C;throw this.handleError(E),C}}}class Hi extends oB{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 QC;function si(){return QC||(QC=new Hi),QC}class Ji extends oB{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_list_work_zone_instrument?"+g)}async fetchWorkZoneInfo(g){return await this.get("repairs/metrics/get_list_work_zone_instrument_by_status?"+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 wC;function Ni(){return wC||(wC=new Ji),wC}class ni extends oB{async fetchProjectById(g){return this.get(`/projects/${g}`)}createProject(g){return this.post("/projects",g)}editProject(g,Q){return this.put(`/projects/${g}`,Q)}fetchProjects(g){return this.get("/search/projects",{params:g})}cloneProject(g){return this.post(`projects/${g.id}/clone`,g)}archiveProject(g,Q){return this.put(`/projects/${g}`,Q)}unArchiveProject(g,Q){return this.put(`/projects/${g}`,Q)}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"}})}fetchProjectTeamList(g){return this.put(`/projects/${g}`,null)}deleteProject(g){return this.delete(`/projects/${g}`)}}let CC;function ti(){return CC||(CC=new ni),CC}class Ri extends oB{fetchFilters(g){return this.get(`get_list_repair?smart=1&${g}`)}fetchRepairs(g,Q,w,C,E){return this.get("get_list_repair"+(g?`${Q}&per_page=100000${E?"&"+E:""}&${w?"":C}`:`?per_page=100000${E?"&"+E:""}&${C}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(g){return this.post("/repairs/equipments",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,Q){return this.put(`/repairs/${Q}`,g)}copyRepair(g){return this.post(`/repairs/${g}/clone`,null)}deleteRepair(g){return this.delete(`/repairs/${g}`)}}let EC;function hi(){return EC||(EC=new Ri),EC}class Pi extends oB{async fetchTaskById(g){return await this.get(`/tasks/${g}`)}async fetchTasksList(g){return await this.get("/list/tasks/search",{params:g})}async fetchSubtasksList(g){return await this.get(`/task/${g}/subtasks/list`)}async fetchTaskBranch(g){return await this.get(`/get_list_task_branch?task_id=${g}`)}async fetchInstrumentsList(g){return await this.get("admin/instruments",{params:g})}async fetchInstrumentTypeListWithPreparedWarehouse(g){return await this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:g})}async fetchInstrumentsEquivalentList(g){return await this.get("tasks/instrument/list",{params:g})}async fetchDiffInstruments(g){return await this.get(`tasks/${g.taskId}/fill/module`,{params:g})}async replaceInstruments(g){return await this.post("/instruments/equivalent/attach",g)}async fetchTaskUsagePersonal(g){return await this.get(`tasks/${g.taskId}/usage/users`,{params:g})}async fetchTaskUsageInstrument(g){return await this.get(`tasks/${g.taskId}/usage/instruments`,{params:g})}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)}async createTask(g){return await this.post("tasks",g)}async editTask(g){return await this.put(`tasks/${g.taskId}`,g.data)}async mergeTask(g){return await this.post("tasks/merge",g)}async deleteTask(g){return await this.delete(`tasks/${g}`)}async changeStatus(g){const{taskId:Q,data:w}=g;return await this.put(`task/${Q}/change-status`,w)}async uploadComment(g){return await this.post("comments",g)}async deleteComment(g){return await this.delete(`comments/${g}`)}async editComment(g){const{commentId:Q,data:w}=g;return await this.put(`comments/${Q}`,w)}async saveMetrics(g){return await this.put("/update_quality_metrics",g)}async checkReasonForStatus(g){return await this.post("/tasks/check_reason_for_task",g)}async verifyTaskStatus(g){const{task_id:Q,data:w}=g;return await this.get(`/task/${Q}/change-status/verification`,{params:w})}async checkBranchBeforeCloseTask(g){return await this.post("/check_branch_before_close_task",g)}}let IC;function ai(){return IC||(IC=new Pi),IC}class li extends oB{login(g,Q){return this.post("/login",{email:g,password:Q})}loginPhoto(g){return this.post("/login/from_photo",{photo:g})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}changePassword(g,Q,w){return this.put(`/users/${g}/password`,{password:Q,password_confirmation:w})}}let YC;function di(){return YC||(YC=new li),YC}class ki extends oB{uploadFile(g){return this.post("/upload-file",g,{headers:{"Content-Type":"multipart/form-data"}})}}let MC;function mi(){return MC||(MC=new ki),MC}class ji extends oB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}}let DC;function ui(){return DC||(DC=new ji),DC}class Ti extends oB{async fetchUserInstrumentsHistory(g,Q){const w={status:"issued",page:Q,desc:"desc",column:"updated_at"};return await this.get(`users/${g}/instruments`,{params:w})}}let FC;function ri(){return FC||(FC=new Ti),FC}class zi extends oB{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,Q){return this.put(`/frame/${g}`,Q)}deleteControlZone(g){return this.delete(`/frame/${g}`)}fetchControlLogs(g){return this.get("/exposed_equipment_zones/list",{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})}}let cC;function fi(){return cC||(cC=new zi),cC}function Wi(A){const g=B.ref(""),Q=B.ref(1),w=async(I="",Y=1)=>{await A.initialize({search:I,page:Y})},C=async I=>{g.value=I,Q.value=1,await w(I,Q.value)},E=async I=>{Q.value=I,await w(g.value,I)};return B.watch(()=>A.columnFilters.value,()=>w(g.value,Q.value),{deep:!0}),B.onMounted(()=>w(g.value,Q.value)),{search:g,currentPage:Q,loading:A.loading,handleSearch:C,handlePageChange:E,loadTable:w}}const Li=A=>{const g=B.ref({}),Q=B.ref({});A.columns.forEach(({name:F,filterType:D})=>{D&&(g.value[F]=D==="multi"?[]:void 0,Q.value[F]=!1)});const w=B.computed(()=>Array.isArray(A.rows)?A.rows:A.rows.value),C=(F,D)=>{const M=A.columns.find(c=>c.name===F);if((M==null?void 0:M.filterType)==="multi"){const c=g.value[F],i=c.indexOf(D);i>-1?c.splice(i,1):c.push(D),g.value[F]=[...c]}else g.value[F]=D,Q.value[F]=!1},E=B.computed(()=>{var D;const F={};for(const M of A.columns){const c=g.value[M.name],i=((D=A.filtersOptions)==null?void 0:D.value[M.name])||[];c&&(F[M.name]=Array.isArray(c)?i.filter(U=>c.includes(U.name)).map(U=>U.id):i.filter(U=>U.name===c).map(U=>U.id))}return F}),I=F=>{const D=A.columns.find(M=>M.name===F);g.value[F]=(D==null?void 0:D.filterType)==="multi"?[]:void 0},Y=(F,D)=>{Q.value[F]=D};return{rows:w,columns:B.computed(()=>A.columns),columnFilters:g,filterMenus:Q,toggleFilterValue:C,clearFilter:I,openFilterMenu:Y,selectedFilters:E}};function Ki(A,g=[]){const Q=B.ref([...new Set([...g,...A.map(E=>E.name)])]),w=B.computed(()=>A.filter(E=>Q.value.includes(E.name)));function C(E){E.dialog({title:"Выберите колонки",options:{type:"checkbox",model:[...Q.value],items:A.map(I=>({label:I.label,value:I.name,disable:g.includes(I.name)}))},cancel:!0,persistent:!0}).onOk(I=>{Q.value=Array.from(new Set([...I,...g]))})}return{selectedColumnNames:Q,visibleColumns:w,openColumnSelectorDialog:C}}MA.ApiService=oB,MA.AppButton=gQ,MA.AppCheckbox=YM,MA.AppConfirmDialog=mU,MA.AppDatePicker=zM,MA.AppDropdown=zU,MA.AppInput=$M,MA.AppInputSearch=AD,MA.AppLayout=CD,MA.AppLayoutHeader=Vc,MA.AppLayoutPage=yc,MA.AppLoader=bE,MA.AppModalSelect=FI,MA.AppSelect=qc,MA.AppSheet=CU,MA.AppSidebar=oU,MA.AppTable=tI,MA.AppTableLayout=xG,MA.AppTableModal=$U,MA.AppTablePagination=MI,MA.AppTableSearch=DI,MA.AppToggle=iU,MA.AppWrapper=JU,MA.notificationSettings=cI,MA.useAuthService=di,MA.useBaseTable=Wi,MA.useColumnSelector=Ki,MA.useControlsService=fi,MA.useFileService=mi,MA.useGanttService=si,MA.useInstrumentsService=ri,MA.useMetricsService=Ni,MA.useProjectsService=ti,MA.useRepairsService=hi,MA.useTableModel=Li,MA.useTasksService=ai,MA.useVideoService=ui,Object.defineProperty(MA,Symbol.toStringTag,{value:"Module"})});
@@ -1,7 +1,7 @@
1
1
  import ApiService from '@/api/settings/ApiService';
2
- import { InstrumentHistoryParams, InstrumentHistoryResponse } from '@/api/types/Api_Instruments';
2
+ import { Api_instruments_HistoryResponse } from '@/api/types/Api_Instruments';
3
3
  declare class InstrumentsService extends ApiService {
4
- fetchUserInstrumentsHistory(id: string, params: InstrumentHistoryParams): Promise<InstrumentHistoryResponse>;
4
+ fetchUserInstrumentsHistory(id: string, page: number): Promise<Api_instruments_HistoryResponse>;
5
5
  }
6
6
  export default function useInstrumentsService(): InstrumentsService;
7
7
  export {};
@@ -1,4 +1,4 @@
1
- type InstrumentStorage = {
1
+ export type Api_Instrument_Storage = {
2
2
  id: string;
3
3
  created_at: string;
4
4
  deleted_at: string | null;
@@ -10,7 +10,7 @@ type InstrumentStorage = {
10
10
  parents: unknown[];
11
11
  state_id: unknown | null;
12
12
  };
13
- type InstrumentType = {
13
+ export type Api_Instrument_Type = {
14
14
  id: string;
15
15
  name: string;
16
16
  created_at: string;
@@ -18,9 +18,9 @@ type InstrumentType = {
18
18
  deleted_at: string | null;
19
19
  icon: string;
20
20
  storage_id: string;
21
- storage: InstrumentStorage;
21
+ storage: Api_Instrument_Storage;
22
22
  };
23
- type InstrumentLocation = {
23
+ export type Api_Instrument_Location = {
24
24
  id: string;
25
25
  name: string;
26
26
  title: string;
@@ -30,7 +30,7 @@ type InstrumentLocation = {
30
30
  deleted_at: string | null;
31
31
  state_id: unknown | null;
32
32
  };
33
- type UserTeam = {
33
+ export type Api_User_Team = {
34
34
  id: string;
35
35
  name: string;
36
36
  display_name: string;
@@ -42,7 +42,7 @@ type UserTeam = {
42
42
  user_id: string;
43
43
  };
44
44
  };
45
- type InstrumentStatus = {
45
+ export type Api_Instrument_Status = {
46
46
  id: string;
47
47
  description: string;
48
48
  name: string;
@@ -51,7 +51,7 @@ type InstrumentStatus = {
51
51
  updated_at: string;
52
52
  deleted_at: string | null;
53
53
  };
54
- type InstrumentResponsible = {
54
+ export type Api_User = {
55
55
  id: string;
56
56
  RFID: string;
57
57
  avatar: unknown | null;
@@ -72,9 +72,9 @@ type InstrumentResponsible = {
72
72
  personnel_number: number;
73
73
  phone: string;
74
74
  profession: string;
75
- teams: UserTeam[];
75
+ teams: Api_User_Team[];
76
76
  };
77
- type Instrument = {
77
+ export type Api_Instrument = {
78
78
  id: string;
79
79
  RFID: string | null;
80
80
  instrument_id: string;
@@ -84,11 +84,11 @@ type Instrument = {
84
84
  updated_at: string;
85
85
  deleted_at: string | null;
86
86
  inventory_number: string;
87
- instrument_type: InstrumentType;
87
+ instrument_type: Api_Instrument_Type;
88
88
  invoice_ref_key: string;
89
89
  last_status_updated_at: string;
90
90
  location_id: string;
91
- location: InstrumentLocation;
91
+ location: Api_Instrument_Location;
92
92
  misplacement: boolean;
93
93
  module: string | null;
94
94
  module_id: string | null;
@@ -96,23 +96,17 @@ type Instrument = {
96
96
  pressure: unknown | null;
97
97
  registry_module_id: string;
98
98
  responsible_id: string;
99
- responsible: InstrumentResponsible;
100
- status: InstrumentStatus;
99
+ responsible: Api_User;
100
+ status: Api_Instrument_Status;
101
101
  status_id: string;
102
- storage: InstrumentStorage;
102
+ storage: Api_Instrument_Storage;
103
103
  supervisor: unknown | null;
104
104
  supervisor_id: string;
105
105
  type: unknown | null;
106
106
  weight: unknown | null;
107
107
  };
108
- export type InstrumentHistoryParams = {
109
- status?: string;
110
- page?: number;
111
- desc?: string;
112
- column?: string;
113
- };
114
- export type InstrumentHistoryResponse = {
115
- data: Instrument[];
108
+ export type Api_instruments_HistoryResponse = {
109
+ data: Api_Instrument[];
116
110
  from: number;
117
111
  to: number;
118
112
  total: number;
@@ -130,4 +124,3 @@ export type InstrumentHistoryResponse = {
130
124
  active: boolean;
131
125
  }[];
132
126
  };
133
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.60",
3
+ "version": "1.2.62",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,8 +1,8 @@
1
1
  import ApiService from '@/api/settings/ApiService'
2
- import { InstrumentHistoryResponse } from '@/api/types/Api_Instruments'
2
+ import { Api_instruments_HistoryResponse } from '@/api/types/Api_Instruments'
3
3
 
4
4
  class InstrumentsService extends ApiService {
5
- public async fetchUserInstrumentsHistory(id: string, page: number): Promise<InstrumentHistoryResponse> {
5
+ public async fetchUserInstrumentsHistory(id: string, page: number): Promise<Api_instruments_HistoryResponse> {
6
6
  const params = {
7
7
  status: 'issued',
8
8
  page,
@@ -1,4 +1,4 @@
1
- type InstrumentStorage = {
1
+ export type Api_Instrument_Storage = {
2
2
  id: string
3
3
  created_at: string
4
4
  deleted_at: string | null
@@ -11,7 +11,7 @@ type InstrumentStorage = {
11
11
  state_id: unknown | null
12
12
  }
13
13
 
14
- type InstrumentType = {
14
+ export type Api_Instrument_Type = {
15
15
  id: string
16
16
  name: string
17
17
  created_at: string
@@ -19,10 +19,10 @@ type InstrumentType = {
19
19
  deleted_at: string | null
20
20
  icon: string
21
21
  storage_id: string
22
- storage: InstrumentStorage
22
+ storage: Api_Instrument_Storage
23
23
  }
24
24
 
25
- type InstrumentLocation = {
25
+ export type Api_Instrument_Location = {
26
26
  id: string
27
27
  name: string
28
28
  title: string
@@ -33,7 +33,7 @@ type InstrumentLocation = {
33
33
  state_id: unknown | null
34
34
  }
35
35
 
36
- type UserTeam = {
36
+ export type Api_User_Team = {
37
37
  id: string
38
38
  name: string
39
39
  display_name: string
@@ -46,7 +46,7 @@ type UserTeam = {
46
46
  }
47
47
  }
48
48
 
49
- type InstrumentStatus = {
49
+ export type Api_Instrument_Status = {
50
50
  id: string
51
51
  description: string
52
52
  name: string
@@ -56,7 +56,7 @@ type InstrumentStatus = {
56
56
  deleted_at: string | null
57
57
  }
58
58
 
59
- type InstrumentResponsible = {
59
+ export type Api_User = {
60
60
  id: string
61
61
  RFID: string
62
62
  avatar: unknown | null
@@ -77,10 +77,10 @@ type InstrumentResponsible = {
77
77
  personnel_number: number
78
78
  phone: string
79
79
  profession: string
80
- teams: UserTeam[]
80
+ teams: Api_User_Team[]
81
81
  }
82
82
 
83
- type Instrument = {
83
+ export type Api_Instrument = {
84
84
  id: string
85
85
  RFID: string | null
86
86
  instrument_id: string
@@ -90,11 +90,11 @@ type Instrument = {
90
90
  updated_at: string
91
91
  deleted_at: string | null
92
92
  inventory_number: string
93
- instrument_type: InstrumentType
93
+ instrument_type: Api_Instrument_Type
94
94
  invoice_ref_key: string
95
95
  last_status_updated_at: string
96
96
  location_id: string
97
- location: InstrumentLocation
97
+ location: Api_Instrument_Location
98
98
  misplacement: boolean
99
99
  module: string | null
100
100
  module_id: string | null
@@ -102,18 +102,18 @@ type Instrument = {
102
102
  pressure: unknown | null
103
103
  registry_module_id: string
104
104
  responsible_id: string
105
- responsible: InstrumentResponsible
106
- status: InstrumentStatus
105
+ responsible: Api_User
106
+ status: Api_Instrument_Status
107
107
  status_id: string
108
- storage: InstrumentStorage
108
+ storage: Api_Instrument_Storage
109
109
  supervisor: unknown | null
110
110
  supervisor_id: string
111
111
  type: unknown | null
112
112
  weight: unknown | null
113
113
  }
114
114
 
115
- export type InstrumentHistoryResponse = {
116
- data: Instrument[]
115
+ export type Api_instruments_HistoryResponse = {
116
+ data: Api_Instrument[]
117
117
  from: number
118
118
  to: number
119
119
  total: number