mg-ocr-invoice 0.4.18 → 0.4.19-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +4 -4
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2171,7 +2171,7 @@ instance.interceptors.response.use(
|
|
|
2171
2171
|
}
|
|
2172
2172
|
);
|
|
2173
2173
|
const getToken = () => api.get("token"), __uploadInvoice = (n, o) => instance({
|
|
2174
|
-
url: "/invoice/upload",
|
|
2174
|
+
url: "/invoice/upload/baiwang",
|
|
2175
2175
|
method: "post",
|
|
2176
2176
|
data: n,
|
|
2177
2177
|
headers: {
|
|
@@ -2179,7 +2179,7 @@ const getToken = () => api.get("token"), __uploadInvoice = (n, o) => instance({
|
|
|
2179
2179
|
"Content-Type": "multipart/form-data"
|
|
2180
2180
|
}
|
|
2181
2181
|
}), __getUploadInvoiceList = (n, o) => instance({
|
|
2182
|
-
url: "/invoice/listUpload",
|
|
2182
|
+
url: "/invoice/listUpload/baiwang",
|
|
2183
2183
|
method: "post",
|
|
2184
2184
|
data: n,
|
|
2185
2185
|
headers: {
|
|
@@ -2187,7 +2187,7 @@ const getToken = () => api.get("token"), __uploadInvoice = (n, o) => instance({
|
|
|
2187
2187
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
2188
2188
|
}
|
|
2189
2189
|
}), __deleteInvoice = (n, o) => instance({
|
|
2190
|
-
url: "/invoice/delete",
|
|
2190
|
+
url: "/invoice/delete/baiwang",
|
|
2191
2191
|
method: "post",
|
|
2192
2192
|
data: n,
|
|
2193
2193
|
headers: {
|
|
@@ -2195,7 +2195,7 @@ const getToken = () => api.get("token"), __uploadInvoice = (n, o) => instance({
|
|
|
2195
2195
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
2196
2196
|
}
|
|
2197
2197
|
}), __ReCheckInvoice = (n, o) => instance({
|
|
2198
|
-
url: "/invoice/changeAndcheckReal",
|
|
2198
|
+
url: "/invoice/changeAndcheckReal/baiwang",
|
|
2199
2199
|
method: "post",
|
|
2200
2200
|
data: n,
|
|
2201
2201
|
headers: {
|
package/dist/index.umd.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...t){const r=new this(o);return t.forEach(c=>r.set(c)),r}static accessor(o){const r=(this[$internals]=this[$internals]={accessors:{}}).accessors,c=this.prototype;function u(e){const p=normalizeHeader(e);r[p]||(buildAccessors(c,e),r[p]=!0)}return utils$1.isArray(o)?o.forEach(u):u(o),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:n},o)=>{let t=o[0].toUpperCase()+o.slice(1);return{get:()=>n,set(r){this[t]=r}}}),utils$1.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(n,o){const t=this||defaults$1,r=o||t,c=AxiosHeaders$1.from(r.headers);let u=r.data;return utils$1.forEach(n,function(p){u=p.call(t,u,c.normalize(),o?o.status:void 0)}),c.normalize(),u}function isCancel(n){return!!(n&&n.__CANCEL__)}function CanceledError(n,o,t){AxiosError.call(this,n??"canceled",AxiosError.ERR_CANCELED,o,t),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(n,o,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):o(new AxiosError("Request failed with status code "+t.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function parseProtocol(n){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return o&&o[1]||""}function speedometer(n,o){n=n||10;const t=new Array(n),r=new Array(n);let c=0,u=0,e;return o=o!==void 0?o:1e3,function(y){const _=Date.now(),w=r[u];e||(e=_),t[c]=y,r[c]=_;let x=u,D=0;for(;x!==c;)D+=t[x++],x=x%n;if(c=(c+1)%n,c===u&&(u=(u+1)%n),_-e<o)return;const B=w&&_-w;return B?Math.round(D*1e3/B):void 0}}function throttle(n,o){let t=0;const r=1e3/o;let c=null;return function(){const e=this===!0,p=Date.now();if(e||p-t>r)return c&&(clearTimeout(c),c=null),t=p,n.apply(null,arguments);c||(c=setTimeout(()=>(c=null,t=Date.now(),n.apply(null,arguments)),r-(p-t)))}}const progressEventReducer=(n,o,t=3)=>{let r=0;const c=speedometer(50,250);return throttle(u=>{const e=u.loaded,p=u.lengthComputable?u.total:void 0,y=e-r,_=c(y),w=e<=p;r=e;const x={loaded:e,total:p,progress:p?e/p:void 0,bytes:y,rate:_||void 0,estimated:_&&p&&w?(p-e)/_:void 0,event:u,lengthComputable:p!=null};x[o?"download":"upload"]=!0,n(x)},t)},isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const o=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function c(u){let e=u;return o&&(t.setAttribute("href",e),e=t.href),t.setAttribute("href",e),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return r=c(window.location.href),function(e){const p=utils$1.isString(e)?c(e):e;return p.protocol===r.protocol&&p.host===r.host}}():function(){return function(){return!0}}(),cookies=platform.hasStandardBrowserEnv?{write(n,o,t,r,c,u){const e=[n+"="+encodeURIComponent(o)];utils$1.isNumber(t)&&e.push("expires="+new Date(t).toGMTString()),utils$1.isString(r)&&e.push("path="+r),utils$1.isString(c)&&e.push("domain="+c),u===!0&&e.push("secure"),document.cookie=e.join("; ")},read(n){const o=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function combineURLs(n,o){return o?n.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):n}function buildFullPath(n,o){return n&&!isAbsoluteURL(o)?combineURLs(n,o):o}const headersToObject=n=>n instanceof AxiosHeaders$1?{...n}:n;function mergeConfig(n,o){o=o||{};const t={};function r(_,w,x){return utils$1.isPlainObject(_)&&utils$1.isPlainObject(w)?utils$1.merge.call({caseless:x},_,w):utils$1.isPlainObject(w)?utils$1.merge({},w):utils$1.isArray(w)?w.slice():w}function c(_,w,x){if(utils$1.isUndefined(w)){if(!utils$1.isUndefined(_))return r(void 0,_,x)}else return r(_,w,x)}function u(_,w){if(!utils$1.isUndefined(w))return r(void 0,w)}function e(_,w){if(utils$1.isUndefined(w)){if(!utils$1.isUndefined(_))return r(void 0,_)}else return r(void 0,w)}function p(_,w,x){if(x in o)return r(_,w);if(x in n)return r(void 0,_)}const y={url:u,method:u,data:u,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:p,headers:(_,w)=>c(headersToObject(_),headersToObject(w),!0)};return utils$1.forEach(Object.keys(Object.assign({},n,o)),function(w){const x=y[w]||c,D=x(n[w],o[w],w);utils$1.isUndefined(D)&&x!==p||(t[w]=D)}),t}const resolveConfig=n=>{const o=mergeConfig({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:c,xsrfCookieName:u,headers:e,auth:p}=o;o.headers=e=AxiosHeaders$1.from(e),o.url=buildURL(buildFullPath(o.baseURL,o.url),n.params,n.paramsSerializer),p&&e.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):"")));let y;if(utils$1.isFormData(t)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)e.setContentType(void 0);else if((y=e.getContentType())!==!1){const[_,...w]=y?y.split(";").map(x=>x.trim()).filter(Boolean):[];e.setContentType([_||"multipart/form-data",...w].join("; "))}}if(platform.hasStandardBrowserEnv&&(r&&utils$1.isFunction(r)&&(r=r(o)),r||r!==!1&&isURLSameOrigin(o.url))){const _=c&&u&&cookies.read(u);_&&e.set(c,_)}return o},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(n){return new Promise(function(t,r){const c=resolveConfig(n);let u=c.data;const e=AxiosHeaders$1.from(c.headers).normalize();let{responseType:p}=c,y;function _(){c.cancelToken&&c.cancelToken.unsubscribe(y),c.signal&&c.signal.removeEventListener("abort",y)}let w=new XMLHttpRequest;w.open(c.method.toUpperCase(),c.url,!0),w.timeout=c.timeout;function x(){if(!w)return;const B=AxiosHeaders$1.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),U={data:!p||p==="text"||p==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:B,config:n,request:w};settle(function(J){t(J),_()},function(J){r(J),_()},U),w=null}"onloadend"in w?w.onloadend=x:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(x)},w.onabort=function(){w&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,c,w)),w=null)},w.onerror=function(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,c,w)),w=null},w.ontimeout=function(){let A=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded";const U=c.transitional||transitionalDefaults;c.timeoutErrorMessage&&(A=c.timeoutErrorMessage),r(new AxiosError(A,U.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,c,w)),w=null},u===void 0&&e.setContentType(null),"setRequestHeader"in w&&utils$1.forEach(e.toJSON(),function(A,U){w.setRequestHeader(U,A)}),utils$1.isUndefined(c.withCredentials)||(w.withCredentials=!!c.withCredentials),p&&p!=="json"&&(w.responseType=c.responseType),typeof c.onDownloadProgress=="function"&&w.addEventListener("progress",progressEventReducer(c.onDownloadProgress,!0)),typeof c.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",progressEventReducer(c.onUploadProgress)),(c.cancelToken||c.signal)&&(y=B=>{w&&(r(!B||B.type?new CanceledError(null,n,w):B),w.abort(),w=null)},c.cancelToken&&c.cancelToken.subscribe(y),c.signal&&(c.signal.aborted?y():c.signal.addEventListener("abort",y)));const D=parseProtocol(c.url);if(D&&platform.protocols.indexOf(D)===-1){r(new AxiosError("Unsupported protocol "+D+":",AxiosError.ERR_BAD_REQUEST,n));return}w.send(u||null)})},composeSignals=(n,o)=>{let t=new AbortController,r;const c=function(y){if(!r){r=!0,e();const _=y instanceof Error?y:this.reason;t.abort(_ instanceof AxiosError?_:new CanceledError(_ instanceof Error?_.message:_))}};let u=o&&setTimeout(()=>{c(new AxiosError(`timeout ${o} of ms exceeded`,AxiosError.ETIMEDOUT))},o);const e=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(y=>{y&&(y.removeEventListener?y.removeEventListener("abort",c):y.unsubscribe(c))}),n=null)};n.forEach(y=>y&&y.addEventListener&&y.addEventListener("abort",c));const{signal:p}=t;return p.unsubscribe=e,[p,()=>{u&&clearTimeout(u),u=null}]},composeSignals$1=composeSignals,streamChunk=function*(n,o){let t=n.byteLength;if(!o||t<o){yield n;return}let r=0,c;for(;r<t;)c=r+o,yield n.slice(r,c),r=c},readBytes=async function*(n,o,t){for await(const r of n)yield*streamChunk(ArrayBuffer.isView(r)?r:await t(String(r)),o)},trackStream=(n,o,t,r,c)=>{const u=readBytes(n,o,c);let e=0;return new ReadableStream({type:"bytes",async pull(p){const{done:y,value:_}=await u.next();if(y){p.close(),r();return}let w=_.byteLength;t&&t(e+=w),p.enqueue(new Uint8Array(_))},cancel(p){return r(p),u.return()}},{highWaterMark:2})},fetchProgressDecorator=(n,o)=>{const t=n!=null;return r=>setTimeout(()=>o({lengthComputable:t,total:n,loaded:r}))},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(n=>o=>n.encode(o))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),supportsRequestStream=isReadableStreamSupported&&(()=>{let n=!1;const o=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!o})(),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&!!(()=>{try{return utils$1.isReadableStream(new Response("").body)}catch{}})(),resolvers={stream:supportsResponseStream&&(n=>n.body)};isFetchSupported&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!resolvers[o]&&(resolvers[o]=utils$1.isFunction(n[o])?t=>t[o]():(t,r)=>{throw new AxiosError(`Response type '${o}' is not supported`,AxiosError.ERR_NOT_SUPPORT,r)})})})(new Response);const getBodyLength=async n=>{if(n==null)return 0;if(utils$1.isBlob(n))return n.size;if(utils$1.isSpecCompliantForm(n))return(await new Request(n).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(n))return n.byteLength;if(utils$1.isURLSearchParams(n)&&(n=n+""),utils$1.isString(n))return(await encodeText(n)).byteLength},resolveBodyLength=async(n,o)=>{const t=utils$1.toFiniteNumber(n.getContentLength());return t??getBodyLength(o)},fetchAdapter=isFetchSupported&&(async n=>{let{url:o,method:t,data:r,signal:c,cancelToken:u,timeout:e,onDownloadProgress:p,onUploadProgress:y,responseType:_,headers:w,withCredentials:x="same-origin",fetchOptions:D}=resolveConfig(n);_=_?(_+"").toLowerCase():"text";let[B,A]=c||u||e?composeSignals$1([c,u],e):[],U,be;const J=()=>{!U&&setTimeout(()=>{B&&B.unsubscribe()}),U=!0};let K;try{if(y&&supportsRequestStream&&t!=="get"&&t!=="head"&&(K=await resolveBodyLength(w,r))!==0){let we=new Request(o,{method:"POST",body:r,duplex:"half"}),Le;utils$1.isFormData(r)&&(Le=we.headers.get("content-type"))&&w.setContentType(Le),we.body&&(r=trackStream(we.body,DEFAULT_CHUNK_SIZE,fetchProgressDecorator(K,progressEventReducer(y)),null,encodeText))}utils$1.isString(x)||(x=x?"cors":"omit"),be=new Request(o,{...D,signal:B,method:t.toUpperCase(),headers:w.normalize().toJSON(),body:r,duplex:"half",withCredentials:x});let q=await fetch(be);const Oe=supportsResponseStream&&(_==="stream"||_==="response");if(supportsResponseStream&&(p||Oe)){const we={};["status","statusText","headers"].forEach(Fe=>{we[Fe]=q[Fe]});const Le=utils$1.toFiniteNumber(q.headers.get("content-length"));q=new Response(trackStream(q.body,DEFAULT_CHUNK_SIZE,p&&fetchProgressDecorator(Le,progressEventReducer(p,!0)),Oe&&J,encodeText),we)}_=_||"text";let qe=await resolvers[utils$1.findKey(resolvers,_)||"text"](q,n);return!Oe&&J(),A&&A(),await new Promise((we,Le)=>{settle(we,Le,{data:qe,headers:AxiosHeaders$1.from(q.headers),status:q.status,statusText:q.statusText,config:n,request:be})})}catch(q){throw J(),q&&q.name==="TypeError"&&/fetch/i.test(q.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,n,be),{cause:q.cause||q}):AxiosError.from(q,q&&q.code,n,be)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(n,o)=>{if(n){try{Object.defineProperty(n,"name",{value:o})}catch{}Object.defineProperty(n,"adapterName",{value:o})}});const renderReason=n=>`- ${n}`,isResolvedHandle=n=>utils$1.isFunction(n)||n===null||n===!1,adapters={getAdapter:n=>{n=utils$1.isArray(n)?n:[n];const{length:o}=n;let t,r;const c={};for(let u=0;u<o;u++){t=n[u];let e;if(r=t,!isResolvedHandle(t)&&(r=knownAdapters[(e=String(t)).toLowerCase()],r===void 0))throw new AxiosError(`Unknown adapter '${e}'`);if(r)break;c[e||"#"+u]=r}if(!r){const u=Object.entries(c).map(([p,y])=>`adapter ${p} `+(y===!1?"is not supported by the environment":"is not available in the build"));let e=o?u.length>1?`since :
|
|
4
4
|
`+u.map(renderReason).join(`
|
|
5
5
|
`):" "+renderReason(u[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+e,"ERR_NOT_SUPPORT")}return r},adapters:knownAdapters};function throwIfCancellationRequested(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new CanceledError(null,n)}function dispatchRequest(n){return throwIfCancellationRequested(n),n.headers=AxiosHeaders$1.from(n.headers),n.data=transformData.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(n.adapter||defaults$1.adapter)(n).then(function(r){return throwIfCancellationRequested(n),r.data=transformData.call(n,n.transformResponse,r),r.headers=AxiosHeaders$1.from(r.headers),r},function(r){return isCancel(r)||(throwIfCancellationRequested(n),r&&r.response&&(r.response.data=transformData.call(n,n.transformResponse,r.response),r.response.headers=AxiosHeaders$1.from(r.response.headers))),Promise.reject(r)})}const VERSION="1.7.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach((n,o)=>{validators$1[n]=function(r){return typeof r===n||"a"+(o<1?"n ":" ")+n}});const deprecatedWarnings={};validators$1.transitional=function(o,t,r){function c(u,e){return"[Axios v"+VERSION+"] Transitional option '"+u+"'"+e+(r?". "+r:"")}return(u,e,p)=>{if(o===!1)throw new AxiosError(c(e," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!deprecatedWarnings[e]&&(deprecatedWarnings[e]=!0,console.warn(c(e," has been deprecated since v"+t+" and will be removed in the near future"))),o?o(u,e,p):!0}};function assertOptions(n,o,t){if(typeof n!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let c=r.length;for(;c-- >0;){const u=r[c],e=o[u];if(e){const p=n[u],y=p===void 0||e(p,u,n);if(y!==!0)throw new AxiosError("option "+u+" must be "+y,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new AxiosError("Unknown option "+u,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(o){this.defaults=o,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}async request(o,t){try{return await this._request(o,t)}catch(r){if(r instanceof Error){let c;Error.captureStackTrace?Error.captureStackTrace(c={}):c=new Error;const u=c.stack?c.stack.replace(/^.+\n/,""):"";try{r.stack?u&&!String(r.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
-
`+u):r.stack=u}catch{}}throw r}}_request(o,t){typeof o=="string"?(t=t||{},t.url=o):t=o||{},t=mergeConfig(this.defaults,t);const{transitional:r,paramsSerializer:c,headers:u}=t;r!==void 0&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),c!=null&&(utils$1.isFunction(c)?t.paramsSerializer={serialize:c}:validator.assertOptions(c,{encode:validators.function,serialize:validators.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let e=u&&utils$1.merge(u.common,u[t.method]);u&&utils$1.forEach(["delete","get","head","post","put","patch","common"],A=>{delete u[A]}),t.headers=AxiosHeaders$1.concat(e,u);const p=[];let y=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(t)===!1||(y=y&&U.synchronous,p.unshift(U.fulfilled,U.rejected))});const _=[];this.interceptors.response.forEach(function(U){_.push(U.fulfilled,U.rejected)});let w,x=0,D;if(!y){const A=[dispatchRequest.bind(this),void 0];for(A.unshift.apply(A,p),A.push.apply(A,_),D=A.length,w=Promise.resolve(t);x<D;)w=w.then(A[x++],A[x++]);return w}D=p.length;let B=t;for(x=0;x<D;){const A=p[x++],U=p[x++];try{B=A(B)}catch(be){U.call(this,be);break}}try{w=dispatchRequest.call(this,B)}catch(A){return Promise.reject(A)}for(x=0,D=_.length;x<D;)w=w.then(_[x++],_[x++]);return w}getUri(o){o=mergeConfig(this.defaults,o);const t=buildFullPath(o.baseURL,o.url);return buildURL(t,o.params,o.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(o){Axios.prototype[o]=function(t,r){return this.request(mergeConfig(r||{},{method:o,url:t,data:(r||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(o){function t(r){return function(u,e,p){return this.request(mergeConfig(p||{},{method:o,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:e}))}}Axios.prototype[o]=t(),Axios.prototype[o+"Form"]=t(!0)});const Axios$1=Axios;class CancelToken{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(u){t=u});const r=this;this.promise.then(c=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](c);r._listeners=null}),this.promise.then=c=>{let u;const e=new Promise(p=>{r.subscribe(p),u=p}).then(c);return e.cancel=function(){r.unsubscribe(u)},e},o(function(u,e,p){r.reason||(r.reason=new CanceledError(u,e,p),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const t=this._listeners.indexOf(o);t!==-1&&this._listeners.splice(t,1)}static source(){let o;return{token:new CancelToken(function(c){o=c}),cancel:o}}}const CancelToken$1=CancelToken;function spread(n){return function(t){return n.apply(null,t)}}function isAxiosError(n){return utils$1.isObject(n)&&n.isAxiosError===!0}const HttpStatusCode={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(HttpStatusCode).forEach(([n,o])=>{HttpStatusCode[o]=n});const HttpStatusCode$1=HttpStatusCode;function createInstance(n){const o=new Axios$1(n),t=bind(Axios$1.prototype.request,o);return utils$1.extend(t,Axios$1.prototype,o,{allOwnKeys:!0}),utils$1.extend(t,o,null,{allOwnKeys:!0}),t.create=function(c){return createInstance(mergeConfig(n,c))},t}const axios=createInstance(defaults$1);axios.Axios=Axios$1,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(o){return Promise.all(o)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=n=>formDataToJSON(utils$1.isHTMLForm(n)?new FormData(n):n),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const axios$1=axios;/*! js-cookie v3.0.5 | MIT */function assign$1(n){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)n[r]=t[r]}return n}var defaultConverter={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function init(n,o){function t(c,u,e){if(!(typeof document>"u")){e=assign$1({},o,e),typeof e.expires=="number"&&(e.expires=new Date(Date.now()+e.expires*864e5)),e.expires&&(e.expires=e.expires.toUTCString()),c=encodeURIComponent(c).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var p="";for(var y in e)e[y]&&(p+="; "+y,e[y]!==!0&&(p+="="+e[y].split(";")[0]));return document.cookie=c+"="+n.write(u,c)+p}}function r(c){if(!(typeof document>"u"||arguments.length&&!c)){for(var u=document.cookie?document.cookie.split("; "):[],e={},p=0;p<u.length;p++){var y=u[p].split("="),_=y.slice(1).join("=");try{var w=decodeURIComponent(y[0]);if(e[w]=n.read(_,w),c===w)break}catch{}}return c?e[c]:e}}return Object.create({set:t,get:r,remove:function(c,u){t(c,"",assign$1({},u,{expires:-1}))},withAttributes:function(c){return init(this.converter,assign$1({},this.attributes,c))},withConverter:function(c){return init(assign$1({},this.converter,c),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}var api=init(defaultConverter,{path:"/"});const _withScopeId$4=n=>(vue.pushScopeId("data-v-1866d2a2"),n=n(),vue.popScopeId(),n),_hoisted_1$7=_withScopeId$4(()=>vue.createElementVNode("div",{class:"OCR-loading"},null,-1)),_hoisted_2$7={key:0,class:"loading-text"},_hoisted_3$7={class:"loading-text"},_sfc_main$7=vue.defineComponent({__name:"index",setup(n){const o=vue.useAttrs();return(t,r)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["fullscreen-loader",{mask:vue.unref(o).showMask!==!1}]),style:vue.normalizeStyle(vue.unref(o).style)},[_hoisted_1$7,vue.unref(o).loadingText?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$7,vue.toDisplayString(vue.unref(o).loadingText),1)):vue.renderSlot(t.$slots,"loadingText",{key:1},()=>[vue.createElementVNode("div",_hoisted_3$7,vue.toDisplayString(vue.unref(o).loadingText),1)],!0)],6))}}),index_vue_vue_type_style_index_0_scoped_1866d2a2_lang="",Loading=_export_sfc(_sfc_main$7,[["__scopeId","data-v-1866d2a2"]]),_hoisted_1$6={class:"OCR-text-content"},_hoisted_2$6={key:0,class:"OCR-toast-icon"},_hoisted_3$6={class:"OCR-toast-text"},_sfc_main$6=vue.defineComponent({__name:"index",props:{position:{type:String,default(){return"center"}},type:{type:String,default(){return""}},message:{type:String,default(){return""}}},setup(n){const o=vue.useAttrs(),t=n,r=vue.computed(()=>t.type?{success:"gg-check-o",error:"gg-close-o",warning:"gg-close-o",loading:"OCR-loading"}[t.type]:"");return(c,u)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["OCR-toast-container",["OCR-toast-"+t.position]]),style:vue.normalizeStyle(vue.unref(o).style)},[vue.createElementVNode("div",_hoisted_1$6,[t.type?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$6,[vue.createElementVNode("i",{class:vue.normalizeClass([r.value])},null,2)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3$6,vue.toDisplayString(t.message),1)])],6))}}),index_vue_vue_type_style_index_0_scoped_5140fa0b_lang="",Message=_export_sfc(_sfc_main$6,[["__scopeId","data-v-5140fa0b"]]),_hoisted_1$5={class:"dialog-container"},_hoisted_2$5={class:"dialog-header"},_hoisted_3$5={key:0,class:"dialog-title"},_hoisted_4$5={class:"dialog-content"},_hoisted_5$4={key:0},_hoisted_6$4={key:1},_hoisted_7$4={class:"dialog-footer"},_sfc_main$5=vue.defineComponent({__name:"InoviceConfirmDialog",props:{visible:{type:Boolean,default:!1},title:{type:String,default:"提示"},message:{type:[String,Function],default:"确定执行此操作吗?"},confirmText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"},showCancelButton:{type:Boolean,default:!0},showconfirmButton:{type:Boolean,default:!0},type:{type:String,default:"default"},closeOnClickOverlay:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0}},emits:["update:visible","confirm","cancel","close"],setup(n,{emit:o}){const t=n,r=o,c=vue.ref(t.visible),u=vue.computed(()=>({warning:t.type==="warning",danger:t.type==="danger",success:t.type==="success",info:t.type==="info"})),e=vue.ref(),p=vue.computed(()=>typeof t.message=="function"?{type:"function",message:t.message}:{type:"String",message:t.message}),y=()=>{r("confirm"),w()},_=()=>{r("cancel"),w()},w=()=>{c.value=!1,r("update:visible",!1)},x=D=>{t.lockScroll&&(document.body.style.overflow=D?"hidden":"")};return vue.watch(()=>t.visible,D=>{console.log(123)}),vue.onMounted(()=>{t.visible&&(x(!0),p.value.type==="function"&&vue.render(p.value.message(),e.value))}),(D,B)=>(vue.openBlock(),vue.createBlock(vue.Transition,{appear:"",name:"dialog-fade"},{default:vue.withCtx(()=>[c.value?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"dialog-overlay",style:vue.normalizeStyle({zIndex:vue.unref(OCR_getMaxZIndex)()+1})},[vue.createElementVNode("div",_hoisted_1$5,[vue.createElementVNode("div",_hoisted_2$5,[n.title?(vue.openBlock(),vue.createElementBlock("h2",_hoisted_3$5,vue.toDisplayString(t.title),1)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_4$5,[t.message?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$4,[p.value.type==="function"?(vue.openBlock(),vue.createElementBlock("div",{key:0,ref_key:"RefMessage",ref:e},null,512)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$4,vue.toDisplayString(t.message),1))])):vue.renderSlot(D.$slots,"default",{key:1},void 0,!0)]),vue.createElementVNode("div",_hoisted_7$4,[t.showCancelButton?(vue.openBlock(),vue.createElementBlock("button",{key:0,class:"dialog-btn cancel-btn",onClick:_},vue.toDisplayString(n.cancelText),1)):vue.createCommentVNode("",!0),t.showconfirmButton?(vue.openBlock(),vue.createElementBlock("button",{key:1,class:vue.normalizeClass(["dialog-btn confirm-btn",u.value]),onClick:y},vue.toDisplayString(t.confirmText),3)):vue.createCommentVNode("",!0)])])],4)):vue.createCommentVNode("",!0)]),_:3}))}}),InoviceConfirmDialog_vue_vue_type_style_index_0_scoped_c14af1ce_lang="",ConfirmDialog=_export_sfc(_sfc_main$5,[["__scopeId","data-v-c14af1ce"]]);class CreateLoading{constructor(o){Hi(this,"id","");Hi(this,"options",{});Hi(this,"dom",vue.createVNode(Loading));Hi(this,"hide",()=>{var o;(o=document.getElementById(this.id))==null||o.remove()});Hi(this,"show",()=>{if(document.getElementById(this.id))return;const o=document.createElement("div");o.id=this.id,document.body.appendChild(o),vue.render(this.dom,o)});this.options=Object.assign(this.options,o),this.id=getStrID(),this.dom=vue.createVNode(Loading,{...this.options,removeID:this.id,key:this.id,style:{zIndex:OCR_getMaxZIndex()+1}})}}class CreateMessage{constructor(o){Hi(this,"id","");Hi(this,"dom",{});Hi(this,"options",{duration:2e3});Hi(this,"hide",()=>{var o;(o=document.getElementById(this.id))==null||o.remove()});Hi(this,"show",()=>{if(console.log(this),document.querySelector(this.id))return;const o=document.createElement("div");o.id=this.id,document.body.appendChild(o),vue.render(this.dom,o),Number(this.options.duration)>0&&setTimeout(()=>{this.hide()},Number(this.options.duration))});this.options=Object.assign(this.options,o),this.id=getStrID(),this.dom=vue.createVNode(Message,{...this.options,removeID:this.id,key:this.id,style:{zIndex:OCR_getMaxZIndex()+1}})}}const showMessage=(n={})=>{let o=new CreateMessage(n);return o.show(),o},showLoading=(n={})=>{let o=new CreateLoading(n);return o.show(),o};function showConfirmDialog(n){return new Promise((o,t)=>{const{title:r="提示",message:c="确定执行此操作吗?",confirmText:u="确定",cancelText:e="取消",type:p="default",showCancelButton:y=!0,closeOnClickOverlay:_=!0,lockScroll:w=!0,onConfirm:x=()=>{},onCancel:D=()=>{}}=n,B=document.createElement("div");document.body.appendChild(B);const A=vue.ref(!0),U=()=>{A.value=!1,setTimeout(()=>{B&&document.body.removeChild(B)},500)},be=()=>{x(),U(),o(!0)},J=()=>{D(),U(),t(!1)},K=vue.createVNode(ConfirmDialog,{...n,visible:A.value,title:r,message:c,confirmText:u,cancelText:e,type:p,showCancelButton:y,closeOnClickOverlay:_,lockScroll:w,onConfirm:be,onCancel:J,"onUpdate:visible":()=>{}});vue.render(K,B)})}const instance=axios$1.create({baseURL:"https://invoice.imugua.team/",timeout:1e5,headers:{AuthDomain:window.location.host}});instance.interceptors.request.use(n=>(n.baseURL=api.get("OCR_Base_URL"),n.headers.AuthDomain=api.get("OCR_AuthDomain")||n.headers.AuthDomain,n),function(n){return Promise.reject(n)}),instance.interceptors.response.use(n=>{var t;let o=n.data;return o.code!==200||((t=o.data)==null?void 0:t.code)!==200?(showMessage({type:"error",message:o.data.msg}),Promise.reject(n.data.data)):n.data.data},function(n){return Promise.reject(n)});const getToken=()=>api.get("token"),__uploadInvoice=(n,o)=>instance({url:"/invoice/upload",method:"post",data:n,headers:{Authorization:getToken()||o,"Content-Type":"multipart/form-data"}}),__getUploadInvoiceList=(n,o)=>instance({url:"/invoice/listUpload",method:"post",data:n,headers:{Authorization:getToken()||o,"Content-Type":"application/x-www-form-urlencoded"}}),__deleteInvoice=(n,o)=>instance({url:"/invoice/delete",method:"post",data:n,headers:{Authorization:getToken()||o,"Content-Type":"application/x-www-form-urlencoded"}}),__ReCheckInvoice=(n,o)=>instance({url:"/invoice/changeAndcheckReal",method:"post",data:n,headers:{Authorization:getToken()||o}}),const_invoiceStatus={invalid:"异常发票",unused:"未使用",using:"使用中",used:"已使用"},const_realStatus={noNeed:"无需验真",notCheck:"未验真",checked:"验真通过",checkFail:"验真异常"},const_invoiceExceptionInfo={abnormal:"异常发票",invalid:"无效发票"},setClass=n=>{switch(n){case"invalid":return"error";case"unused":return"ok";case"using":return"error";case"used":return"default";case"noNeed":return"ok";case"notCheck":return"warning";case"checked":return"ok";case"checkFail":return"error";case"abnormal":return"error";default:return"ok"}},VerificationOfTruth=n=>{let o={};return n.realStatus==="checked"||n.realStatus==="noNeed"&&!n.manualModify?o.verifyTruth=1:n.manualModify?o.verifyTruth=2:o.verifyTruth=3,n.invoiceStatus==="unused"?o.checkWeight=1:n.invoiceStatus==="invalid"?o.checkWeight=2:o.checkWeight=3,o};function filterNumber(n){return n===""?"":typeof n=="number"&&!isNaN(n)?n:typeof n=="string"&&!isNaN(+n)?+n:0}/*!
|
|
6
|
+
`+u):r.stack=u}catch{}}throw r}}_request(o,t){typeof o=="string"?(t=t||{},t.url=o):t=o||{},t=mergeConfig(this.defaults,t);const{transitional:r,paramsSerializer:c,headers:u}=t;r!==void 0&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),c!=null&&(utils$1.isFunction(c)?t.paramsSerializer={serialize:c}:validator.assertOptions(c,{encode:validators.function,serialize:validators.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let e=u&&utils$1.merge(u.common,u[t.method]);u&&utils$1.forEach(["delete","get","head","post","put","patch","common"],A=>{delete u[A]}),t.headers=AxiosHeaders$1.concat(e,u);const p=[];let y=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(t)===!1||(y=y&&U.synchronous,p.unshift(U.fulfilled,U.rejected))});const _=[];this.interceptors.response.forEach(function(U){_.push(U.fulfilled,U.rejected)});let w,x=0,D;if(!y){const A=[dispatchRequest.bind(this),void 0];for(A.unshift.apply(A,p),A.push.apply(A,_),D=A.length,w=Promise.resolve(t);x<D;)w=w.then(A[x++],A[x++]);return w}D=p.length;let B=t;for(x=0;x<D;){const A=p[x++],U=p[x++];try{B=A(B)}catch(be){U.call(this,be);break}}try{w=dispatchRequest.call(this,B)}catch(A){return Promise.reject(A)}for(x=0,D=_.length;x<D;)w=w.then(_[x++],_[x++]);return w}getUri(o){o=mergeConfig(this.defaults,o);const t=buildFullPath(o.baseURL,o.url);return buildURL(t,o.params,o.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(o){Axios.prototype[o]=function(t,r){return this.request(mergeConfig(r||{},{method:o,url:t,data:(r||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(o){function t(r){return function(u,e,p){return this.request(mergeConfig(p||{},{method:o,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:e}))}}Axios.prototype[o]=t(),Axios.prototype[o+"Form"]=t(!0)});const Axios$1=Axios;class CancelToken{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(u){t=u});const r=this;this.promise.then(c=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](c);r._listeners=null}),this.promise.then=c=>{let u;const e=new Promise(p=>{r.subscribe(p),u=p}).then(c);return e.cancel=function(){r.unsubscribe(u)},e},o(function(u,e,p){r.reason||(r.reason=new CanceledError(u,e,p),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const t=this._listeners.indexOf(o);t!==-1&&this._listeners.splice(t,1)}static source(){let o;return{token:new CancelToken(function(c){o=c}),cancel:o}}}const CancelToken$1=CancelToken;function spread(n){return function(t){return n.apply(null,t)}}function isAxiosError(n){return utils$1.isObject(n)&&n.isAxiosError===!0}const HttpStatusCode={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(HttpStatusCode).forEach(([n,o])=>{HttpStatusCode[o]=n});const HttpStatusCode$1=HttpStatusCode;function createInstance(n){const o=new Axios$1(n),t=bind(Axios$1.prototype.request,o);return utils$1.extend(t,Axios$1.prototype,o,{allOwnKeys:!0}),utils$1.extend(t,o,null,{allOwnKeys:!0}),t.create=function(c){return createInstance(mergeConfig(n,c))},t}const axios=createInstance(defaults$1);axios.Axios=Axios$1,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(o){return Promise.all(o)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=n=>formDataToJSON(utils$1.isHTMLForm(n)?new FormData(n):n),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const axios$1=axios;/*! js-cookie v3.0.5 | MIT */function assign$1(n){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)n[r]=t[r]}return n}var defaultConverter={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function init(n,o){function t(c,u,e){if(!(typeof document>"u")){e=assign$1({},o,e),typeof e.expires=="number"&&(e.expires=new Date(Date.now()+e.expires*864e5)),e.expires&&(e.expires=e.expires.toUTCString()),c=encodeURIComponent(c).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var p="";for(var y in e)e[y]&&(p+="; "+y,e[y]!==!0&&(p+="="+e[y].split(";")[0]));return document.cookie=c+"="+n.write(u,c)+p}}function r(c){if(!(typeof document>"u"||arguments.length&&!c)){for(var u=document.cookie?document.cookie.split("; "):[],e={},p=0;p<u.length;p++){var y=u[p].split("="),_=y.slice(1).join("=");try{var w=decodeURIComponent(y[0]);if(e[w]=n.read(_,w),c===w)break}catch{}}return c?e[c]:e}}return Object.create({set:t,get:r,remove:function(c,u){t(c,"",assign$1({},u,{expires:-1}))},withAttributes:function(c){return init(this.converter,assign$1({},this.attributes,c))},withConverter:function(c){return init(assign$1({},this.converter,c),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}var api=init(defaultConverter,{path:"/"});const _withScopeId$4=n=>(vue.pushScopeId("data-v-1866d2a2"),n=n(),vue.popScopeId(),n),_hoisted_1$7=_withScopeId$4(()=>vue.createElementVNode("div",{class:"OCR-loading"},null,-1)),_hoisted_2$7={key:0,class:"loading-text"},_hoisted_3$7={class:"loading-text"},_sfc_main$7=vue.defineComponent({__name:"index",setup(n){const o=vue.useAttrs();return(t,r)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["fullscreen-loader",{mask:vue.unref(o).showMask!==!1}]),style:vue.normalizeStyle(vue.unref(o).style)},[_hoisted_1$7,vue.unref(o).loadingText?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$7,vue.toDisplayString(vue.unref(o).loadingText),1)):vue.renderSlot(t.$slots,"loadingText",{key:1},()=>[vue.createElementVNode("div",_hoisted_3$7,vue.toDisplayString(vue.unref(o).loadingText),1)],!0)],6))}}),index_vue_vue_type_style_index_0_scoped_1866d2a2_lang="",Loading=_export_sfc(_sfc_main$7,[["__scopeId","data-v-1866d2a2"]]),_hoisted_1$6={class:"OCR-text-content"},_hoisted_2$6={key:0,class:"OCR-toast-icon"},_hoisted_3$6={class:"OCR-toast-text"},_sfc_main$6=vue.defineComponent({__name:"index",props:{position:{type:String,default(){return"center"}},type:{type:String,default(){return""}},message:{type:String,default(){return""}}},setup(n){const o=vue.useAttrs(),t=n,r=vue.computed(()=>t.type?{success:"gg-check-o",error:"gg-close-o",warning:"gg-close-o",loading:"OCR-loading"}[t.type]:"");return(c,u)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["OCR-toast-container",["OCR-toast-"+t.position]]),style:vue.normalizeStyle(vue.unref(o).style)},[vue.createElementVNode("div",_hoisted_1$6,[t.type?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$6,[vue.createElementVNode("i",{class:vue.normalizeClass([r.value])},null,2)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3$6,vue.toDisplayString(t.message),1)])],6))}}),index_vue_vue_type_style_index_0_scoped_5140fa0b_lang="",Message=_export_sfc(_sfc_main$6,[["__scopeId","data-v-5140fa0b"]]),_hoisted_1$5={class:"dialog-container"},_hoisted_2$5={class:"dialog-header"},_hoisted_3$5={key:0,class:"dialog-title"},_hoisted_4$5={class:"dialog-content"},_hoisted_5$4={key:0},_hoisted_6$4={key:1},_hoisted_7$4={class:"dialog-footer"},_sfc_main$5=vue.defineComponent({__name:"InoviceConfirmDialog",props:{visible:{type:Boolean,default:!1},title:{type:String,default:"提示"},message:{type:[String,Function],default:"确定执行此操作吗?"},confirmText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"},showCancelButton:{type:Boolean,default:!0},showconfirmButton:{type:Boolean,default:!0},type:{type:String,default:"default"},closeOnClickOverlay:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0}},emits:["update:visible","confirm","cancel","close"],setup(n,{emit:o}){const t=n,r=o,c=vue.ref(t.visible),u=vue.computed(()=>({warning:t.type==="warning",danger:t.type==="danger",success:t.type==="success",info:t.type==="info"})),e=vue.ref(),p=vue.computed(()=>typeof t.message=="function"?{type:"function",message:t.message}:{type:"String",message:t.message}),y=()=>{r("confirm"),w()},_=()=>{r("cancel"),w()},w=()=>{c.value=!1,r("update:visible",!1)},x=D=>{t.lockScroll&&(document.body.style.overflow=D?"hidden":"")};return vue.watch(()=>t.visible,D=>{console.log(123)}),vue.onMounted(()=>{t.visible&&(x(!0),p.value.type==="function"&&vue.render(p.value.message(),e.value))}),(D,B)=>(vue.openBlock(),vue.createBlock(vue.Transition,{appear:"",name:"dialog-fade"},{default:vue.withCtx(()=>[c.value?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"dialog-overlay",style:vue.normalizeStyle({zIndex:vue.unref(OCR_getMaxZIndex)()+1})},[vue.createElementVNode("div",_hoisted_1$5,[vue.createElementVNode("div",_hoisted_2$5,[n.title?(vue.openBlock(),vue.createElementBlock("h2",_hoisted_3$5,vue.toDisplayString(t.title),1)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_4$5,[t.message?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$4,[p.value.type==="function"?(vue.openBlock(),vue.createElementBlock("div",{key:0,ref_key:"RefMessage",ref:e},null,512)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$4,vue.toDisplayString(t.message),1))])):vue.renderSlot(D.$slots,"default",{key:1},void 0,!0)]),vue.createElementVNode("div",_hoisted_7$4,[t.showCancelButton?(vue.openBlock(),vue.createElementBlock("button",{key:0,class:"dialog-btn cancel-btn",onClick:_},vue.toDisplayString(n.cancelText),1)):vue.createCommentVNode("",!0),t.showconfirmButton?(vue.openBlock(),vue.createElementBlock("button",{key:1,class:vue.normalizeClass(["dialog-btn confirm-btn",u.value]),onClick:y},vue.toDisplayString(t.confirmText),3)):vue.createCommentVNode("",!0)])])],4)):vue.createCommentVNode("",!0)]),_:3}))}}),InoviceConfirmDialog_vue_vue_type_style_index_0_scoped_c14af1ce_lang="",ConfirmDialog=_export_sfc(_sfc_main$5,[["__scopeId","data-v-c14af1ce"]]);class CreateLoading{constructor(o){Hi(this,"id","");Hi(this,"options",{});Hi(this,"dom",vue.createVNode(Loading));Hi(this,"hide",()=>{var o;(o=document.getElementById(this.id))==null||o.remove()});Hi(this,"show",()=>{if(document.getElementById(this.id))return;const o=document.createElement("div");o.id=this.id,document.body.appendChild(o),vue.render(this.dom,o)});this.options=Object.assign(this.options,o),this.id=getStrID(),this.dom=vue.createVNode(Loading,{...this.options,removeID:this.id,key:this.id,style:{zIndex:OCR_getMaxZIndex()+1}})}}class CreateMessage{constructor(o){Hi(this,"id","");Hi(this,"dom",{});Hi(this,"options",{duration:2e3});Hi(this,"hide",()=>{var o;(o=document.getElementById(this.id))==null||o.remove()});Hi(this,"show",()=>{if(console.log(this),document.querySelector(this.id))return;const o=document.createElement("div");o.id=this.id,document.body.appendChild(o),vue.render(this.dom,o),Number(this.options.duration)>0&&setTimeout(()=>{this.hide()},Number(this.options.duration))});this.options=Object.assign(this.options,o),this.id=getStrID(),this.dom=vue.createVNode(Message,{...this.options,removeID:this.id,key:this.id,style:{zIndex:OCR_getMaxZIndex()+1}})}}const showMessage=(n={})=>{let o=new CreateMessage(n);return o.show(),o},showLoading=(n={})=>{let o=new CreateLoading(n);return o.show(),o};function showConfirmDialog(n){return new Promise((o,t)=>{const{title:r="提示",message:c="确定执行此操作吗?",confirmText:u="确定",cancelText:e="取消",type:p="default",showCancelButton:y=!0,closeOnClickOverlay:_=!0,lockScroll:w=!0,onConfirm:x=()=>{},onCancel:D=()=>{}}=n,B=document.createElement("div");document.body.appendChild(B);const A=vue.ref(!0),U=()=>{A.value=!1,setTimeout(()=>{B&&document.body.removeChild(B)},500)},be=()=>{x(),U(),o(!0)},J=()=>{D(),U(),t(!1)},K=vue.createVNode(ConfirmDialog,{...n,visible:A.value,title:r,message:c,confirmText:u,cancelText:e,type:p,showCancelButton:y,closeOnClickOverlay:_,lockScroll:w,onConfirm:be,onCancel:J,"onUpdate:visible":()=>{}});vue.render(K,B)})}const instance=axios$1.create({baseURL:"https://invoice.imugua.team/",timeout:1e5,headers:{AuthDomain:window.location.host}});instance.interceptors.request.use(n=>(n.baseURL=api.get("OCR_Base_URL"),n.headers.AuthDomain=api.get("OCR_AuthDomain")||n.headers.AuthDomain,n),function(n){return Promise.reject(n)}),instance.interceptors.response.use(n=>{var t;let o=n.data;return o.code!==200||((t=o.data)==null?void 0:t.code)!==200?(showMessage({type:"error",message:o.data.msg}),Promise.reject(n.data.data)):n.data.data},function(n){return Promise.reject(n)});const getToken=()=>api.get("token"),__uploadInvoice=(n,o)=>instance({url:"/invoice/upload/baiwang",method:"post",data:n,headers:{Authorization:getToken()||o,"Content-Type":"multipart/form-data"}}),__getUploadInvoiceList=(n,o)=>instance({url:"/invoice/listUpload/baiwang",method:"post",data:n,headers:{Authorization:getToken()||o,"Content-Type":"application/x-www-form-urlencoded"}}),__deleteInvoice=(n,o)=>instance({url:"/invoice/delete/baiwang",method:"post",data:n,headers:{Authorization:getToken()||o,"Content-Type":"application/x-www-form-urlencoded"}}),__ReCheckInvoice=(n,o)=>instance({url:"/invoice/changeAndcheckReal/baiwang",method:"post",data:n,headers:{Authorization:getToken()||o}}),const_invoiceStatus={invalid:"异常发票",unused:"未使用",using:"使用中",used:"已使用"},const_realStatus={noNeed:"无需验真",notCheck:"未验真",checked:"验真通过",checkFail:"验真异常"},const_invoiceExceptionInfo={abnormal:"异常发票",invalid:"无效发票"},setClass=n=>{switch(n){case"invalid":return"error";case"unused":return"ok";case"using":return"error";case"used":return"default";case"noNeed":return"ok";case"notCheck":return"warning";case"checked":return"ok";case"checkFail":return"error";case"abnormal":return"error";default:return"ok"}},VerificationOfTruth=n=>{let o={};return n.realStatus==="checked"||n.realStatus==="noNeed"&&!n.manualModify?o.verifyTruth=1:n.manualModify?o.verifyTruth=2:o.verifyTruth=3,n.invoiceStatus==="unused"?o.checkWeight=1:n.invoiceStatus==="invalid"?o.checkWeight=2:o.checkWeight=3,o};function filterNumber(n){return n===""?"":typeof n=="number"&&!isNaN(n)?n:typeof n=="string"&&!isNaN(+n)?+n:0}/*!
|
|
7
7
|
* decimal.js v10.4.3
|
|
8
8
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
9
9
|
* https://github.com/MikeMcl/decimal.js
|