39 lines
778 KiB
JavaScript
39 lines
778 KiB
JavaScript
if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then(n=>t.resolve(e()).then(()=>n),n=>t.resolve(e()).then(()=>{throw n}))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e,t){"use strict";var n,o,a,r,i,s,l,c,u,d,m,p;const f=e=>uni.getStorageSync(e),h=(e,t)=>{uni.setStorageSync(e,t)},v=e=>{e?uni.removeStorageSync(e):uni.clearStorageSync()},g={setAllStoreInfo(e,t){e.allStoreInfo=t,h("storeName",t.name),h("lat",t.lat),h("lng",t.lng)},setImOnlineStatus(e,t){e.imOnlineStatus=t},setVendorStoreIDS(e,t){e.vendorStoreIDS=t},setPlatformInfo(e,t){e.platformInfo=t},setCreateStoreTimer(e,t){e.createStoreTimer=t},setStoreStatus(e,t){e.storeStatus=t},jxLoadingFn(e,t){e.jxLoading=t},setSkipLost(e,t){e.isSkiplogin=t},setIsConnectPrinter(e,t){e.isConnectPrinter=t},setIsNewMessage(e,t){e.isNewMessage=t},setImMessage(e,t){e.imMessage=t}};function y(e){return weex.requireModule(e)}function k(e,t,...n){uni.__log__?uni.__log__(e,t,...n):console[e].apply(console,[...n,t])}function w(e,t){return"string"==typeof e?t:e}const b=t=>(n,o=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,n,o)},x=b("onShow"),S=b("onHide"),N=b("onLaunch"),C=b("onLoad"),_=b("onUnload"),E=b("onPullDownRefresh");let I="";k("log","at api/config.ts:21","~生产环境~"),I="https://wx.jxc4.com";const D="https://wx.jxc4.com",V=(e="默认内容",t=3,n=2e3)=>{let o;switch(t){case 1:o="success";break;case 2:o="error";break;case 3:o="none"}"none"==o?uni.showToast({title:e,icon:o,duration:n}):"error"==o?uni.showToast({title:e,image:"/static/image/global/error.png",duration:n}):uni.showToast({title:e,icon:"success",duration:n})};var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function P(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n}var A={exports:{}},O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,62,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,63,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];const M={getRandomValues(e){if(!(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8ClampedArray))throw new Error("Expected an integer array");if(e.byteLength>65536)throw new Error("Can only request a maximum of 65536 bytes");return function(e,t){for(var n,o=e.length,a="="===e[o-2]?2:"="===e[o-1]?1:0,r=0,i=o-a&4294967292,s=0;s<i;s+=4)n=O[e.charCodeAt(s)]<<18|O[e.charCodeAt(s+1)]<<12|O[e.charCodeAt(s+2)]<<6|O[e.charCodeAt(s+3)],t[r++]=n>>16&255,t[r++]=n>>8&255,t[r++]=255&n;1===a&&(n=O[e.charCodeAt(s)]<<10|O[e.charCodeAt(s+1)]<<4|O[e.charCodeAt(s+2)]>>2,t[r++]=n>>8&255,t[r++]=255&n),2===a&&(n=O[e.charCodeAt(s)]<<2|O[e.charCodeAt(s+1)]>>4,t[r++]=255&n)}(y("DCloud-Crypto").getRandomValues(e.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e}};var L={exports:{}};const j=P(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var F;function U(){return F||(F=1,L.exports=(e=e||function(e,t){var n;if("undefined"!=typeof window&&M&&(n=M),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==B&&B.crypto&&(n=B.crypto),!n)try{n=j}catch(h){}var o=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(h){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(h){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},s=i.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=i.WordArray=s.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,o=this.sigBytes,a=e.sigBytes;if(this.clamp(),o%4)for(var r=0;r<a;r++){var i=n[r>>>2]>>>24-r%4*8&255;t[o+r>>>2]|=i<<24-(o+r)%4*8}else for(var s=0;s<a;s+=4)t[o+s>>>2]=n[s>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new l.init(t,e)}}),c=r.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],a=0;a<n;a++){var r=t[a>>>2]>>>24-a%4*8&255;o.push((r>>>4).toString(16)),o.push((15&r).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o+=2)n[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new l.init(n,t/2)}},d=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],a=0;a<n;a++){var r=t[a>>>2]>>>24-a%4*8&255;o.push(String.fromCharCode(r))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new l.init(n,t)}},m=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(ts){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=i.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=m.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,o=this._data,a=o.words,r=o.sigBytes,i=this.blockSize,s=r/(4*i),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,u=e.min(4*c,r);if(c){for(var d=0;d<c;d+=i)this._doProcessBlock(a,d);n=a.splice(0,c),o.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}});var f=r.algo={};return r}(Math),e)),L.exports;var e}var $,R={exports:{}};function z(){return $||($=1,R.exports=(i=U(),n=(t=i).lib,o=n.Base,a=n.WordArray,(r=t.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),r.WordArray=o.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:8*t.length},toX32:function(){for(var e=this.words,t=e.length,n=[],o=0;o<t;o++){var r=e[o];n.push(r.high),n.push(r.low)}return a.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,a=0;a<n;a++)t[a]=t[a].clone();return e}}),i)),R.exports;var e,t,n,o,a,r,i}var H,q={exports:{}};function G(){return H||(H=1,q.exports=(e=U(),function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,n=t.init,o=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,o=[],a=0;a<t;a++)o[a>>>2]|=e[a]<<24-a%4*8;n.call(this,o,t)}else n.apply(this,arguments)};o.prototype=t}}(),e.lib.WordArray)),q.exports;var e}var W,J={exports:{}};function X(){return W||(W=1,J.exports=(e=U(),function(){var t=e,n=t.lib.WordArray,o=t.enc;function a(e){return e<<8&4278255360|e>>>8&16711935}o.Utf16=o.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],a=0;a<n;a+=2){var r=t[a>>>2]>>>16-a%4*8&65535;o.push(String.fromCharCode(r))}return o.join("")},parse:function(e){for(var t=e.length,o=[],a=0;a<t;a++)o[a>>>1]|=e.charCodeAt(a)<<16-a%2*16;return n.create(o,2*t)}},o.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r+=2){var i=a(t[r>>>2]>>>16-r%4*8&65535);o.push(String.fromCharCode(i))}return o.join("")},parse:function(e){for(var t=e.length,o=[],r=0;r<t;r++)o[r>>>1]|=a(e.charCodeAt(r)<<16-r%2*16);return n.create(o,2*t)}}}(),e.enc.Utf16)),J.exports;var e}var K,Y={exports:{}};function Z(){return K||(K=1,Y.exports=(e=U(),function(){var t=e,n=t.lib.WordArray;function o(e,t,o){for(var a=[],r=0,i=0;i<t;i++)if(i%4){var s=o[e.charCodeAt(i-1)]<<i%4*2|o[e.charCodeAt(i)]>>>6-i%4*2;a[r>>>2]|=s<<24-r%4*8,r++}return n.create(a,r)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,o=this._map;e.clamp();for(var a=[],r=0;r<n;r+=3)for(var i=(t[r>>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s<n;s++)a.push(o.charAt(i>>>6*(3-s)&63));var l=o.charAt(64);if(l)for(;a.length%4;)a.push(l);return a.join("")},parse:function(e){var t=e.length,n=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var r=0;r<n.length;r++)a[n.charCodeAt(r)]=r}var i=n.charAt(64);if(i){var s=e.indexOf(i);-1!==s&&(t=s)}return o(e,t,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),Y.exports;var e}var Q,ee={exports:{}};function te(){return Q||(Q=1,ee.exports=(e=U(),function(){var t=e,n=t.lib.WordArray;function o(e,t,o){for(var a=[],r=0,i=0;i<t;i++)if(i%4){var s=o[e.charCodeAt(i-1)]<<i%4*2|o[e.charCodeAt(i)]>>>6-i%4*2;a[r>>>2]|=s<<24-r%4*8,r++}return n.create(a,r)}t.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var n=e.words,o=e.sigBytes,a=t?this._safe_map:this._map;e.clamp();for(var r=[],i=0;i<o;i+=3)for(var s=(n[i>>>2]>>>24-i%4*8&255)<<16|(n[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|n[i+2>>>2]>>>24-(i+2)%4*8&255,l=0;l<4&&i+.75*l<o;l++)r.push(a.charAt(s>>>6*(3-l)&63));var c=a.charAt(64);if(c)for(;r.length%4;)r.push(c);return r.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,a=t?this._safe_map:this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i<a.length;i++)r[a.charCodeAt(i)]=i}var s=a.charAt(64);if(s){var l=e.indexOf(s);-1!==l&&(n=l)}return o(e,n,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),e.enc.Base64url)),ee.exports;var e}var ne,oe={exports:{}};function ae(){return ne||(ne=1,oe.exports=(e=U(),function(t){var n=e,o=n.lib,a=o.WordArray,r=o.Hasher,i=n.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=i.MD5=r.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var o=t+n,a=e[o];e[o]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var r=this._hash.words,i=e[t+0],l=e[t+1],p=e[t+2],f=e[t+3],h=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],k=e[t+8],w=e[t+9],b=e[t+10],x=e[t+11],S=e[t+12],N=e[t+13],C=e[t+14],_=e[t+15],E=r[0],I=r[1],D=r[2],V=r[3];E=c(E,I,D,V,i,7,s[0]),V=c(V,E,I,D,l,12,s[1]),D=c(D,V,E,I,p,17,s[2]),I=c(I,D,V,E,f,22,s[3]),E=c(E,I,D,V,h,7,s[4]),V=c(V,E,I,D,v,12,s[5]),D=c(D,V,E,I,g,17,s[6]),I=c(I,D,V,E,y,22,s[7]),E=c(E,I,D,V,k,7,s[8]),V=c(V,E,I,D,w,12,s[9]),D=c(D,V,E,I,b,17,s[10]),I=c(I,D,V,E,x,22,s[11]),E=c(E,I,D,V,S,7,s[12]),V=c(V,E,I,D,N,12,s[13]),D=c(D,V,E,I,C,17,s[14]),E=u(E,I=c(I,D,V,E,_,22,s[15]),D,V,l,5,s[16]),V=u(V,E,I,D,g,9,s[17]),D=u(D,V,E,I,x,14,s[18]),I=u(I,D,V,E,i,20,s[19]),E=u(E,I,D,V,v,5,s[20]),V=u(V,E,I,D,b,9,s[21]),D=u(D,V,E,I,_,14,s[22]),I=u(I,D,V,E,h,20,s[23]),E=u(E,I,D,V,w,5,s[24]),V=u(V,E,I,D,C,9,s[25]),D=u(D,V,E,I,f,14,s[26]),I=u(I,D,V,E,k,20,s[27]),E=u(E,I,D,V,N,5,s[28]),V=u(V,E,I,D,p,9,s[29]),D=u(D,V,E,I,y,14,s[30]),E=d(E,I=u(I,D,V,E,S,20,s[31]),D,V,v,4,s[32]),V=d(V,E,I,D,k,11,s[33]),D=d(D,V,E,I,x,16,s[34]),I=d(I,D,V,E,C,23,s[35]),E=d(E,I,D,V,l,4,s[36]),V=d(V,E,I,D,h,11,s[37]),D=d(D,V,E,I,y,16,s[38]),I=d(I,D,V,E,b,23,s[39]),E=d(E,I,D,V,N,4,s[40]),V=d(V,E,I,D,i,11,s[41]),D=d(D,V,E,I,f,16,s[42]),I=d(I,D,V,E,g,23,s[43]),E=d(E,I,D,V,w,4,s[44]),V=d(V,E,I,D,S,11,s[45]),D=d(D,V,E,I,_,16,s[46]),E=m(E,I=d(I,D,V,E,p,23,s[47]),D,V,i,6,s[48]),V=m(V,E,I,D,y,10,s[49]),D=m(D,V,E,I,C,15,s[50]),I=m(I,D,V,E,v,21,s[51]),E=m(E,I,D,V,S,6,s[52]),V=m(V,E,I,D,f,10,s[53]),D=m(D,V,E,I,b,15,s[54]),I=m(I,D,V,E,l,21,s[55]),E=m(E,I,D,V,k,6,s[56]),V=m(V,E,I,D,_,10,s[57]),D=m(D,V,E,I,g,15,s[58]),I=m(I,D,V,E,N,21,s[59]),E=m(E,I,D,V,h,6,s[60]),V=m(V,E,I,D,x,10,s[61]),D=m(D,V,E,I,p,15,s[62]),I=m(I,D,V,E,w,21,s[63]),r[0]=r[0]+E|0,r[1]=r[1]+I|0,r[2]=r[2]+D|0,r[3]=r[3]+V|0},_doFinalize:function(){var e=this._data,n=e.words,o=8*this._nDataBytes,a=8*e.sigBytes;n[a>>>5]|=128<<24-a%32;var r=t.floor(o/4294967296),i=o;n[15+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(a+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,o,a,r,i){var s=e+(t&n|~t&o)+a+i;return(s<<r|s>>>32-r)+t}function u(e,t,n,o,a,r,i){var s=e+(t&o|n&~o)+a+i;return(s<<r|s>>>32-r)+t}function d(e,t,n,o,a,r,i){var s=e+(t^n^o)+a+i;return(s<<r|s>>>32-r)+t}function m(e,t,n,o,a,r,i){var s=e+(n^(t|~o))+a+i;return(s<<r|s>>>32-r)+t}n.MD5=r._createHelper(l),n.HmacMD5=r._createHmacHelper(l)}(Math),e.MD5)),oe.exports;var e}var re,ie={exports:{}};function se(){return re||(re=1,ie.exports=(s=U(),t=(e=s).lib,n=t.WordArray,o=t.Hasher,a=e.algo,r=[],i=a.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],a=n[1],i=n[2],s=n[3],l=n[4],c=0;c<80;c++){if(c<16)r[c]=0|e[t+c];else{var u=r[c-3]^r[c-8]^r[c-14]^r[c-16];r[c]=u<<1|u>>>31}var d=(o<<5|o>>>27)+l+r[c];d+=c<20?1518500249+(a&i|~a&s):c<40?1859775393+(a^i^s):c<60?(a&i|a&s|i&s)-1894007588:(a^i^s)-899497514,l=s,s=i,i=a<<30|a>>>2,a=o,o=d}n[0]=n[0]+o|0,n[1]=n[1]+a|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;return t[o>>>5]|=128<<24-o%32,t[14+(o+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(o+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=o._createHelper(i),e.HmacSHA1=o._createHmacHelper(i),s.SHA1)),ie.exports;var e,t,n,o,a,r,i,s}var le,ce={exports:{}};function ue(){return le||(le=1,ce.exports=(e=U(),function(t){var n=e,o=n.lib,a=o.WordArray,r=o.Hasher,i=n.algo,s=[],l=[];!function(){function e(e){for(var n=t.sqrt(e),o=2;o<=n;o++)if(!(e%o))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var o=2,a=0;a<64;)e(o)&&(a<8&&(s[a]=n(t.pow(o,.5))),l[a]=n(t.pow(o,1/3)),a++),o++}();var c=[],u=i.SHA256=r.extend({_doReset:function(){this._hash=new a.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],a=n[1],r=n[2],i=n[3],s=n[4],u=n[5],d=n[6],m=n[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var f=c[p-15],h=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,v=c[p-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[p]=h+c[p-7]+g+c[p-16]}var y=o&a^o&r^a&r,k=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=m+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&d)+l[p]+c[p];m=d,d=u,u=s,s=i+w|0,i=r,r=a,a=o,o=w+(k+y)|0}n[0]=n[0]+o|0,n[1]=n[1]+a|0,n[2]=n[2]+r|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+m|0},_doFinalize:function(){var e=this._data,n=e.words,o=8*this._nDataBytes,a=8*e.sigBytes;return n[a>>>5]|=128<<24-a%32,n[14+(a+64>>>9<<4)]=t.floor(o/4294967296),n[15+(a+64>>>9<<4)]=o,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=r._createHelper(u),n.HmacSHA256=r._createHmacHelper(u)}(Math),e.SHA256)),ce.exports;var e}var de,me={exports:{}};var pe,fe={exports:{}};function he(){return pe||(pe=1,fe.exports=(e=U(),z(),function(){var t=e,n=t.lib.Hasher,o=t.x64,a=o.Word,r=o.WordArray,i=t.algo;function s(){return a.create.apply(a,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=i.SHA512=n.extend({_doReset:function(){this._hash=new r.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],a=n[1],r=n[2],i=n[3],s=n[4],u=n[5],d=n[6],m=n[7],p=o.high,f=o.low,h=a.high,v=a.low,g=r.high,y=r.low,k=i.high,w=i.low,b=s.high,x=s.low,S=u.high,N=u.low,C=d.high,_=d.low,E=m.high,I=m.low,D=p,V=f,B=h,T=v,P=g,A=y,O=k,M=w,L=b,j=x,F=S,U=N,$=C,R=_,z=E,H=I,q=0;q<80;q++){var G,W,J=c[q];if(q<16)W=J.high=0|e[t+2*q],G=J.low=0|e[t+2*q+1];else{var X=c[q-15],K=X.high,Y=X.low,Z=(K>>>1|Y<<31)^(K>>>8|Y<<24)^K>>>7,Q=(Y>>>1|K<<31)^(Y>>>8|K<<24)^(Y>>>7|K<<25),ee=c[q-2],te=ee.high,ne=ee.low,oe=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ae=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),re=c[q-7],ie=re.high,se=re.low,le=c[q-16],ce=le.high,ue=le.low;W=(W=(W=Z+ie+((G=Q+se)>>>0<Q>>>0?1:0))+oe+((G+=ae)>>>0<ae>>>0?1:0))+ce+((G+=ue)>>>0<ue>>>0?1:0),J.high=W,J.low=G}var de,me=L&F^~L&$,pe=j&U^~j&R,fe=D&B^D&P^B&P,he=V&T^V&A^T&A,ve=(D>>>28|V<<4)^(D<<30|V>>>2)^(D<<25|V>>>7),ge=(V>>>28|D<<4)^(V<<30|D>>>2)^(V<<25|D>>>7),ye=(L>>>14|j<<18)^(L>>>18|j<<14)^(L<<23|j>>>9),ke=(j>>>14|L<<18)^(j>>>18|L<<14)^(j<<23|L>>>9),we=l[q],be=we.high,xe=we.low,Se=z+ye+((de=H+ke)>>>0<H>>>0?1:0),Ne=ge+he;z=$,H=R,$=F,R=U,F=L,U=j,L=O+(Se=(Se=(Se=Se+me+((de+=pe)>>>0<pe>>>0?1:0))+be+((de+=xe)>>>0<xe>>>0?1:0))+W+((de+=G)>>>0<G>>>0?1:0))+((j=M+de|0)>>>0<M>>>0?1:0)|0,O=P,M=A,P=B,A=T,B=D,T=V,D=Se+(ve+fe+(Ne>>>0<ge>>>0?1:0))+((V=de+Ne|0)>>>0<de>>>0?1:0)|0}f=o.low=f+V,o.high=p+D+(f>>>0<V>>>0?1:0),v=a.low=v+T,a.high=h+B+(v>>>0<T>>>0?1:0),y=r.low=y+A,r.high=g+P+(y>>>0<A>>>0?1:0),w=i.low=w+M,i.high=k+O+(w>>>0<M>>>0?1:0),x=s.low=x+j,s.high=b+L+(x>>>0<j>>>0?1:0),N=u.low=N+U,u.high=S+F+(N>>>0<U>>>0?1:0),_=d.low=_+R,d.high=C+$+(_>>>0<R>>>0?1:0),I=m.low=I+H,m.high=E+z+(I>>>0<H>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;return t[o>>>5]|=128<<24-o%32,t[30+(o+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(o+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=n._createHelper(u),t.HmacSHA512=n._createHmacHelper(u)}(),e.SHA512)),fe.exports;var e}var ve,ge={exports:{}};var ye,ke={exports:{}};function we(){return ye||(ye=1,ke.exports=(e=U(),z(),function(t){var n=e,o=n.lib,a=o.WordArray,r=o.Hasher,i=n.x64.Word,s=n.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){l[e+5*t]=(n+1)*(n+2)/2%64;var o=(2*e+3*t)%5;e=t%5,t=o}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var a=1,r=0;r<24;r++){for(var s=0,d=0,m=0;m<7;m++){if(1&a){var p=(1<<m)-1;p<32?d^=1<<p:s^=1<<p-32}128&a?a=a<<1^113:a<<=1}u[r]=i.create(s,d)}}();var d=[];!function(){for(var e=0;e<25;e++)d[e]=i.create()}();var m=s.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new i.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,o=this.blockSize/2,a=0;a<o;a++){var r=e[t+2*a],i=e[t+2*a+1];r=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),(I=n[a]).high^=i,I.low^=r}for(var s=0;s<24;s++){for(var m=0;m<5;m++){for(var p=0,f=0,h=0;h<5;h++)p^=(I=n[m+5*h]).high,f^=I.low;var v=d[m];v.high=p,v.low=f}for(m=0;m<5;m++){var g=d[(m+4)%5],y=d[(m+1)%5],k=y.high,w=y.low;for(p=g.high^(k<<1|w>>>31),f=g.low^(w<<1|k>>>31),h=0;h<5;h++)(I=n[m+5*h]).high^=p,I.low^=f}for(var b=1;b<25;b++){var x=(I=n[b]).high,S=I.low,N=l[b];N<32?(p=x<<N|S>>>32-N,f=S<<N|x>>>32-N):(p=S<<N-32|x>>>64-N,f=x<<N-32|S>>>64-N);var C=d[c[b]];C.high=p,C.low=f}var _=d[0],E=n[0];for(_.high=E.high,_.low=E.low,m=0;m<5;m++)for(h=0;h<5;h++){var I=n[b=m+5*h],D=d[b],V=d[(m+1)%5+5*h],B=d[(m+2)%5+5*h];I.high=D.high^~V.high&B.high,I.low=D.low^~V.low&B.low}I=n[0];var T=u[s];I.high^=T.high,I.low^=T.low}},_doFinalize:function(){var e=this._data,n=e.words;this._nDataBytes;var o=8*e.sigBytes,r=32*this.blockSize;n[o>>>5]|=1<<24-o%32,n[(t.ceil((o+1)/r)*r>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var i=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u<l;u++){var d=i[u],m=d.high,p=d.low;m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(m)}return new a.init(c,s)},clone:function(){for(var e=r.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});n.SHA3=r._createHelper(m),n.HmacSHA3=r._createHmacHelper(m)}(Math),e.SHA3)),ke.exports;var e}var be,xe={exports:{}};var Se,Ne={exports:{}};function Ce(){return Se||(Se=1,Ne.exports=(e=U(),n=(t=e).lib.Base,o=t.enc.Utf8,void(t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var n=e.blockSize,a=4*n;t.sigBytes>a&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),s=r.words,l=i.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;r.sigBytes=i.sigBytes=a,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))),Ne.exports;var e,t,n,o}var _e,Ee={exports:{}};var Ie,De={exports:{}};function Ve(){return Ie||(Ie=1,De.exports=(s=U(),se(),Ce(),t=(e=s).lib,n=t.Base,o=t.WordArray,a=e.algo,r=a.MD5,i=a.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:r,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,a=this.cfg,r=a.hasher.create(),i=o.create(),s=i.words,l=a.keySize,c=a.iterations;s.length<l;){n&&r.update(n),n=r.update(e).finalize(t),r.reset();for(var u=1;u<c;u++)n=r.finalize(n),r.reset();i.concat(n)}return i.sigBytes=4*l,i}}),e.EvpKDF=function(e,t,n){return i.create(n).compute(e,t)},s.EvpKDF)),De.exports;var e,t,n,o,a,r,i,s}var Be,Te={exports:{}};function Pe(){return Be||(Be=1,Te.exports=(e=U(),Ve(),void(e.lib.Cipher||function(t){var n=e,o=n.lib,a=o.Base,r=o.WordArray,i=o.BufferedBlockAlgorithm,s=n.enc;s.Utf8;var l=s.Base64,c=n.algo.EvpKDF,u=o.Cipher=i.extend({cfg:a.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){i.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:g}return function(t){return{encrypt:function(n,o,a){return e(o).encrypt(t,n,o,a)},decrypt:function(n,o,a){return e(o).decrypt(t,n,o,a)}}}}()});o.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var d=n.mode={},m=o.BlockCipherMode=a.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=d.CBC=function(){var e=m.extend();function n(e,n,o){var a,r=this._iv;r?(a=r,this._iv=t):a=this._prevBlock;for(var i=0;i<o;i++)e[n+i]^=a[i]}return e.Encryptor=e.extend({processBlock:function(e,t){var o=this._cipher,a=o.blockSize;n.call(this,e,t,a),o.encryptBlock(e,t),this._prevBlock=e.slice(t,t+a)}}),e.Decryptor=e.extend({processBlock:function(e,t){var o=this._cipher,a=o.blockSize,r=e.slice(t,t+a);o.decryptBlock(e,t),n.call(this,e,t,a),this._prevBlock=r}}),e}(),f=(n.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,o=n-e.sigBytes%n,a=o<<24|o<<16|o<<8|o,i=[],s=0;s<o;s+=4)i.push(a);var l=r.create(i,o);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};o.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:f}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,o=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=o.createEncryptor:(e=o.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(o,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var h=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),v=(n.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?r.create([1398893684,1701076831]).concat(n).concat(t):t).toString(l)},parse:function(e){var t,n=l.parse(e),o=n.words;return 1398893684==o[0]&&1701076831==o[1]&&(t=r.create(o.slice(2,4)),o.splice(0,4),n.sigBytes-=16),h.create({ciphertext:n,salt:t})}},g=o.SerializableCipher=a.extend({cfg:a.extend({format:v}),encrypt:function(e,t,n,o){o=this.cfg.extend(o);var a=e.createEncryptor(n,o),r=a.finalize(t),i=a.cfg;return h.create({ciphertext:r,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:o.format})},decrypt:function(e,t,n,o){return o=this.cfg.extend(o),t=this._parse(t,o.format),e.createDecryptor(n,o).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(n.kdf={}).OpenSSL={execute:function(e,t,n,o,a){if(o||(o=r.random(8)),a)i=c.create({keySize:t+n,hasher:a}).compute(e,o);else var i=c.create({keySize:t+n}).compute(e,o);var s=r.create(i.words.slice(t),4*n);return i.sigBytes=4*t,h.create({key:i,iv:s,salt:o})}},k=o.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:y}),encrypt:function(e,t,n,o){var a=(o=this.cfg.extend(o)).kdf.execute(n,e.keySize,e.ivSize,o.salt,o.hasher);o.iv=a.iv;var r=g.encrypt.call(this,e,t,a.key,o);return r.mixIn(a),r},decrypt:function(e,t,n,o){o=this.cfg.extend(o),t=this._parse(t,o.format);var a=o.kdf.execute(n,e.keySize,e.ivSize,t.salt,o.hasher);return o.iv=a.iv,g.decrypt.call(this,e,t,a.key,o)}})}()))),Te.exports;var e}var Ae,Oe={exports:{}};var Me,Le={exports:{}};var je,Fe={exports:{}};function Ue(){return je||(je=1,Fe.exports=(e=U(),Pe(),
|
||
/** @preserve
|
||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||
* derived from CryptoJS.mode.CTR
|
||
* Jan Hruby jhruby.web@gmail.com
|
||
*/
|
||
e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function n(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,n=e>>8&255,o=255&e;255===t?(t=0,255===n?(n=0,255===o?o=0:++o):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=o}return e}function o(e){return 0===(e[0]=n(e[0]))&&(e[1]=n(e[1])),e}var a=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,a=n.blockSize,r=this._iv,i=this._counter;r&&(i=this._counter=r.slice(0),this._iv=void 0),o(i);var s=i.slice(0);n.encryptBlock(s,0);for(var l=0;l<a;l++)e[t+l]^=s[l]}});return t.Decryptor=a,t}(),e.mode.CTRGladman)),Fe.exports;var e}var $e,Re={exports:{}};var ze,He={exports:{}};var qe,Ge={exports:{}};var We,Je={exports:{}};var Xe,Ke={exports:{}};var Ye,Ze={exports:{}};var Qe,et={exports:{}};var tt,nt={exports:{}};var ot,at={exports:{}};var rt,it={exports:{}};function st(){return rt||(rt=1,it.exports=(e=U(),Z(),ae(),Ve(),Pe(),function(){var t=e,n=t.lib,o=n.WordArray,a=n.BlockCipher,r=t.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=r.DES=a.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var o=i[n]-1;t[n]=e[o>>>5]>>>31-o%32&1}for(var a=this._subKeys=[],r=0;r<16;r++){var c=a[r]=[],u=l[r];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var d=this._invSubKeys=[];for(n=0;n<16;n++)d[n]=a[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],m.call(this,4,252645135),m.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),m.call(this,1,1431655765);for(var o=0;o<16;o++){for(var a=n[o],r=this._lBlock,i=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((i^a[l])&u[l])>>>0];this._lBlock=i,this._rBlock=r^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,m.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),m.call(this,16,65535),m.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function m(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function p(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}t.DES=a._createHelper(d);var f=r.TripleDES=a.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(o.create(t)),this._des2=d.createEncryptor(o.create(n)),this._des3=d.createEncryptor(o.create(a))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=a._createHelper(f)}(),e.TripleDES)),it.exports;var e}var lt,ct={exports:{}};var ut,dt={exports:{}};var mt,pt={exports:{}};var ft,ht,vt,gt,yt,kt,wt,bt={exports:{}};function xt(){return ft||(ft=1,bt.exports=(e=U(),Z(),ae(),Ve(),Pe(),function(){var t=e,n=t.lib.BlockCipher,o=t.algo;const a=16,r=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],i=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function l(e,t){let n=t>>24&255,o=t>>16&255,a=t>>8&255,r=255&t,i=e.sbox[0][n]+e.sbox[1][o];return i^=e.sbox[2][a],i+=e.sbox[3][r],i}function c(e,t,n){let o,r=t,i=n;for(let s=0;s<a;++s)r^=e.pbox[s],i=l(e,r)^i,o=r,r=i,i=o;return o=r,r=i,i=o,i^=e.pbox[a],r^=e.pbox[a+1],{left:r,right:i}}function u(e,t,n){let o,r=t,i=n;for(let s=a+1;s>1;--s)r^=e.pbox[s],i=l(e,r)^i,o=r,r=i,i=o;return o=r,r=i,i=o,i^=e.pbox[1],r^=e.pbox[0],{left:r,right:i}}function d(e,t,n){for(let a=0;a<4;a++){e.sbox[a]=[];for(let t=0;t<256;t++)e.sbox[a][t]=i[a][t]}let o=0;for(let i=0;i<a+2;i++)e.pbox[i]=r[i]^t[o],o++,o>=n&&(o=0);let s=0,l=0,u=0;for(let r=0;r<a+2;r+=2)u=c(e,s,l),s=u.left,l=u.right,e.pbox[r]=s,e.pbox[r+1]=l;for(let a=0;a<4;a++)for(let t=0;t<256;t+=2)u=c(e,s,l),s=u.left,l=u.right,e.sbox[a][t]=s,e.sbox[a][t+1]=l;return!0}var m=o.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4;d(s,t,n)}},encryptBlock:function(e,t){var n=c(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},decryptBlock:function(e,t){var n=u(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=n._createHelper(m)}(),e.Blowfish)),bt.exports;var e}A.exports=function(e){return e}(U(),z(),G(),X(),Z(),te(),ae(),se(),ue(),de||(de=1,me.exports=(wt=U(),ue(),vt=(ht=wt).lib.WordArray,gt=ht.algo,yt=gt.SHA256,kt=gt.SHA224=yt.extend({_doReset:function(){this._hash=new vt.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=yt._doFinalize.call(this);return e.sigBytes-=4,e}}),ht.SHA224=yt._createHelper(kt),ht.HmacSHA224=yt._createHmacHelper(kt),wt.SHA224)),he(),function(){return ve||(ve=1,ge.exports=(s=U(),z(),he(),t=(e=s).x64,n=t.Word,o=t.WordArray,a=e.algo,r=a.SHA512,i=a.SHA384=r.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=r._doFinalize.call(this);return e.sigBytes-=16,e}}),e.SHA384=r._createHelper(i),e.HmacSHA384=r._createHmacHelper(i),s.SHA384)),ge.exports;var e,t,n,o,a,r,i,s}(),we(),function(){return be||(be=1,xe.exports=(e=U(),
|
||
/** @preserve
|
||
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||
|
||
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
function(){var t=e,n=t.lib,o=n.WordArray,a=n.Hasher,r=t.algo,i=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=o.create([0,1518500249,1859775393,2400959708,2840853838]),d=o.create([1352829926,1548603684,1836072691,2053994217,0]),m=r.RIPEMD160=a.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var o=t+n,a=e[o];e[o]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var r,m,k,w,b,x,S,N,C,_,E,I=this._hash.words,D=u.words,V=d.words,B=i.words,T=s.words,P=l.words,A=c.words;for(x=r=I[0],S=m=I[1],N=k=I[2],C=w=I[3],_=b=I[4],n=0;n<80;n+=1)E=r+e[t+B[n]]|0,E+=n<16?p(m,k,w)+D[0]:n<32?f(m,k,w)+D[1]:n<48?h(m,k,w)+D[2]:n<64?v(m,k,w)+D[3]:g(m,k,w)+D[4],E=(E=y(E|=0,P[n]))+b|0,r=b,b=w,w=y(k,10),k=m,m=E,E=x+e[t+T[n]]|0,E+=n<16?g(S,N,C)+V[0]:n<32?v(S,N,C)+V[1]:n<48?h(S,N,C)+V[2]:n<64?f(S,N,C)+V[3]:p(S,N,C)+V[4],E=(E=y(E|=0,A[n]))+_|0,x=_,_=C,C=y(N,10),N=S,S=E;E=I[1]+k+C|0,I[1]=I[2]+w+_|0,I[2]=I[3]+b+x|0,I[3]=I[4]+r+S|0,I[4]=I[0]+m+N|0,I[0]=E},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;t[o>>>5]|=128<<24-o%32,t[14+(o+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var a=this._hash,r=a.words,i=0;i<5;i++){var s=r[i];r[i]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return a},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function f(e,t,n){return e&t|~e&n}function h(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function g(e,t,n){return e^(t|~n)}function y(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(m),t.HmacRIPEMD160=a._createHmacHelper(m)}(),e.RIPEMD160)),xe.exports;var e}(),Ce(),function(){return _e||(_e=1,Ee.exports=(l=U(),ue(),Ce(),t=(e=l).lib,n=t.Base,o=t.WordArray,a=e.algo,r=a.SHA256,i=a.HMAC,s=a.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:r,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,a=i.create(n.hasher,e),r=o.create(),s=o.create([1]),l=r.words,c=s.words,u=n.keySize,d=n.iterations;l.length<u;){var m=a.update(t).finalize(s);a.reset();for(var p=m.words,f=p.length,h=m,v=1;v<d;v++){h=a.finalize(h),a.reset();for(var g=h.words,y=0;y<f;y++)p[y]^=g[y]}r.concat(m),c[0]++}return r.sigBytes=4*u,r}}),e.PBKDF2=function(e,t,n){return s.create(n).compute(e,t)},l.PBKDF2)),Ee.exports;var e,t,n,o,a,r,i,s,l}(),Ve(),Pe(),function(){return Ae||(Ae=1,Oe.exports=(e=U(),Pe(),e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function n(e,t,n,o){var a,r=this._iv;r?(a=r.slice(0),this._iv=void 0):a=this._prevBlock,o.encryptBlock(a,0);for(var i=0;i<n;i++)e[t+i]^=a[i]}return t.Encryptor=t.extend({processBlock:function(e,t){var o=this._cipher,a=o.blockSize;n.call(this,e,t,a,o),this._prevBlock=e.slice(t,t+a)}}),t.Decryptor=t.extend({processBlock:function(e,t){var o=this._cipher,a=o.blockSize,r=e.slice(t,t+a);n.call(this,e,t,a,o),this._prevBlock=r}}),t}(),e.mode.CFB)),Oe.exports;var e}(),function(){return Me||(Me=1,Le.exports=(n=U(),Pe(),n.mode.CTR=(e=n.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize,a=this._iv,r=this._counter;a&&(r=this._counter=a.slice(0),this._iv=void 0);var i=r.slice(0);n.encryptBlock(i,0),r[o-1]=r[o-1]+1|0;for(var s=0;s<o;s++)e[t+s]^=i[s]}}),e.Decryptor=t,e),n.mode.CTR)),Le.exports;var e,t,n}(),Ue(),function(){return $e||($e=1,Re.exports=(n=U(),Pe(),n.mode.OFB=(e=n.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize,a=this._iv,r=this._keystream;a&&(r=this._keystream=a.slice(0),this._iv=void 0),n.encryptBlock(r,0);for(var i=0;i<o;i++)e[t+i]^=r[i]}}),e.Decryptor=t,e),n.mode.OFB)),Re.exports;var e,t,n}(),function(){return ze||(ze=1,He.exports=(t=U(),Pe(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB)),He.exports;var e,t}(),function(){return qe||(qe=1,Ge.exports=(e=U(),Pe(),e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,o=4*t,a=o-n%o,r=n+a-1;e.clamp(),e.words[r>>>2]|=a<<24-r%4*8,e.sigBytes+=a},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923)),Ge.exports;var e}(),function(){return We||(We=1,Je.exports=(e=U(),Pe(),e.pad.Iso10126={pad:function(t,n){var o=4*n,a=o-t.sigBytes%o;t.concat(e.lib.WordArray.random(a-1)).concat(e.lib.WordArray.create([a<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126)),Je.exports;var e}(),function(){return Xe||(Xe=1,Ke.exports=(e=U(),Pe(),e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971)),Ke.exports;var e}(),function(){return Ye||(Ye=1,Ze.exports=(e=U(),Pe(),e.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding)),Ze.exports;var e}(),function(){return Qe||(Qe=1,et.exports=(e=U(),Pe(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding)),et.exports;var e}(),function(){return tt||(tt=1,nt.exports=(o=U(),Pe(),t=(e=o).lib.CipherParams,n=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var o=n.parse(e);return t.create({ciphertext:o})}},o.format.Hex)),nt.exports;var e,t,n,o}(),function(){return ot||(ot=1,at.exports=(e=U(),Z(),ae(),Ve(),Pe(),function(){var t=e,n=t.lib.BlockCipher,o=t.algo,a=[],r=[],i=[],s=[],l=[],c=[],u=[],d=[],m=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,o=0;for(t=0;t<256;t++){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,a[n]=f,r[f]=n;var h=e[n],v=e[h],g=e[v],y=257*e[f]^16843008*f;i[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*g^65537*v^257*h^16843008*n,u[f]=y<<24|y>>>8,d[f]=y<<16|y>>>16,m[f]=y<<8|y>>>24,p[f]=y,n?(n=h^e[e[e[g^h]]],o^=e[e[o]]):n=o=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],h=o.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,o=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],i=0;i<o;i++)i<n?r[i]=t[i]:(c=r[i-1],i%n?n>6&&i%n==4&&(c=a[c>>>24]<<24|a[c>>>16&255]<<16|a[c>>>8&255]<<8|a[255&c]):(c=a[(c=c<<8|c>>>24)>>>24]<<24|a[c>>>16&255]<<16|a[c>>>8&255]<<8|a[255&c],c^=f[i/n|0]<<24),r[i]=r[i-n]^c);for(var s=this._invKeySchedule=[],l=0;l<o;l++){if(i=o-l,l%4)var c=r[i];else c=r[i-4];s[l]=l<4||i<=4?c:u[a[c>>>24]]^d[a[c>>>16&255]]^m[a[c>>>8&255]]^p[a[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,i,s,l,c,a)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,d,m,p,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,o,a,r,i,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],d=e[t+2]^n[2],m=e[t+3]^n[3],p=4,f=1;f<l;f++){var h=o[c>>>24]^a[u>>>16&255]^r[d>>>8&255]^i[255&m]^n[p++],v=o[u>>>24]^a[d>>>16&255]^r[m>>>8&255]^i[255&c]^n[p++],g=o[d>>>24]^a[m>>>16&255]^r[c>>>8&255]^i[255&u]^n[p++],y=o[m>>>24]^a[c>>>16&255]^r[u>>>8&255]^i[255&d]^n[p++];c=h,u=v,d=g,m=y}h=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&m])^n[p++],v=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[m>>>8&255]<<8|s[255&c])^n[p++],g=(s[d>>>24]<<24|s[m>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[p++],y=(s[m>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^n[p++],e[t]=h,e[t+1]=v,e[t+2]=g,e[t+3]=y},keySize:8});t.AES=n._createHelper(h)}(),e.AES)),at.exports;var e}(),st(),function(){return lt||(lt=1,ct.exports=(e=U(),Z(),ae(),Ve(),Pe(),function(){var t=e,n=t.lib.StreamCipher,o=t.algo,a=o.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,o=this._S=[],a=0;a<256;a++)o[a]=a;a=0;for(var r=0;a<256;a++){var i=a%n,s=t[i>>>2]>>>24-i%4*8&255;r=(r+o[a]+s)%256;var l=o[a];o[a]=o[r],o[r]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=r.call(this)},keySize:8,ivSize:0});function r(){for(var e=this._S,t=this._i,n=this._j,o=0,a=0;a<4;a++){n=(n+e[t=(t+1)%256])%256;var r=e[t];e[t]=e[n],e[n]=r,o|=e[(e[t]+e[n])%256]<<24-8*a}return this._i=t,this._j=n,o}t.RC4=n._createHelper(a);var i=o.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)r.call(this)}});t.RC4Drop=n._createHelper(i)}(),e.RC4)),ct.exports;var e}(),function(){return ut||(ut=1,dt.exports=(e=U(),Z(),ae(),Ve(),Pe(),function(){var t=e,n=t.lib.StreamCipher,o=t.algo,a=[],r=[],i=[],s=o.Rabbit=n.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var o=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],a=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)a[n]^=o[n+4&7];if(t){var r=t.words,i=r[0],s=r[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=c>>>16|4294901760&u,m=u<<16|65535&c;for(a[0]^=c,a[1]^=d,a[2]^=u,a[3]^=m,a[4]^=c,a[5]^=d,a[6]^=u,a[7]^=m,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),a[0]=n[0]^n[5]>>>16^n[3]<<16,a[1]=n[2]^n[7]>>>16^n[5]<<16,a[2]=n[4]^n[1]>>>16^n[7]<<16,a[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)a[o]=16711935&(a[o]<<8|a[o]>>>24)|4278255360&(a[o]<<24|a[o]>>>8),e[t+o]^=a[o]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var o=e[n]+t[n],a=65535&o,s=o>>>16,l=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&o)*o|0)+((65535&o)*o|0);i[n]=l^c}e[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,e[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,e[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,e[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,e[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,e[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,e[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,e[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}t.Rabbit=n._createHelper(s)}(),e.Rabbit)),dt.exports;var e}(),function(){return mt||(mt=1,pt.exports=(e=U(),Z(),ae(),Ve(),Pe(),function(){var t=e,n=t.lib.StreamCipher,o=t.algo,a=[],r=[],i=[],s=o.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var a=0;a<4;a++)l.call(this);for(a=0;a<8;a++)o[a]^=n[a+4&7];if(t){var r=t.words,i=r[0],s=r[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=c>>>16|4294901760&u,m=u<<16|65535&c;for(o[0]^=c,o[1]^=d,o[2]^=u,o[3]^=m,o[4]^=c,o[5]^=d,o[6]^=u,o[7]^=m,a=0;a<4;a++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),a[0]=n[0]^n[5]>>>16^n[3]<<16,a[1]=n[2]^n[7]>>>16^n[5]<<16,a[2]=n[4]^n[1]>>>16^n[7]<<16,a[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)a[o]=16711935&(a[o]<<8|a[o]>>>24)|4278255360&(a[o]<<24|a[o]>>>8),e[t+o]^=a[o]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var o=e[n]+t[n],a=65535&o,s=o>>>16,l=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&o)*o|0)+((65535&o)*o|0);i[n]=l^c}e[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,e[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,e[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,e[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,e[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,e[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,e[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,e[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}t.RabbitLegacy=n._createHelper(s)}(),e.RabbitLegacy)),pt.exports;var e}(),xt());const St=T(A.exports),Nt={app_secret_589:"a81eb3df418d83d6a1a4b7c572156d2f",app_key_589:"a81eb3df418d83d6",app_secret_5873:"41c479790a76f86326f89e8048964739",app_key_5873:"41c479790a76f863",app_secret_4123:"df2c88338b85f830cebce2a9eab56628",app_key_4123:"df2c88338b85f830",appId:"wx18111a41fd17f24f",storeStatus:{0:"临时休息",1:"营业中","-1":"休息","-2":"禁用"},whiteListUrl:["/v2/auth2/Login","/v2/auth2/AddAuthBindWithMobile","/v2/auth2/GetUserByMiniInfo","/v2/auth2/GetTokenInfo","/v2/auth2/SendVerifyCode","/v2/user2/RegisterUser","/v2/user2/GetMyStoreList","/v2/cms/GetServiceInfo","/v2/user2/GetSelfInfo","/v2/act/QueryActs"],serveInfo:{actCreateTypeName:{1:"API",2:"回调",3:"网页"},actStatusName:{0:"未知",1:"正常",2:"取消",3:"结束"},actTypeName:{0:"结算",3:"直降",4:"秒杀",5:"折扣"},afsAppealTypeName:{1:"仅退款",2:"退款",3:"退款."},afsReasonTypeName:{0:"其它",1:"商品质量",2:"错误的商品",3:"缺少部分商品",4:"全部商品未收到",5:"商品有损伤",6:"缺斤少两",7:"买多或者买少",8:"商品与描述不符",9:"误购",10:"未在时效内送达"},apiFunctionName:{AddStoreCourierMap:"门店绑定三方配送平台",AddStoreVendorMap:"门店绑定",AutoPayForPopluarMan:"每日订单打款",CancelOrder:"取消订单",CopyStoreSkus:"京西门店商品复制到京西",CreateStore:"门店管理-创建门店",DeleteStore:"门店管理-删除门店",DeleteStoreCourierMap:"门店解绑三方配送平台",DeleteStoreVendorMap:"门店解绑",Login:"登录",RegisterUser:"注册",SyncStoresQualify:"上传门店营业资质",UpdateSku:"修改sku",UpdateSkuName:"修改skuName",UpdateStore:"门店管理-更新门店信息",UpdateStoreCourierMap:"门店修改三方配送平台绑定信息",UpdateStoreVendorMap:"门店修改平台绑定信息",UpdateStoresSkus:"门店商品管理",UpdateStoresSkusSale:"门店商品可售状态修改"},autoReplyTypeName:{0:"全部自动回复",1:"禁止差评自动回复",2:"禁止自动回复"},autoSaleAt:"22:00:00",categoryType:{0:"普通类别",1:"特殊类别"},complaintReasons:{1:"骑手态度恶劣",2:"骑手接单后未取货",3:"骑手取货太慢",4:"骑手送货太慢",5:"货品未送达",6:"货品有损坏",7:"骑手违规收取顾客其他费用",69:"骑手恶意取消订单",71:"骑手提前点击取货/送达"},configTypeName:{Bank:"银行",Cookie:"Cookie",DiscountCard:"会员折扣卡",FreightPack:"免运包",JxStore:"京西商城",PricePack:"价格包",Reply:"评论回复模板",Role:"角色",Sys:"系统"},couponsStatus:{0:"正常",1:"已被使用","-1":"已过期","-2":"还没生效","-4":"已删除"},ebaiSupplierID:{2233065879:"饿百好菜",2267230126:"饿百果园",1921188187760:"饿百商超",22267134648:"饿百菜市"},ebaiSupplierInfo:{2233065879:{supplierID:"2233065879",logo:"https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8",Categorys:[{category1:277,category2:180},{category1:277,category2:184},{category1:277,category2:183},{category1:277,category2:181},{category1:277,category2:182}],BusinessFormID:1917869373,BrandName:"好菜鲜生"},2267230126:{supplierID:"2267230126",logo:"https://fuss10.elemecdn.com/7/21/a4b2877a916e1af6c5bdbf5945d51jpeg.jpeg",Categorys:[{category1:274,category2:190}],BusinessFormID:1917867465,BrandName:"京西果园"},1921188187760:{supplierID:"1921188187760",logo:"https://image-star.elemecdn.com/pb/dab294b0d3e9fa4b5fa63007ff02d06e98",Categorys:[{category1:166,category2:222}],BusinessFormID:1672214913,BrandName:"京西到家"},22267134648:{supplierID:"22267134648",logo:"https://fuss10.elemecdn.com/1/34/c6d76d8e3aa86cf214e6bff5514c1jpeg.jpeg",Categorys:[{category1:277,category2:180},{category1:277,category2:184},{category1:277,category2:183},{category1:277,category2:181},{category1:277,category2:182}],BusinessFormID:1917869373,BrandName:"京西菜市"}},opRequestStatusName:{0:"待审核",1:"已批准","-1":"拒绝"},opRequestTypeName:{1:"更改价格",2:"关注商品"},operateType:{1:"修改",2:"新增",4:"删除"},orderStatus:{0:"一般事件",2:"待付款",3:"待接单",5:"新订单",10:"待拣货",15:"待配送",17:"取货失败待审核",18:"取货失败",20:"配送中",22:"投递失败",110:"完成",115:"取消",155:"待审核",160:"已审核",165:"退货待确认",167:"退货已收到",180:"售后成功",190:"售后失败","-10":"取消申请取消","-100":"通知消息","-20":"锁定","-25":"解锁","-5":"申请取消","-55":"催单","-6":"同意取消","-65":"订单调整完成","-7":"拒绝取消","-70":"取货失败审核驳回","-80":"小费变动"},orderTypeName:{1:"订单",2:"运单",3:"售后单"},payStatusName:{0:"待支付",1:"已支付",2:"支付失败",3:"支付取消",4:"已退款"},printerStatusName:{0:"未知",1:"离线",2:"正常",3:"异常"},printerVendorInfo:{201:["飞鹅","序列号","KEY"],202:["外卖管家","打印机编号","不填"],203:["易联云","终端号","密钥"],204:["中午云","打印机ID","打印机密钥"],205:["京西云","打印机编号","密钥"],206:["芯烨云","打印机编号","不填"],207:["大趋智能","打印机编号","打印机密钥"]},purchaseVendorInfo:{0:{chineseName:"京东到家",userApplyCancelWaitMinute:15},1:{chineseName:"美团外卖",userApplyCancelWaitMinute:30},3:{chineseName:"饿百新零售",userApplyCancelWaitMinute:15}},refundStatusName:{0:"待退款",1:"已退款",2:"退款失败"},shopChineseNames:{0:"京西菜市",1:"京西菜市",2:"饿鲜达",3:"饿鲜达",9:"京西菜市商城",11:"微盟微商城"},skuNamePrefix:["新鲜","组合菜","熟食","鲜活现杀","冰冻","净菜","非熟食"],skuNameUnit:["份","袋","瓶","只","组","个","盒","把","半只","包","条","根","箱","听","套","罐","件","块","片","支","杯","桶","串","提"],skuSpecUnit:["g","kg","L","ml"],skuStatus:{0:"下架",1:"上架",2:"删除",3:"不可售",4:"可售","-1":"删除"},storeAuditStatusName:{0:"上线",1:"待审核","-1":"拒绝"},storeDeliveryRangeType:{2:"多边形",3:"圆"},storeDeliveryType:{0:"平台众包",1:"平台专送",2:"门店自送"},storeMsgSendStatusName:{0:"发送中",1:"成功",2:"部分成功",3:"失败"},storePriceTypeName:{0:"普通门店"},storeStatus:{0:"临时休息",1:"营业中","-1":"休息","-2":"禁用"},supplementType:{1:"差评退款",2:"优惠券"},taskStatusName:{0:"运行中",1:"取消中",2:"结束",3:"已取消",4:"失败"},thingType:{1:"分类",2:"商品库",3:"门店商品",4:"门店"},userTypeName:{1:"消费者",2:"门店老板",4:"运营",8:"老板",16:"受权限管理"},vendorName:{0:"京东到家",1:"美团外卖",2:"饿了么",3:"饿百新零售",4:"银豹",5:"京东商城",9:"京西商城",11:"微盟微商城",12:"国美",14:"抖店平台",16:"淘鲜达",101:"达达众包",102:"美团配送",103:"蜂鸟配送",105:"UU跑腿",106:"顺丰同城",201:"飞鹅",202:"外卖管家",203:"易联云",204:"中午云",205:"京西云",206:"芯烨云",207:"大趋智能",301:"微信公众号",302:"微信扫码",303:"微信小程序",311:"钉钉H5微应用",312:"钉钉移动接入应用(登录)",321:"高德导航",323:"七牛云",325:"万维易源",401:"京东物流"},vendorStatus:{0:"休息",1:"营业"},vendorTypeName:{0:"未知",1:"购物平台",2:"快递平台",9:"其它"},waybillStatus:{0:"一般事件",5:"新运单",7:"压单",8:"取消接受",10:"已接单",12:"已分配骑手",13:"骑手已取件",15:"已到店",17:"取货失败待审核",18:"取货失败",20:"配送中",22:"投递失败",26:"骑手已到达取件人地址处",105:"送达",115:"取消",120:"失败",999:"暂无配送信息"}}},Ct=e=>{let t=e?new Date(e):new Date;return`${t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1}-${t.getDate()<10?"0"+t.getDate():t.getDate()} ${t.getHours()<10?"0"+t.getHours():t.getHours()}:${t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes()}`},_t=e=>{let t=e?new Date(e):new Date;return`${t.getFullYear()}-${t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1}-${t.getDate()<10?"0"+t.getDate():t.getDate()} ${t.getHours()<10?"0"+t.getHours():t.getHours()}:${t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes()}:${t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds()}`},Et=e=>{let t=e?new Date(e):new Date;return`${t.getFullYear()}-${t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1}-${t.getDate()<10?"0"+t.getDate():t.getDate()}`},It=e=>!e||-1!==e.indexOf("1970-01-01")||-1!==e.indexOf("0001-01-01"),Dt=(e,t)=>{let n=parseFloat(e),o=parseFloat(t),a=parseInt(e.replace(n+".","")),r=parseInt(t.replace(o+".",""));return n>o||!(n<o)&&a>r};function Vt(e,t){let n=null;return function(...o){clearTimeout(n),n=setTimeout(()=>{e.apply(this,o)},t)}}function Bt(e){let t=0;return function(...n){let o=Date.now();o-t>=e.time?(e.success&&e.success.apply(this,n),t=Date.now()):e.fail&&e.fail(((t-o)/1e3+e.time/1e3).toFixed(0))}}function Tt(e,t){let n="";n="jxcs"==f("terrace")||"gblm"==f("terrace")?"5873"===t?"app_key_5873":"app_key_589":"app_key_4123";let o=Nt[n],a=Nt[n];o=St.enc.Utf8.parse(o),a=St.enc.Utf8.parse(a);let r=St.enc.Base64.parse(e),i=St.enc.Base64.stringify(r);return St.AES.decrypt(i,o,{iv:a,mode:St.mode.CBC,padding:St.pad.Pkcs7}).toString(St.enc.Utf8).toString()}function Pt(e,t){let n="";n="jxcs"==f("terrace")?"5873"===t?"app_key_5873":"app_key_589":"app_key_4123";let o=Nt[n],a=Nt[n];o=St.enc.Utf8.parse(o),a=St.enc.Utf8.parse(a);let r=St.enc.Utf8.parse(e),i=St.AES.encrypt(r,o,{iv:a,mode:St.mode.CBC,padding:St.pad.Pkcs7});return St.enc.Base64.stringify(i.ciphertext)}function At(e){uni.showLoading({title:e})}let Ot=[];function Mt(){Ot.forEach(e=>{e.abort()}),Ot=[]}function Lt(e){let t=e.replace(/:s*([0-9]{15,})s*(,?)/g,': "$1" $2');return JSON.parse(t)}function jt(e){let t="";switch(e.toString().length){case 1:t=`000${e}`;break;case 2:t=`00${e}`;break;case 3:t=`0${e}`;break;default:t=e.toString()}return`${t.slice(0,2)}:${t.slice(-2)}`}const Ft=uni.createInnerAudioContext();class Ut{constructor(){this.isOpenBle=!1,this.deviceId="",this.serviceId="",this.writeId="",this.notifyId="",this.openBluetoothAdapter()}openBluetoothAdapter(){return new Promise((e,t)=>{uni.openBluetoothAdapter({success:t=>{this.isOpenBle=!0,e(t)},fail:e=>{t("请打开蓝牙和定位功能")}})})}startBluetoothDevicesDiscovery(){if(this.isOpenBle)return new Promise((e,t)=>{setTimeout(()=>{uni.startBluetoothDevicesDiscovery({success:t=>{e(t)},fail:e=>{t("搜索设备失败")}})},300)});V("请打开蓝牙和定位功能")}getBluetoothDevices(){return new Promise((e,t)=>{uni.getBluetoothDevices({success(t){e(t)},fail(e){t("搜索失败")}})})}stopBluetoothDevicesDiscovery(){return new Promise((e,t)=>{uni.stopBluetoothDevicesDiscovery({success:e=>{uni.hideLoading()},fail:e=>{uni.hideLoading(),V("停止搜索失败,请重试")}})})}createBLEConnection(){let e=this.deviceId;return new Promise((t,n)=>{uni.createBLEConnection({deviceId:e,success:e=>{t(e)},fail:e=>{n(e)}})})}getBLEDeviceServices(){let e=[],t=this.deviceId;return new Promise((n,o)=>{setTimeout(()=>{uni.getBLEDeviceServices({deviceId:t,success:t=>{for(let n of t.services)n.isPrimary&&e.push(n);t.services.length<=0&&showToast("成功获取服务,但没有可用服务"),n(e)},fail:e=>{V("未获取蓝牙设备相关服务"),o(e)}})},2e3)})}getBLEDeviceCharacteristics(){let e=this.deviceId,t=this.serviceId,n=this;return new Promise((o,a)=>{uni.getBLEDeviceCharacteristics({deviceId:e,serviceId:t,success:e=>{for(let o of e.characteristics)o.properties.notify&&(n.notifyId=o.uuid,uni.setStorageSync("notifyId",n.notifyId)),o.properties.write&&(n.writeId=o.uuid,uni.setStorageSync("writeId",n.writeId));let t={notifyId:n.notifyId,writeId:n.writeId};o(t)},fail:e=>{V("未能获取设备相关服务,请重试"),a(e)}})})}closeBLEConnection(){let e=this.deviceId;uni.closeBLEConnection({deviceId:e,success(e){k("log","at utils/bluetoothPrinter/bluetooth.js:177","蓝牙连接已断开")}})}notifyBLECharacteristicValue(){let e=this.deviceId,t=this.serviceId,n=this.notifyId;uni.notifyBLECharacteristicValueChange({state:!0,deviceId:e,serviceId:t,characteristicId:n,success(e){uni.onBLECharacteristicValueChange(function(e){})},fail(e){k("log","at utils/bluetoothPrinter/bluetooth.js:199","notifyBLECharacteristicValueChange failed:"+e.errMsg)}})}writeBLECharacteristicValue(e){let t=this.deviceId,n=this.serviceId,o=this.writeId;return new Promise((a,r)=>{uni.writeBLECharacteristicValue({deviceId:t,serviceId:n,characteristicId:o,value:e,success(e){a(e)},fail(e){r(e)}})})}closeBluetoothAdapter(){uni.closeBluetoothAdapter({success:e=>{k("log","at utils/bluetoothPrinter/bluetooth.js:231","断开蓝牙")}})}reconnect(){(async()=>{try{let e=f("commitBTDevCharact");this.deviceId=this.deviceId||e.deviceId,this.serviceId=this.serviceId||e.serviceId,this.notifyId=this.notifyId||e.uuid,this.writeId=this.writeId||e.uuid,await this.createBLEConnection(),uni.hideLoading(),this.serviceId&&""!=this.serviceId?this.writeId&&""!=this.writeId?(Ft.src="/static/audio/connect_success.mp3",Ft.stop(),Ft.play(),qn.commit("storeInfo/setIsConnectPrinter",!0),V("蓝牙设备连接成功")):(await this.getBLEDeviceCharacteristics(),Ft.src="/static/audio/connect_success.mp3",Ft.stop(),Ft.play(),qn.commit("storeInfo/setIsConnectPrinter",!0),V("蓝牙设备连接成功")):uni.jxConfirm({title:"打印机断开提示",content:"打印服务已断开,请到设置重新搜索蓝牙设备",confirmText:"去连接设备",cancelText:"关闭",success:()=>{uni.navigateTo({url:"/subPages/merchantChild/printerSetUp/printerSetUp"})}})}catch(e){uni.hideLoading()}})()}}const $t=e=>(e=e.toString())[1]?e:"0"+e;function Rt(e){let t=[];for(let n=0;n<e.length;n++)if(n%4==0){let o=.299*e[n]+.587*e[n+1]+.114*e[n+2];e[n]=o>200?0:1,t.push(e[n])}return t}function zt(e){let t=[];for(let n=0;n<e.length;n+=8){let o=128*e[n]+64*e[n+1]+32*e[n+2]+16*e[n+3]+8*e[n+4]+4*e[n+5]+2*e[n+6]+1*e[n+7];t.push(o)}return t}function Ht(e){for(var t=0,n=e.split(""),o=0;o<n.length;o++)n[o].charCodeAt(0)<299?t++:t+=2;return t}function qt(e){switch(e){case 1e4:return"未初始化蓝牙适配器";case 10001:return"当前蓝牙适配器不可用";case 10002:return"没有找到指定设备";case 10003:return"连接失败请重试";case 10004:return"没有找到指定服务请重试";case 10005:return"没有找到指定特征值请重试";case 10006:return"当前连接已断开";case 10007:return"当前设备不支持";case 10008:return"系统发生异常";case 10009:return"系统版本低于 4.3 不支持 BLE";default:return"打印机未启动"}}const Gt={formatTime:e=>{const t=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),a=e.getHours(),r=e.getMinutes(),i=e.getSeconds();return[t,n,o].map($t).join("/")+" "+[a,r,i].map($t).join(":")},toArrayBuffer:function(e){let t=zt(Rt(e.data)),n=[].concat([27,97,1],[29,118,48,0,30,0,240,0],t,[27,74,3],[27,64]);return new Uint8Array(n)},zip_image:function(e){return zt(Rt(e.data))},goodsGandle:function(e,t,n){return function(e){for(var t=14-Ht(e=" "+e),n=0;n<t;n++)e+=" ";return e}(e)+function(e){for(var t=11-Ht(e),n=0;n<t;n++)e+=" ";return e}(t)+function(e){for(var t=5-Ht(e),n=0;n<t;n++)e=" "+e;return e}(n)},getBTAdapterState:function(){return new Promise((e,t)=>{uni.getBluetoothAdapterState({success(t){e(t)},fail(e){t(qt(e.errMsg))}})})},notifyBLEState:function(e,t,n){let o,a;return o=new ArrayBuffer(3),a=new DataView(o),a.setUint8(0,16),a.setUint8(1,4),a.setUint8(2,2),new Promise((a,r)=>{uni.writeBLECharacteristicValue({deviceId:e,serviceId:t,characteristicId:n,value:o,fail(e){r(qt(e.errMsg))}}),uni.notifyBLECharacteristicValueChange({deviceId:e,serviceId:t,characteristicId:n,state:!0,success(e){a(12)},fail(e){r(qt(e.errCode))}})})}},Wt=async e=>(At("登录中..."),e.cId=f("cid"),await sn.api("/v2/auth2/Login","POST",e)),Jt=async e=>await sn.api("/v2/auth2/AddAuthBindWithMobile","POST",e),Xt=async e=>await sn.api("/v2/auth2/SendVerifyCode","POST",e),Kt=async e=>await sn.api("/v2/user2/GetMyStoreList","GET",e),Yt=async e=>await sn.api("/v2/cms/GetServiceInfo","GET",e),Zt=async e=>await sn.api("/v2/user2/GetSelfInfo","GET",e),Qt=async e=>await sn.api("/v2/auth2/ChangePassword","PUT",e),en=[{text:"[微笑]",symbol:"smile",position:[0,0]},{text:"[撇嘴]",symbol:"pieMouth",position:[-60,0]},{text:"[色]",symbol:"tity",position:[-120,0]},{text:"[发呆]",symbol:"asleep",position:[0,0]},{text:"[得意]",symbol:"complacent",position:[0,0]},{text:"[流泪]",symbol:"shedTears",position:[0,0]},{text:"[害羞]",symbol:"shy",position:[0,0]},{text:"[闭嘴]",symbol:"shutUp",position:[0,0]},{text:"[睡]",symbol:"sleep",position:[0,0]},{text:"[大哭]",symbol:"bigCry",position:[0,0]},{text:"[尴尬]",symbol:"awkward",position:[0,0]},{text:"[发怒]",symbol:"flareUp",position:[0,0]},{text:"[调皮]",symbol:"naughty",position:[0,0]},{text:"[呲牙]",symbol:"bareTeeth",position:[0,0]},{text:"[惊讶]",symbol:"amazed",position:[0,0]},{text:"[难过]",symbol:"feelSorry",position:[0,0]},{text:"[酷]",symbol:"cool",position:[0,0]},{text:"[囧]",symbol:"orz",position:[0,0]},{text:"[抓狂]",symbol:"crazy",position:[0,0]},{text:"[吐]",symbol:"vomit",position:[0,0]},{text:"[偷笑]",symbol:"titter",position:[0,0]},{text:"[愉快]",symbol:"happy",position:[0,0]},{text:"[白眼]",symbol:"whiteEye",position:[0,0]},{text:"[傲慢]",symbol:"arrogance",position:[0,0]},{text:"[饥饿]",symbol:"hunger",position:[0,0]},{text:"[困]",symbol:"tired",position:[0,0]},{text:"[惊恐]",symbol:"terrified",position:[0,0]},{text:"[流汗]",symbol:"sweat",position:[0,0]},{text:"[憨笑]",symbol:"smileFatuously",position:[0,0]},{text:"[悠闲]",symbol:"easy",position:[0,0]},{text:"[奋斗]",symbol:"struggle",position:[0,0]},{text:"[咒骂]",symbol:"swear",position:[0,0]},{text:"[疑问]",symbol:"query",position:[0,0]},{text:"[嘘]",symbol:"hiss",position:[0,0]},{text:"[晕]",symbol:"giddy",position:[0,0]},{text:"[疯了]",symbol:"insane",position:[0,0]},{text:"[衰]",symbol:"decline",position:[0,0]},{text:"[骷髅]",symbol:"skull",position:[0,0]},{text:"[敲打]",symbol:"beat",position:[0,0]},{text:"[再见]",symbol:"goodbye",position:[0,0]},{text:"[擦汗]",symbol:"wipePerspiration",position:[0,0]},{text:"[抠鼻]",symbol:"pickNose",position:[0,0]},{text:"[鼓掌]",symbol:"applaud",position:[0,0]},{text:"[糗大了]",symbol:"embarrassed",position:[0,0]},{text:"[坏笑]",symbol:"snicker",position:[0,0]},{text:"[左哼哼]",symbol:"leftHum",position:[0,0]},{text:"[右哼哼]",symbol:"rightHum",position:[0,0]},{text:"[哈欠]",symbol:"yawn",position:[0,0]},{text:"[鄙视]",symbol:"disdain",position:[0,0]},{text:"[委屈]",symbol:"grievance",position:[0,0]},{text:"[快哭了]",symbol:"cring",position:[0,0]},{text:"[阴险]",symbol:"cattiness",position:[0,0]},{text:"[亲亲]",symbol:"kiss",position:[0,0]},{text:"[吓]",symbol:"threaten",position:[0,0]},{text:"[可怜]",symbol:"pitiful",position:[0,0]},{text:"[菜刀]",symbol:"kitchenKnife",position:[0,0]},{text:"[西瓜]",symbol:"watermelon",position:[0,0]},{text:"[啤酒]",symbol:"beer",position:[0,0]},{text:"[篮球]",symbol:"basketball",position:[0,0]},{text:"[乒乓]",symbol:"ping-pong",position:[0,0]},{text:"[咖啡]",symbol:"coffee",position:[0,0]},{text:"[饭]",symbol:"rice",position:[0,0]},{text:"[猪头]",symbol:"pigHead",position:[0,0]},{text:"[玫瑰]",symbol:"rose",position:[0,0]},{text:"[凋谢]",symbol:"fade",position:[0,0]},{text:"[嘴唇]",symbol:"lip",position:[0,0]},{text:"[爱心]",symbol:"love",position:[0,0]},{text:"[心碎]",symbol:"heartbreak",position:[0,0]},{text:"[蛋糕]",symbol:"cake",position:[0,0]},{text:"[闪电]",symbol:"lightning",position:[0,0]},{text:"[炸弹]",symbol:"bombs",position:[0,0]},{text:"[刀]",symbol:"knife",position:[0,0]},{text:"[足球]",symbol:"soccer",position:[0,0]},{text:"[瓢虫]",symbol:"ladybird",position:[0,0]},{text:"[便便]",symbol:"excrement",position:[0,0]},{text:"[月亮]",symbol:"moon",position:[0,0]},{text:"[太阳]",symbol:"sun",position:[0,0]},{text:"[礼物]",symbol:"gift",position:[0,0]},{text:"[拥抱]",symbol:"embrace",position:[0,0]},{text:"[强]",symbol:"strong",position:[0,0]},{text:"[弱]",symbol:"weak",position:[0,0]},{text:"[握手]",symbol:"handshake",position:[0,0]},{text:"[胜利]",symbol:"victory",position:[0,0]},{text:"[抱拳]",symbol:"holdFist",position:[0,0]},{text:"[勾引]",symbol:"seduce",position:[0,0]},{text:"[拳头]",symbol:"fist",position:[0,0]},{text:"[差劲]",symbol:"bad",position:[0,0]},{text:"[爱你]",symbol:"loveYou",position:[0,0]},{text:"[NO]",symbol:"no",position:[0,0]},{text:"[OK]",symbol:"ok",position:[0,0]}];function tn(){const t=new Ut,n=uni.createInnerAudioContext();let o=null;function a(){n.src="/static/audio/close_printer.mp3",n.stop(),n.play()}const r=e.computed(()=>qn.state.storeInfo.allStoreInfo);function i(e){return r.value.StoreMaps.filter(t=>t.vendorID==e)}function s(e){let t=e.match(/\[(.+?)\]/g);return!!(t&&t.length>0)}return{logOutFn:function(){v("token"),v("userID"),v("userType"),v("storeID"),v("storeName"),v("userID2"),v("mobile")},globGetToDay:async function(e){let t=await un.get_store_order_sale_info(e);if(0==t.code)return t.data;V("实时订单数据异常",2)},previewImage:async function(e,t){new Promise((n,o)=>{uni.previewImage({current:t||("string"==typeof e?e:e[0]),urls:Array.isArray(e)?e:[e],longPressActions:{itemList:["保存图片"],success(t){uni.showModal({title:"相册权限使用说明",content:"便于您保存图片与运营进行交流等场景中写入相册文件内容",complete:n=>{n.confirm&&uni.saveImageToPhotosAlbum({filePath:Array.isArray(e)?e[t.index]:e,complete(e){"saveImageToPhotosAlbum:ok"===e.errMsg?V("保存成功"):V("保存失败")}})}})}},success:e=>{n(e)},fail:e=>{V(e),o(e)}})})},setUserInfo:async function(e){h("token",e.token),h("userID",e.userID),h("userID2",e.userID2),h("mobile",e.mobile),(()=>{let e=[{key:"isPlayShound",value:!0},{key:"isPrinterUpc",value:!1},{key:"printerRetrySize",value:"0"},{key:"defaultPrinter",value:"2"},{key:"printerCompatible",value:!1},{key:"printerGoodsMoney",value:!1}];for(let t=0;t<e.length;t++)f(e[t].key).toString()||h(e[t].key,e[t].value)})();let t=(await Kt({version:"1.3.5"})).data||[];if(0==t.length)return uni.jxAlert({title:"提示",content:"该账号未绑定门店,请联系运营绑定,加盟联系电话18048531223"});if(1==t.length){let e=t[0];return h("storeID",e.id),h("storeName",e.name),void uni.switchTab({url:"/pages/merchant/index"})}clearTimeout(o),o=setTimeout(()=>{uni.navigateTo({url:"/subPages/switchStore/switchStore",animationType:"slide-in-top",animationDuration:500})},0)},appWxLogin:function(e){uni.getProvider({service:"share",success:function(t){if("weixin"==t.provider[0]){let t;plus.oauth.getServices(n=>{if(n&&n.length){for(var o=0,a=n.length;o<a;o++)if("weixin"===n[o].id){t=n[o];break}if(!t)return uni.jxAlert({title:"登录失败",content:"请先下载微信"});t.authorize(async t=>{let n={authType:"weixinapp",authSecret:t.code},o=await Wt(n);k("log","at composables/useGlobalFunc.ts:180","ZSW-res",o),0==o.code?(2==o.data.tokenType&&e.bangding&&e.bangding(o.data.token),2!=o.data.tokenType&&e.success&&e.success(o.data)):-1==o.desc.indexOf("row")?uni.jxAlert({title:"提示",content:`登录失败:${o.desc||o.data}`}):uni.jxAlert({title:"提示",content:"登录失败:对不起该账号未绑定门店,请联系官方客服进行绑定!"})})}else uni.jxAlert({title:"提示",content:"本机不支持微信登录"})})}else uni.jxAlert({title:"提示",content:"请先下载微信"})}})},openWeixin:function(e,t="gh_e9161397303e"){uni.getProvider({service:"share",success:function(n){"weixin"==n.provider[0]?plus.share.getServices(function(n){for(var o=null,a=0;a<n.length;a++){var r=n[a];"weixin"==r.id&&(o=r)}o&&o.launchMiniProgram({id:t,type:0,path:e})},function(e){uni.jxAlert({title:"提示",content:"打开小程序失败"})}):uni.jxAlert({title:"温馨提示",content:"请先下载微信"})}})},watchVersion:async function(e){let t=await un.get_app_varsion({appId:Nt.appId}),n=uni.getSystemInfoSync(),o="",a={};"android"===n.platform?(a=JSON.parse(t.data[0].value).update,o=a.version):o=JSON.parse(t.data[0].value).other.appName.split(",")[1],function(e,t){if(!e||!t)return;for(var n=/(\.0)+[^\.]*$/,o=e.replace(n,"").split("."),a=t.replace(n,"").split("."),r=0;r<o.length;++r){if(a.length==r)return!0;if(o[r]!=a[r])return o[r]>a[r]}if(o.length!=a.length)return!1;return!1}(o,n.appVersion)?e&&e(!0,a):e&&e(!1,a)},newMessage:async function(){let e={storeIDs:JSON.stringify([+f("storeID")]),fromReadCount:0,toReadCount:0,offset:0,pageSize:-1,fromTime:Et(+new Date-6048e5)+" 00:00:00",toTime:Et(+new Date)+" 23:59:59"},t=await un.Get_store_message_statuses(e);if(0==t.code){let e=t.data.totalCount;0==e?(qn.commit("storeInfo/setIsNewMessage",!1),uni.removeTabBarBadge({index:3})):(qn.commit("storeInfo/setIsNewMessage",!0),uni.setTabBarBadge({index:3,text:e>100?"99+":""+e}))}},copyInfo:function(e,t="复制成功",n="复制失败"){uni.setClipboardData({data:e,success(){V(t)},fail(){V(n)}})},phoneCall:function(e,t="拨号完成",n="取消拨号"){uni.jxConfirm({title:"拨打电话权限说明",content:"便于您快速地跳到拨号界面与运营进行交流",success(){uni.makePhoneCall({phoneNumber:e,success(){k("log","at composables/useGlobalFunc.ts:360",t)},fail(){V(n)}})}})},isTrades:function(e){let t=qn.state.storeInfo.allStoreInfo,n=[];n[0]=t.openTime1,n[1]=t.closeTime1,n[2]=t.openTime2,n[3]=t.closeTime2;let o=e.getHours(),a=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),r=+(String(o)+String(a));return r>=n[0]&&r<=n[1]||r>=n[2]&&r<=n[3]},wholeCalcPrice:function(e){return e.isPointStore?e.isNotQuote||e.isZero?e.actualPayPrice?(e.actualPayPrice/100).toFixed(2):0:e.isUpperfif?e.earningPrice?(e.earningPrice/100).toFixed(2):0:"请按平台查看":e.isUpperfif||e.isZero?e.earningPrice?(e.earningPrice/100).toFixed(2):0:"请按平台查看"},singleCalcPrice:function(e){return 0!=e.vendorPayPercentage?e.vendorPayPercentage<50?(e.actualPayPrice/100).toFixed(2):(e.earningPrice/100).toFixed(2):e.isPointStore?(e.actualPayPrice/100).toFixed(2):(e.earningPrice/100).toFixed(2)},setPrinterStatus:function(){let e=f("commitBTDevCharact");setInterval(()=>{let n=qn.state.storeInfo.isConnectPrinter;Gt.notifyBLEState(e.deviceId,e.serviceId,e.uuid).then(async e=>{if(12!=e){if(k("log","at composables/useGlobalFunc.ts:581","连接失败"),await t.reconnect(),!n)return;a(),qn.commit("storeInfo/setIsConnectPrinter",!1)}else k("log","at composables/useGlobalFunc.ts:587","连接正常"),qn.commit("storeInfo/setIsConnectPrinter",!0)}).catch(async()=>{k("log","at composables/useGlobalFunc.ts:591","连接失败"),await t.reconnect(),n&&(a(),qn.commit("storeInfo/setIsConnectPrinter",!1))})},2e4)},isTxd:function(){let e=!1;return r.value.StoreMaps.forEach(t=>{16==t.vendorID&&(e=!0)}),e},getMtStoreIMStatus:async()=>{let e=i(1),t=i(3),n=[];if(e&&e.length>0&&n.push({vendorID:1,vendorOrgCode:e[0].vendorOrgCode+"",vendorStoreID:e[0].vendorStoreID+""}),t&&t.length>0&&n.push({vendorID:3,vendorOrgCode:t[0].vendorOrgCode+"",vendorStoreID:t[0].vendorStoreID+""}),0===n.length)return;let o=await un.get_mt_store_im_status({data:JSON.stringify(n)}),a=[];"0"===o.code&&o.data.forEach(e=>{e.errMsg&&e.errMsg?a.push({...e,vendorID:+e.errMsg.substring(0,1)}):a.push({...e})}),qn.commit("storeInfo/setImOnlineStatus",a)},isExistPlatformID:i,analyEmoji:function(e){if(!s(e))return[{type:"text",text:e,emoji:""}];let t=[],n=e.match(/\[(.+?)\]/g)||[];return n&&n.length>0&&n.map((o,a)=>{let r=(e=>{let t=e,n=en.findIndex(e=>e.text===t);return-1!==n&&(t=en[n].symbol),t})(o);r===o&&(r="unknown:"+e);let i=e.indexOf(o);if(0===i){t.push({type:"emoji",text:"",emoji:r});let s=e.substring(i+o.length,i+o.length+1);"["!==s&&s.length>0&&a===n.length-1&&t.push({type:"text",text:e.substring(i+o.length),emoji:""})}else{t.push({type:"text",text:e.substring(0,i),emoji:""}),t.push({type:"emoji",text:"",emoji:r});let s=e.substring(i+o.length,i+o.length+1);"["!==s&&s.length>0&&a===n.length-1&&t.push({type:"text",text:e.substring(i+o.length),emoji:""})}e=e.replace(e.substring(0,i+o.length),"")}),t||[]},isCloudEmoji:s}}let nn,on,an=0,rn=null;const sn={api:(e,t="GET",n="",o=2e4,a=D,r="application/x-www-form-urlencoded")=>{if(function(e){if(uni.getNetworkType({success:e=>{"none"==e.networkType?qn.commit("serveInfo/setIsNetWorkS",!1):qn.commit("serveInfo/setIsNetWorkS",!0)}}),!f("token")&&!Nt.whiteListUrl.includes(e))return qn.commit("serveInfo/setIsFirestLogin",!0),!0;if(!f("storeID")&&!Nt.whiteListUrl.includes(e))return cn(),!0;if(!qn.state.serveInfo.isNetWork)return!0;return qn.commit("serveInfo/setIsFirestLogin",!1),!1}(e))return new Promise((e,t)=>{});let i=e;return"jxcs"!==f("terrace")&&(i=`/${f("terrace")}`+e),"jxgy"==f("terrace")&&"/v2/version/GetVersionController"==e&&(i=e),an=o,qn.commit("storeInfo/jxLoadingFn",!1),clearTimeout(nn),nn=setTimeout(()=>{qn.commit("storeInfo/jxLoadingFn",!0),ln()},500),"/v2/cms/GetNewOrderMsg"==e&&qn.commit("storeInfo/jxLoadingFn",!1),new Promise((s,l)=>{var c;(rn=uni.request({url:a+i,method:t,data:n,timeout:o,header:{"content-type":r,token:f("token")?f("token"):"jxcs"},success:e=>{if(qn.commit("storeInfo/jxLoadingFn",!1),e.statusCode>=200&&e.statusCode<300){if("-2"==e.data.code)return uni.jxAlert({title:"提示",content:"登录信息已过期",confirmText:"重新登录",success:()=>{const{logOutFn:e}=tn();e(),uni.reLaunch({url:"/subPages/login/wxLogin/wxLogin"})}}),!1;try{const t=JSON.parse(e.data.data);s({code:e.data.code,data:t,desc:e.data.desc})}catch(t){s(e.data)}}else e.statusCode>=400&&e.statusCode<500?(V("客户端出错",2),l("客户端出错")):e.statusCode>=500?(V("服务端出错",2),l("服务端出错")):V("网络请求出错",2)},fail:e=>{if("request:fail abort"==e.errMsg)return!1;V("网络请求超时",2),k("log","at api/request.ts:120","ZSW-网络请求超时",e),l(`网络请求超时 -- request.ts, ${e}`)},complete:()=>{uni.stopPullDownRefresh(),qn.commit("storeInfo/jxLoadingFn",!1),uni.hideLoading(),clearTimeout(nn)}}),"/v2/cms/GetNewOrderMsg"!=e)&&(c=rn,Ot.length>=17&&(Ot=[]),Ot.push(c))})}},ln=Vt(()=>{clearTimeout(on),on=setTimeout(()=>{qn.commit("storeInfo/jxLoadingFn",!1),k("log","at api/request.ts:145","ZSW-超时关闭加载图层"),clearTimeout(on)},an)},500);const cn=Vt(()=>{uni.navigateTo({url:"/subPages/switchStore/switchStore"})},1e3),un={get_stores:async e=>await sn.api("/v2/store/GetStores","GET",e),update_store:async e=>await sn.api("/v2/store/UpdateStore","PUT",e),update_txd_store:async e=>await sn.api("/v2/store/UpdateTxdStore","POST",e),update_vendors_store_states:async e=>await sn.api("/v2/store/UpdateVendorStoreBussinessStatus","POST",e),update_store_vendor_map:async e=>await sn.api("v2/store/UpdateStoreVendorMap","PUT",e),get_store_bills:async e=>await sn.api("/v2/financial/GetStoreBills","GET",e),get_store_order_sale_info:async e=>await sn.api("/v2/order/GetStoresOrderSaleInfo","GET",e,3e4),get_self_info:async e=>await sn.api("/v2/user2/GetSelfInfo","GET",e),query_configs:async e=>await sn.api("/v2/cms/QueryConfigs","GET",e),update_store_price_pack:async e=>await sn.api("/v2/store/UpdateStorePricePack","PUT",e),tmp_get_jx_bad_comments_no:async e=>await sn.api("/v2/store/TmpGetJxBadCommentsNo","GET",e),Tmp_get_jx_bad_comments_by_storeId:async e=>await sn.api("/v2/store/TmpGetJxBadCommentsByStoreId","GET",e),get_weekly_store_score:async e=>await sn.api("/v2/store/GetWeeklyStoreScore","GET",e),get_order_ders_accept:async e=>await sn.api("/v2/order/GetOrdersAccept","GET",e),get_stores_skus:async e=>await sn.api("/v2/store/sku/GetStoresSkus","GET",e),Get_store_message_statuses:async e=>await sn.api("/v2/msg/GetStoreMessageStatuses","GET",e),get_store_messages:async e=>await sn.api("/v2/msg/GetStoreMessages","GET",e),read_store_message:async e=>await sn.api("/v2/msg/ReadStoreMessage","PUT",e),query_acts:async e=>await sn.api("/v2/act/QueryActs","GET",e),get_order_sku_info:async e=>await sn.api("/v2/order/GetOrderSkuInfo","GET",e),get_brands:async e=>await sn.api("/v2/store/GetBrands","GET",e),set_order_print_status:async e=>await sn.api("/v2/order/SetOrderPrintStatus","PUT",e),delete_printer_seq:async e=>sn.api("/v2/store/DeletePrinterSeq","POST",e),bind_net_printer:async e=>sn.api("/v2/store/BindPrinter","POST",e),get_qiniu_upload_token:async e=>sn.api("/v2/cms/GetQiniuUploadToken","GET",e),get_weixin_unlimited:async e=>sn.api("/v2/event/GetWeixinUnlimited","POST",e),get_app_varsion:async e=>sn.api("/v2/version/GetVersionController","GET",e),get_store_vendor_maps:async e=>sn.api("/v2/store/GetStoreVendorMaps","GET",e),get_mt_store_im_status:async e=>sn.api("/v2/im/GetPoiIMStatus","GET",e),set_mt_store_im_status:async e=>sn.api("/v2/im/SetPoiIMStatus","POST",e),get_vendor_store:async e=>sn.api("/v2/store/GetVendorStore","GET",e)},dn={namespaced:!0,state:()=>({allStoreInfo:{},createStoreTimer:"1970-01-01 00:00:00",storeStatus:1,jxLoading:!1,isSkiplogin:!0,isConnectPrinter:!1,vendorStoreIDS:{},isNewMessage:!1,imMessage:"",imOnlineStatus:[],platformInfo:{}}),mutations:g,actions:{getOneStore:async(e,t)=>{let n=await un.get_stores({storeID:t});if(0==n.code){let t=n.data.stores[0];if(e.commit("setCreateStoreTimer",t.createdAt),e.commit("setStoreStatus",t.status),e.commit("setAllStoreInfo",t),t.StoreMaps&&t.StoreMaps.length>0){let n={},o={};for(let e=0;e<t.StoreMaps.length;e++){const a=t.StoreMaps[e];let r={vendorStoreID:a.vendorStoreID,vendorID:a.vendorID,vendorOrgCode:a.vendorOrgCode};if(o[a.vendorID]={...a},1==a.vendorID){n.MT=a.vendorStoreID,n.appID=a.vendorOrgCode;let e=await un.get_vendor_store(r);"0"==e.code&&(o[a.vendorID].status=e.data.bussinessStatus)}if(3==a.vendorID){n.ELM=a.vendorStoreID;let e=await un.get_vendor_store(r);"0"==e.code&&(o[a.vendorID].status=e.data.bussinessStatus)}}e.commit("setPlatformInfo",o),e.commit("setVendorStoreIDS",n)}h("lat",t.lat),h("lng",t.lng)}else V("系统异常",2)}},getters:{geterPointStore:e=>1===e.allStoreInfo.earningType,isPointStore:e=>e.allStoreInfo.payPercentage<=50,isNewPriceDisplay:()=>!0,imMtStatus:e=>e.imOnlineStatus.filter(e=>1===e.vendorID),imEbStatus:e=>e.imOnlineStatus.filter(e=>3===e.vendorID),imStatus(e,t){let n="";return t.imMtStatus.length>0&&!t.imMtStatus[0].errMsg&&0===t.imMtStatus[0].imStatus&&(n="美团"),t.imEbStatus.length>0&&!t.imEbStatus[0].errMsg&&0===t.imEbStatus[0].imStatus&&(n=n?n+"/饿百":"饿百"),n},storeStatus:e=>e.allStoreInfo.status,isSameStatus(e,t){let n=!0,o=e.allStoreInfo.status;return t.platformInfo&&t.platformInfo.length>0&&(n=t.platformInfo.every(e=>e.status===o)),n},businessHours(e){const t=e.allStoreInfo;return{timer1:jt(t.openTime1),timer2:jt(t.closeTime1),timer3:jt(t.openTime2),timer4:jt(t.closeTime2)}},newAutoEnableAt:e=>e.allStoreInfo.autoEnableAt,platformInfo(e){let t=[];for(let n in e.platformInfo)"9"!==n&&t.push(e.platformInfo[n]);return t},storeAddress:e=>e.allStoreInfo.address||""}},mn={namespaced:!0,state:()=>({orderUrl:"",sysInfo:'{"osVersion":"10.0.0","osName":"ios"}',updateOrder:0,isFirstLogin:!1,appFilePath:"",isNetWork:!0,isAgreement:!1,isAgreementIf:!1,serviceInfo:{}}),mutations:{setOrderUrl(e,t){e.orderUrl=t},setSystemInfo(e,t){e.sysInfo=t},setUpdateOrder(e,t){e.updateOrder=t},setIsFirestLogin(e,t){e.isFirstLogin=t},setAppFilePath(e,t){e.appFilePath=t},setIsNetWorkS(e,t){e.isNetWork=t},setIsAgreement(e,t){e.isAgreement=t},setIsAgreementIf(e,t){e.isAgreementIf=t},setServiceInfo(e,t){e.serviceInfo=t}},actions:{get_services:async e=>{let t=await Yt();"0"==t.code&&e.commit("setServiceInfo",t.data.metaData)}},getters:{getUpdateOrder:e=>e.updateOrder}};function pn(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{}}const fn="function"==typeof Proxy;let hn,vn;function gn(){return void 0!==hn||("undefined"!=typeof window&&window.performance?(hn=!0,vn=window.performance):"undefined"!=typeof globalThis&&(null===(e=globalThis.perf_hooks)||void 0===e?void 0:e.performance)?(hn=!0,vn=globalThis.perf_hooks.performance):hn=!1),hn?vn.now():Date.now();var e}class yn{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const r in e.settings){const t=e.settings[r];n[r]=t.defaultValue}const o=`__vue-devtools-plugin-settings__${e.id}`;let a=Object.assign({},n);try{const e=localStorage.getItem(o),t=JSON.parse(e);Object.assign(a,t)}catch(ts){}this.fallbacks={getSettings:()=>a,setSettings(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(ts){}a=e},now:()=>gn()},t&&t.on("plugin:settings:set",(e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)}),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise(n=>{this.targetQueue.push({method:t,args:e,resolve:n})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function kn(e,t){const n=e,o=pn(),a=pn().__VUE_DEVTOOLS_GLOBAL_HOOK__,r=fn&&n.enableEarlyProxy;if(!a||!o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&r){const e=r?new yn(n,a):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else a.emit("devtools-plugin:setup",e,t)}
|
||
/*!
|
||
* vuex v4.1.0
|
||
* (c) 2022 Evan You
|
||
* @license MIT
|
||
*/function wn(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function bn(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function xn(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Nn(e,n,[],e._modules.root,!0),Sn(e,n,t)}function Sn(t,n,o){var a=t._state,r=t._scope;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,s={},l={},c=e.effectScope(!0);c.run(function(){wn(i,function(n,o){s[o]=function(e,t){return function(){return e(t)}}(n,t),l[o]=e.computed(function(){return s[o]()}),Object.defineProperty(t.getters,o,{get:function(){return l[o].value},enumerable:!0})})}),t._state=e.reactive({data:n}),t._scope=c,t.strict&&function(t){e.watch(function(){return t._state.data},function(){},{deep:!0,flush:"sync"})}(t),a&&o&&t._withCommit(function(){a.data=null}),r&&r.stop()}function Nn(e,t,n,o,a){var r=!n.length,i=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[i],e._modulesNamespaceMap[i]=o),!r&&!a){var s=_n(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit(function(){s[l]=o.state})}var c=o.context=function(e,t,n){var o=""===t,a={dispatch:o?e.dispatch:function(n,o,a){var r=En(n,o,a),i=r.payload,s=r.options,l=r.type;return s&&s.root||(l=t+l),e.dispatch(l,i)},commit:o?e.commit:function(n,o,a){var r=En(n,o,a),i=r.payload,s=r.options,l=r.type;s&&s.root||(l=t+l),e.commit(l,i,s)}};return Object.defineProperties(a,{getters:{get:o?function(){return e.getters}:function(){return Cn(e,t)}},state:{get:function(){return _n(e.state,n)}}}),a}(e,i,n);o.forEachMutation(function(t,n){!function(e,t,n,o){var a=e._mutations[t]||(e._mutations[t]=[]);a.push(function(t){n.call(e,o.state,t)})}(e,i+n,t,c)}),o.forEachAction(function(t,n){var o=t.root?n:i+n,a=t.handler||t;!function(e,t,n,o){var a=e._actions[t]||(e._actions[t]=[]);a.push(function(t){var a,r=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(a=r)&&"function"==typeof a.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(t){throw e._devtoolHook.emit("vuex:error",t),t}):r})}(e,o,a,c)}),o.forEachGetter(function(t,n){!function(e,t,n,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)}}(e,i+n,t,c)}),o.forEachChild(function(o,r){Nn(e,t,n.concat(r),o,a)})}function Cn(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach(function(a){if(a.slice(0,o)===t){var r=a.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[a]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function _n(e,t){return t.reduce(function(e,t){return e[t]},e)}function En(e,t,n){var o;return null!==(o=e)&&"object"==typeof o&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var In="vuex:mutations",Dn="vuex:actions",Vn="vuex",Bn=0;function Tn(e,t){kn({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},function(n){n.addTimelineLayer({id:In,label:"Vuex Mutations",color:Pn}),n.addTimelineLayer({id:Dn,label:"Vuex Actions",color:Pn}),n.addInspector({id:Vn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===Vn)if(n.filter){var o=[];Ln(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[Mn(t._modules.root,"")]}),n.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===Vn){var o=n.nodeId;Cn(t,o),n.state=function(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),a={state:Object.keys(e.state).map(function(t){return{key:t,editable:!0,value:e.state[t]}})};if(o.length){var r=function(e){var t={};return Object.keys(e).forEach(function(n){var o=n.split("/");if(o.length>1){var a=t,r=o.pop();o.forEach(function(e){a[e]||(a[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),a=a[e]._custom.value}),a[r]=jn(function(){return e[n]})}else t[n]=jn(function(){return e[n]})}),t}(t);a.getters=Object.keys(r).map(function(e){return{key:e.endsWith("/")?On(e):e,editable:!1,value:jn(function(){return r[e]})}})}return a}((a=t._modules,(i=(r=o).split("/").filter(function(e){return e})).reduce(function(e,t,n){var o=e[t];if(!o)throw new Error('Missing module "'+t+'" for path "'+r+'".');return n===i.length-1?o:o._children},"root"===r?a:a.root._children)),"root"===o?t.getters:t._makeLocalGettersCache,o)}var a,r,i}),n.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===Vn){var o=n.nodeId,a=n.path;"root"!==o&&(a=o.split("/").filter(Boolean).concat(a)),t._withCommit(function(){n.set(t._state.data,a,n.state.value)})}}),t.subscribe(function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(Vn),n.sendInspectorState(Vn),n.addTimelineEvent({layerId:In,event:{time:Date.now(),title:e.type,data:o}})}),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=Bn++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:Dn,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},a=Date.now()-e._time;o.duration={_custom:{type:"duration",display:a+"ms",tooltip:"Action duration",value:a}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:Dn,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})})}var Pn=8702998,An={label:"namespaced",textColor:16777215,backgroundColor:6710886};function On(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Mn(e,t){return{id:t||"root",label:On(t),tags:e.namespaced?[An]:[],children:Object.keys(e._children).map(function(n){return Mn(e._children[n],t+n+"/")})}}function Ln(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[An]:[]}),Object.keys(t._children).forEach(function(a){Ln(e,t._children[a],n,o+a+"/")})}function jn(e){try{return e()}catch(ts){return ts}}var Fn=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},Un={namespaced:{configurable:!0}};Un.namespaced.get=function(){return!!this._rawModule.namespaced},Fn.prototype.addChild=function(e,t){this._children[e]=t},Fn.prototype.removeChild=function(e){delete this._children[e]},Fn.prototype.getChild=function(e){return this._children[e]},Fn.prototype.hasChild=function(e){return e in this._children},Fn.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Fn.prototype.forEachChild=function(e){wn(this._children,e)},Fn.prototype.forEachGetter=function(e){this._rawModule.getters&&wn(this._rawModule.getters,e)},Fn.prototype.forEachAction=function(e){this._rawModule.actions&&wn(this._rawModule.actions,e)},Fn.prototype.forEachMutation=function(e){this._rawModule.mutations&&wn(this._rawModule.mutations,e)},Object.defineProperties(Fn.prototype,Un);var $n=function(e){this.register([],e,!1)};function Rn(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;Rn(e.concat(o),t.getChild(o),n.modules[o])}}$n.prototype.get=function(e){return e.reduce(function(e,t){return e.getChild(t)},this.root)},$n.prototype.getNamespace=function(e){var t=this.root;return e.reduce(function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")},"")},$n.prototype.update=function(e){Rn([],this.root,e)},$n.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var a=new Fn(t,n);0===e.length?this.root=a:this.get(e.slice(0,-1)).addChild(e[e.length-1],a);t.modules&&wn(t.modules,function(t,a){o.register(e.concat(a),t,n)})},$n.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},$n.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var zn=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var a=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new $n(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=a;var r=this,i=this.dispatch,s=this.commit;this.dispatch=function(e,t){return i.call(r,e,t)},this.commit=function(e,t,n){return s.call(r,e,t,n)},this.strict=o;var l=this._modules.root.state;Nn(this,l,[],this._modules.root),Sn(this,l),n.forEach(function(e){return e(t)})},Hn={state:{configurable:!0}};zn.prototype.install=function(e,t){e.provide(t||"store",this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&Tn(e,this)},Hn.state.get=function(){return this._state.data},Hn.state.set=function(e){},zn.prototype.commit=function(e,t,n){var o=this,a=En(e,t,n),r=a.type,i=a.payload,s={type:r,payload:i},l=this._mutations[r];l&&(this._withCommit(function(){l.forEach(function(e){e(i)})}),this._subscribers.slice().forEach(function(e){return e(s,o.state)}))},zn.prototype.dispatch=function(e,t){var n=this,o=En(e,t),a=o.type,r=o.payload,i={type:a,payload:r},s=this._actions[a];if(s){try{this._actionSubscribers.slice().filter(function(e){return e.before}).forEach(function(e){return e.before(i,n.state)})}catch(ts){}var l=s.length>1?Promise.all(s.map(function(e){return e(r)})):s[0](r);return new Promise(function(e,t){l.then(function(t){try{n._actionSubscribers.filter(function(e){return e.after}).forEach(function(e){return e.after(i,n.state)})}catch(ts){}e(t)},function(e){try{n._actionSubscribers.filter(function(e){return e.error}).forEach(function(t){return t.error(i,n.state,e)})}catch(ts){}t(e)})})}},zn.prototype.subscribe=function(e,t){return bn(e,this._subscribers,t)},zn.prototype.subscribeAction=function(e,t){return bn("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},zn.prototype.watch=function(t,n,o){var a=this;return e.watch(function(){return t(a.state,a.getters)},n,Object.assign({},o))},zn.prototype.replaceState=function(e){var t=this;this._withCommit(function(){t._state.data=e})},zn.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),Nn(this,this.state,e,this._modules.get(e),n.preserveState),Sn(this,this.state)},zn.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit(function(){delete _n(t.state,e.slice(0,-1))[e[e.length-1]]}),xn(this)},zn.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},zn.prototype.hotUpdate=function(e){this._modules.update(e),xn(this,!0)},zn.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(zn.prototype,Hn);const qn=new zn({mutations:{},actions:{},getters:{},modules:{storeInfo:dn,serveInfo:mn}});const Gn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},Wn=Gn(e.defineComponent({__name:"jx-loading",setup(t){const n=e.ref(!1),o=e.ref(!1);return e.watch(()=>qn.state.storeInfo.jxLoading,e=>{e?(clearTimeout(null),o.value=!0,setTimeout(()=>{n.value=!0},10)):(clearTimeout(null),n.value=!1,setTimeout(()=>{o.value=!1},500))}),(t,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["jx-loading",{isAnimation:n.value}]),onTouchmove:a[0]||(a[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("view",{class:"jx-loading-border"}),e.createElementVNode("view",{class:"jx-loading-img"}),e.createElementVNode("view",{class:"text"},[e.createElementVNode("text",{style:{"--i":"1"}},"拼"),e.createElementVNode("text",{style:{"--i":"2"}},"命"),e.createElementVNode("text",{style:{"--i":"3"}},"加"),e.createElementVNode("text",{style:{"--i":"4"}},"载"),e.createElementVNode("text",{style:{"--i":"5"}},"中"),e.createElementVNode("text",{style:{"--i":"6"}},","),e.createElementVNode("text",{style:{"--i":"7"}},"请"),e.createElementVNode("text",{style:{"--i":"8"}},"稍"),e.createElementVNode("text",{style:{"--i":"9"}},"后"),e.createElementVNode("text",{style:{"--i":"10"}},"."),e.createElementVNode("text",{style:{"--i":"11"}},"."),e.createElementVNode("text",{style:{"--i":"12"}},".")])],34)),[[e.vShow,o.value]])}}),[["__scopeId","data-v-a954e132"]]),Jn=Gn(e.defineComponent({__name:"jx-empty",props:{icon:{default:"kongzhuangtai"},size:{default:150},title:{default:"暂无数据..."},color:{default:"#7fc86c"},src:{default:"/static/image/global/empty.png"}},setup:t=>(e.useCssVars(e=>({"3a5d10e2":e.color})),(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"empty-root"},[e.createElementVNode("image",{class:"img",src:t.src,mode:"scaleToFill"},null,8,["src"]),e.createElementVNode("text",{class:"text"},e.toDisplayString(t.title),1),e.renderSlot(t.$slots,"default",{},void 0,!0)])))}),[["__scopeId","data-v-b494cbcb"]]),Xn=Gn(e.defineComponent({__name:"jx-copyright",setup(t){let n=e.ref("蜀ICP备18030159号");function o(){if(0===n.value.length)return;uni.setClipboardData({data:n.value,success(){V("复制备案号成功",1)}});const e=setTimeout(()=>{plus.runtime.openURL("http://beian.miit.gov.cn/"),clearTimeout(e)},500)}return C(()=>{let e=f("brand");n.value="xiaomi"===e?n.value+"4A":""}),(t,a)=>e.unref(n).length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"copyright",onClick:o}," 备案号:"+e.toDisplayString(e.unref(n)),1)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-36280f28"]]),Kn=Gn(e.defineComponent({__name:"jx-login-empty",props:{title:{}},setup(t){function n(){uni.reLaunch({url:"/subPages/login/wxLogin/wxLogin"})}const o=e.ref("\n没有检测到网络\n请检查手机是否连上网络\n");let a=null;function r(){uni.showLoading({title:"请稍后"}),uni.getNetworkType({success:e=>{a="none"==e.networkType?setTimeout(()=>{V("未连接网络",2),qn.commit("serveInfo/setIsNetWorkS",!1),clearTimeout(a)},1200):setTimeout(()=>{qn.commit("serveInfo/setIsNetWorkS",!0),clearTimeout(a)},1200)},complete:()=>{a=setTimeout(()=>{uni.hideLoading(),clearTimeout(a)},1100)}})}return e.onBeforeUnmount(()=>{clearTimeout(a)}),(t,a)=>{const i=w(e.resolveDynamicComponent("jx-empty"),Jn),s=w(e.resolveDynamicComponent("jx-copyright"),Xn);return e.unref(qn).state.serveInfo.isNetWork?e.unref(qn).state.serveInfo.isFirstLogin?(e.openBlock(),e.createElementBlock("view",{key:1,class:"login-empty"},[e.createVNode(i,{title:t.title,color:"#9b9b9b"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"first-login","hover-class":"hoverLogin","hover-start-time":"0","hover-stay-time":"1200",onClick:n},"立即登录")]),_:1},8,["title"]),e.createVNode(s)])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"login-empty"},[e.createVNode(i,{title:o.value,src:"https://image.jxc4.com/image/85a01a6ee723403fae65cfa55441aaa9.png",color:"#9b9b9b"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"first-login","hover-class":"hoverLogin","hover-start-time":"0","hover-stay-time":"100",onClick:r},"在试一次")]),_:1},8,["title"]),e.createVNode(s)]))}}}),[["__scopeId","data-v-a6dc0c8e"]]),Yn=Gn(e.defineComponent({__name:"jx-icon",props:{icon:{},size:{default:32},color:{default:"#000"}},setup:t=>(t,n)=>(e.openBlock(),e.createElementBlock("text",{class:e.normalizeClass(["iconfont","icon-"+t.icon]),style:e.normalizeStyle({"font-size":t.size+"rpx",color:t.color})},null,6))}),[["__scopeId","data-v-b0c9e740"]]);var Zn={LF:[10],EOL:"\n",FEED_CONTROL_SEQUENCES:{CTL_LF:[10],CTL_GLF:[74,0],CTL_FF:[12],CTL_CR:[13],CTL_HT:[9],CTL_VT:[11]},CHARACTER_SPACING:{CS_DEFAULT:[27,32,0],CS_SET:[27,32]},LINE_SPACING:{LS_DEFAULT:[27,50],LS_SET:[27,51]},HARDWARE:{HW_INIT:[27,64],HW_SELECT:[27,61,1],HW_RESET:[27,63,10,0]},CASH_DRAWER:{CD_KICK_2:[27,112,0],CD_KICK_5:[27,112,1]},MARGINS:{BOTTOM:[27,79],LEFT:[27,108],RIGHT:[27,81]},PAPER:{PAPER_FULL_CUT:[29,86,0],PAPER_PART_CUT:[29,86,1],PAPER_CUT_A:[29,86,65],PAPER_CUT_B:[29,86,66]},TEXT_FORMAT:{TXT_NORMAL:[27,33,0],TXT_2HEIGHT:[27,33,16],TXT_2WIDTH:[27,33,32],TXT_4SQUARE:[27,33,48],TXT_UNDERL_OFF:[27,45,0],TXT_UNDERL_ON:[27,45,1],TXT_UNDERL2_ON:[27,45,2],TXT_BOLD_OFF:[27,69,0],TXT_BOLD_ON:[27,69,1],TXT_ITALIC_OFF:[27,53],TXT_ITALIC_ON:[27,52],TXT_FONT_A:[27,77,0],TXT_FONT_B:[27,77,1],TXT_FONT_C:[27,77,2],TXT_ALIGN_LT:[27,97,0],TXT_ALIGN_CT:[27,97,1],TXT_ALIGN_RT:[27,97,2]},BARCODE_FORMAT:{BARCODE_TXT_OFF:[29,72,0],BARCODE_TXT_ABV:[29,72,1],BARCODE_TXT_BLW:[29,72,2],BARCODE_TXT_BTH:[29,72,3],BARCODE_FONT_A:[29,102,0],BARCODE_FONT_B:[29,102,1],BARCODE_HEIGHT:function(e){return[29,104,e]},BARCODE_WIDTH:function(e){return[29,119,e]},BARCODE_HEIGHT_DEFAULT:[29,104,100],BARCODE_WIDTH_DEFAULT:[29,119,1],BARCODE_UPC_A:[29,107,0],BARCODE_UPC_E:[29,107,1],BARCODE_EAN13:[29,107,2],BARCODE_EAN8:[29,107,3],BARCODE_CODE39:[29,107,4],BARCODE_ITF:[29,107,5],BARCODE_NW7:[29,107,6],BARCODE_CODE93:[29,107,72],BARCODE_CODE128:[29,107,73]},IMAGE_FORMAT:{S_RASTER_N:[29,118,48,0],S_RASTER_2W:[29,118,48,1],S_RASTER_2H:[29,118,48,2],S_RASTER_Q:[29,118,48,3]},BITMAP_FORMAT:{BITMAP_S8:[27,42,0],BITMAP_D8:[27,42,1],BITMAP_S24:[27,42,32],BITMAP_D24:[27,42,33]},GSV0_FORMAT:{GSV0_NORMAL:[29,118,48,0],GSV0_DW:[29,118,48,1],GSV0_DH:[29,118,48,2],GSV0_DWDH:[29,118,48,3]},BEEP:[27,66],COLOR:{0:[27,114,0],1:[27,114,1]}},Qn=function(e){return{decode:function(t){for(var n="",o=0,a=t.length;o<a;o++){var r=255&t[o];if(r>128&&o+1<a){var i=255&t[o+1];i>=64&&(r=e[(r<<8|i)-33088],o++)}n+=String.fromCharCode(r)}return n},encode:function(t){t+="";for(var n=[],o="?".charCodeAt(0),a=0;a<t.length;a++){var r=t.charCodeAt(a);if(r<128)n.push(r);else{var i=e.indexOf(r);~i?(i+=33088,n.push(255&i>>8,255&i)):n.push(o)}}return n}}},eo=function(e){var t="!'()*-._~";function n(t){t.split("").sort();return{encode:function(n){return(n+"").replace(/./g,function(n){if(o=n,~t.indexOf(o)||/[0-9a-zA-Z]/.test(o))return n;for(var o,a=e.encode(n),r=0;r<a.length;r++)a[r]="%"+("0"+a[r].toString(16)).substr(-2).toUpperCase();return a.join("")})},decode:function(t){t=String(t);for(var n="",o=0;o<t.length;o++){var a=t.charAt(o);if("%"===a&&o+2<t.length){var r=parseInt(t.substr(o+1,2),16);if(!isNaN(r)){var i,s=o+2;if(!(r>128)){o+=2,n+=String.fromCharCode(r);continue}if("%"===t.charAt(s+1)?(i=parseInt(t.substr(s+2,2),16),s+=3):(i=t.charCodeAt(s+1),s+=1),i>=64){o=s,n+=e.decode([r,i]);continue}}}n+=a}return n}}}var o=n(t),a=n(t+"#$&+,/:;=?@");return{encodeURI:a.encode,decodeURI:a.decode,encodeURIComponent:o.encode,decodeURIComponent:o.decode}},to=function(){for(var e=0,t=arguments[0],n=0,o=t.length;n<o;n++){var a=t.charCodeAt(n);if(a<38||a>126)return NaN;e+=(a-38)*Math.pow(89,o-n-1)}return e};var no,oo,ao=(no=function(e){for(var t=[],n=129,o=0;n<=254;n++){t.length>0&&(t.length+=65);for(var a=64;a<=254;a++)if(127==a||161<=n&&n<=167&&a<=160||170<=n&&n<=175&&a>=161||248<=n&&a>=161)t.push(void 0);else{var r=e[o++],i=to(r);t.push(i||void 0)}}return t}(function(){return arguments[0].replace(/\x23(\d+)\x24/g,function(e,t){return Array(+t+4).join("#")}).replace(/[\x26-\x7e]\x25[\x26-\x7e]/g,function(e){for(var t=e.substr(0,1).charCodeAt(0),n=e.substr(2).charCodeAt(0),o=String.fromCharCode(t);t++<n;)o+=String.fromCharCode(t);return o}).replace(/\x23/g,"###").replace(/([\x26-\x7e]{2})\x21([\x26-\x7e\x23]+)(?:\x20|$)/g,function(e,t,n){return n.replace(/./g,function(e){return"#"!=e?t+e:e})}).match(/.../g)}("(T!HJ%LUX]e%gilotuwy{} (U!)-%/137>BDGHO%RTUW%\\_a%jl%rtw} (V!*+-0%27>C%EHJ%MP%R\\`cdfn%ptvz{} (W!()*,/3%579;=%CFGM%QWX\\^cdg%ilnprtvy%} (X!&')%.468CDHJLMOPSTWY%\\_b%dg%ilnprtuwxz%|~ (Y!'(*+-469%=?%GI%KO%RT%V[%_bdikmnptuy{}~ (Z!&')+%-/%;>@ACE%GKMNPR%TW[_%ikmo%rt%vy%{} ([!'(%+-%024%;=%BD%LO%QSTX%[]^`%ce%y{} (\\!()+%/1%7:%LN%SU%WY%cf%im%prt%xz%~ (]!&'%*-%/1%68%EG%cgloqs%uwx|%~ (^!')%-/02356;>FJKOPRSVWZ%]_`dfi%kmor%vyz (_!'+%-124%68;=@ACE%MOQRUVX%]_adegjqwx|~ (`!&)*-%/689;%=?%ADFIKLNOVX^%cehilmoq%uwyz|%~ (a!'),%/124%=?AD%HJ%PRSU%[]e%ho%qu%~ (b!()*,%.024%79;%=?A%FH%KM%WY%`c%ei%loq%tvy%| (c!'*+-.1346%8:%<>%GKLOQSUZ%\\_cghjltwy{| (d!(,/1%4679=>@D%JLMOQRTVWZ]`%ce%km%pr%tvy%} (e!+,-/0279%;>?DQW[%]_bdhqu%wy (f!&().47:;>ACEFHIKMP%SU^a%egikm%tx}~ (g!)*,.02%58<>BCGI%MPY[]`%bdeginpuv (h!(*-2%6=>A%CF%KMPRT%WZ\\%`deg%ln%qswxz{} (i!&+-%/1%469;>@AD%HJ%MP%TV%Y[\\abdh%mrsvx~ (j!&,%.0235%7:;>@%FH%PRTVXZ\\_%cf%hjkn%puw%{~ (k!').04578;=?%CFI%NQRTW%^`acdg%ilmo%ru%wz|~ (l!&(*%,.%9=%ACDHIK%OQS%U[%^`%ce%hk%ru%{~ (m!&')%79%CE%KM%PR%^`%hjkmnqxz%~ (n!&(*+./2%478<%>ACG%WYZ\\%^`%cgmnp%txy{} (o!&'%)+,.5%9;<EFHJOQS%UWX[%]`%dj%mp%tw%} (p!&'%)/2469%;=?%AC%KN%TVWZ[]`aefhk%mo%vxz%} (q!&'(,-/024%69%;=?%AC%EG%IK%NPSTV%Z\\%`b%eg%tv%| (r!&'(*+-%/1%57%<>%BE%UWZ\\^%`b%il%ps%ux%~ (s!&)%:<%?A%CE%OQ%SU%bd%ilnpqstvwy%~ (t!&')+,.%246%9=>ACDF%ILNRVXY[\\ac%fiklprsvxy (u!&(%,.013%?BDG%IK%MRVXY[%^abeg%jl%ostyz}~ (v!'(%,.013%9;%=@%CIJMOR%VXZ[]%_a%lnp%rtv~ (w!&(%+-/%24%689<=?A%CE%KNPR%VX%Z\\%`bcf%oq%tv%|~ (x!&'(*+-%5:;=%@B%SU%[^%km%svxy{%~ (y!&(),%1346%:<>@B%DF%HKMNPQSU%Y[%qs%~ (z!()%ACEFH%OQ%_bfnpqwx{}~ ({!&)+-%023569=ADEG%IKMV^%`c%fhinq%swxz (|!&'%)+%-/2%:>@ADEG%KMO%U[\\^`acefi%lnpquwy|%~ (}!&(+-%02%578:%<HIKLQRW%Y[%]_%bdgil%ruw%} (~!'(%*,/%35%7:;>?AI%MP%TVZ%\\^`be%hjlnoq%vx%} )&!&'%+-%356:<>?ABD%MO%TWX[%`b%fhj%mopr%vx{}~ )'!&)%-/%69%@BCG%QSTVX%bdghj%mo%{}~ )(!&'%9;%=?%WY%eg%mo%{} ))!'(+,2458=>@%DGHLOQ%SUVZ[_f%mp%twxz%~ )*!()-%025%:<%BE%IKLNOR%`dfhmp%rtwx{%} )+!(.137%:>%BD%HJP%SU%^a%fjkm%pr%} ),!&(%02568%:B%DFI%KMOQSVWY%[^%aehikmo%uxz%|~ )-!&'%358=%@B%DGIKLORSVX%Z\\^a%cgjq%suwxz~ ).!&(%+-%2467:%?AC%FI%MRSUVY^%`e%gijmnpqstwz{}~ )/!&()+,.9%;=>BCEIJLPQT%V^%`b%fh%loprv%|~ )0!'(*,-/%1457%:>?GJKMNPWY%[^%acdg%jlnp%ruwz{}~ )1!')*.035%79:=%DG%IL%PR%TVWY[^a%ejqruwx{%~ )2!&)%,.1%37%;=%@B%EHILO%QS%eg%nprtvwy%{}~ )3!&'%*,%/1%47%=?%BDF%XZ[]%ac%jl%txy{%~ )4!&'%+-%24%68%<>A%EHJ%Z\\%ik%su%z|~ )5!/058%:<?B%EGIK%NQRT%X^`%bfklq%suvx%~ )6!'(+4578:;=>@D%FH%KN%SW\\_%afijlmp%su%wy%{} )7!(*+-59;?GHJKNTUZ\\_b%ejm%pt%wyz|%~ )8!&(%*-78:=%?ABD%ILMO%RUXY[b%eg%nqu%wy{%} )9!'(*%-014%79;%>CEIK%MOQ%WY\\^cgijmnqsuw%{} ):!&')%+02%46%<>AC%GJKM%PRTVX%[]bce%ilmpqt%y|~ );!()%+-%/14%9;%?ABDFHIOQ%WY[%]_%ce%lnp%rt%} )<!()%.035%=@ADEG%JL%PR%UWX\\^%acfhj%lnpqs%y|~ )=!'(%*-%13%579;%SU%\\^%eg%km%xz%~ )>!'(+%.2578;%?ABEFHIKM%ORSUWZ%\\_`b%eh%jlnpqs%~ )?!&'(*%,/%146%8:<?@BDEHJLNPS%Z\\]`%bdi%lorsu%wz%~ )@!&'(*,-34;%>ABD%HJMNP%RTVY%[_%ac%egj%mor%uwy{| )A!'(%+-/024%:=>@AHIK%NPRSUWY%]a%cehik%mo%qsuvx%{}~ )B!&')%,/%35%=@%DF%JL%OQ%TV%oqu%|~ )C!&(%-/34689;?%EJLMO%QTV%XZ\\^%ceglnpqt%wyz|} )D!&)*,/0279:<%@BG%IKLPQSVY[]%`beghjkmoq%tv%y{~ )E!'+%-0258:=>@E%LNQ%Za%cgkmopr%tvwyz~ )F!()%/14%79@CEGHK%OQ%SU%[^%dg%imnrz~ )G!'),0%9DF%MOR%Z\\^a%hj%ln%pr%{}~ )H!&*%-/2357%@BD%IKMO%RTUWXZ\\%`bce%nps%uw%y|~ )I!&'(*%,.%2479;%FI%KM%TVWY%[]%`b%dfhik%{}~ )J!'(*+.01346%9;<>?A%EIJL%NPRTY%[]%befhil%uxy{}~ )K!&()+,.%02%68%?ACEG%IK%PR%TW%bd%gi%rtv%~ )L!&(%36%;=?%DFH%KMO%QS%Y\\%`bce%ln%twy%} )M!&'(*%46%<>?A%CE%GI%QSV%Z\\%ce%lnq%~ )N!&'%~ )O!&'%178:%CE%HJM%OQ%TVWZ\\]_%jl%sz{}~ )P!&'%136%9>AEG%JMNP%RU%Y[%bd%koq%wy|} )Q!&'%*,.018:<%@B%IL%NP%RTV%XZ%\\^%dh%lnrw|%~ )R!'*,2%48:=>@%CEFJ%LOR%VX%Z]_%aijl%nr%vxz|~ )S!&(%*-.2589;<?@C%FHJ%LNPVZ]^b%ehn%qt%vy{%} )T!&'-%/1249;<>ABGINTUWXZ[]%_bd%fh%kmqrt%y{}~ )U!()+,02%46;<>@EHLQ%TWY[]^`acdg%il%oqru%wy%} )V!&')*-.02359%=?EHOPSTVWYZ\\%ad%fk%mp%su%xz}~ )W!&),-/1%479:<>%@BDG%NP%SUY\\]_bcefhilp%rtvxz{} )X!&'(*,%36%=@%CFHJKM%OQ%[]^`%nq%suxy{%~ )Y!&)%/1%35689;<>@AC%FHKMPQTV%X[%^`%bd%fhjnpqs%u{ )Z!&)%24%79%@B%DFGI%MO%QU%^`%bd%gkmoqstv%|~ )[!&'%+.%024%=?%ACE%GI%KM%RU%WY[%]_ac%ik%mpqu%~ )\\!&'(*%-/%35%?ABDEG%LNP%UW%]`%jlo%z}~ )]!&'%DF%MP%VX%hj%ln%~ )^!&()+%8:%EIL%ORT%VX\\%_a%cf%hj%lnrsuvy%~ )_!&'%,246%8<@AF%IKM%Y\\^%`b%eglpr%xz|%~ )`!'(%14%8:;=@D%NP%W[%^`%mo%rtvx%~ )a!&'%+-/%359%=?%AD%GIKLN%SU%Y[%^`%ce%gj%nq%wy%{}~ )b!&'%)+-%/1%9;%DF%JM%VX%[]_%df%oq%|~ )c!&'%:<%EGIK%MP%RXZ\\^%dg%il%oq%suvxz|~ )d!()*-/%25689;%=@%BGHJ%NQSUVX%ce%psv%xz )e!&'%,1%35%8;=?%BDFG 'W!,-. &(+&.'&-~&'u'W!/1 ')>.<V')!@PBCFG 'W!@A4%;BC<= &'~&(!Kk '/!J;< '.!~| '/!>= '.u'/!K. '0`'/!94 '1t'0T'/!?Bu`\\Q1t '0!)* '/!xy2IH ';!*( &'}')!\\] '+{.;U&'q.>!&' ')Z&'t',5':!GF '9!eiha`;:ML ')e'-!XVWY 'W?'-!67%?#3$ '6!-.%@ '5!rs%~ '6!&'%, '5!^_%g## ']!67%?## '-!&'%1## .;!RST .>+.;!VW%~ .<!&'%U .>)'W!mn%~ 'X!&'%f#8$t%~ 'Y!&'%p#5$ &0!=>%MO%U#5$]%mo%u#4$ .9!89<=BC@AD%G##>?:;4#67#6$ &1!cd%hTi%~ &2!&'%)#12$*%/K0%I#10$ &.!()7 ')!=?O_ '+}',('-!\\]%_ '/!)37fz{ '0z'8!CD%ft%~ '9!&'%)-%/VW|%~ ':!&J '0P'W!>IJ#8$ &(!uU &+7&(T&).&(]&)6&(\\&)F&(a&+9&(`&)h&(g&+;&(f&*-&(n&+=&(m&+!?ACE &(!p^ &,a-Qc&)!_c -Qd&,q#1$'Z!&'%J#18$ 'W!MN%U '^`'a!@AN%PSv 'b!'*+. .93.>!(*# ',@']G#'):#0$'Yv'X!no 'Y!wx 'W2'X!pq .9!LM%UW%Z\\%ik%n -R!*+%6 'W3#10$'7!LM%~ '8!&'%>#12$ )e!HIKN%SVWabei%lnp%uw%y{%~ )f!'+%-23679%;@BCEFHIM%PS%_abdf%ik%rt%~ )g!(*%79%=?@BDFGIJL%OQ%TV%XZ[]%bdfgkn%prsv%y{}~ )h!&'(,-/3%9;%>@B%EGIK%MO%RT%cehil%or%z}~ )i!&'%)+,/13579:?%CE%HJ%\\^`eh%tvwy%} )j!'(%,.13%57%9;<>@%JLN%UY%hj%~ )k!&')%1357;=%CF%IKN%TV%Y[%bdfhj%mqstv%z|} )l!'+1369:<>%ACDFGJM%PR%UZ%ad%fh%npr%tw%{}~ )m!&()+%.0%2479<?@BFJ%NQZ[^_c%ejopr%uw{}~ )n!'(*%,047%:=>@%CEFHIMOQ%TVX%Z\\%_aeg%ilnrswyz|} )o!()+%-/346%=@%EGI%MOQ%TV%\\^%`b%iklnq%suw{|~ )p!&()+-.013%<>%FHILN%WYZ\\ (iC*r5(pM)89(gy(h[(gk)p*)o>*A;)s|*9E)ui)cO*s5*ux)R/({@(Z*)7s)B.(~d*4~)F{*42)@K)pg(_l)>Q)a|*2'*Jb(\\0(u2)4?)\\@*9t)8])5n(eJ(f+)|s(^7)mH))<)7>*Yr*ua)6M*2O(o@*t|*0J)cV)oo)E[)op);L(XR*W~)7F)z6)?3)hN);2)66*8L*xa)Dd)cf)61)76(Wo)k9(cY(a_*.d*b,))v)G`)Jk*6R*.k)HS)vH*E'*oR([d*U/*:L*4b(bm*L>(a&)p!]`bdelnrsu%wy%} )q!&'%-035%7:;=?@BCEFJLN%X[%^ac%egj%lnp%ty{}~ )r!&)+%-/%69%@C *B**t=(Yf(qR*{F({T)6!th )BK*V+++A)b})DT)um)12(c!`& *^r*4P*Wv*mT(Z=)e4(t-)1k)`B*K0(tz*:])Cj)}<)&|*/8)l*)TJ*[[*`!0t +3')Q4*cF)}()-`)v**@.*A<)Q!596 ))I)*v)nD*q<)>X),G).P*_0(s@*7;*a^*rQ*v?*_J*/W*X,)5](YH(e5(cm*_!9:< *a,)F:)-N*6j*JF+,1)3Y(`E)nu)-P)?.)\\_)Z'({u);N(^!A| )EP(T_)yA*{Q)_5)r!DE%GKNPQT%_a%ch%jm%rvwz%~ )s!&'%,/12469;%=?@BD%HJLN%Z\\%df%hk%or )mi)*e)gu*=C)<Z)7R*mh)T7(ci(b+):n*mu)~O(Wj))c*8V*5A*6\\)Wn)Sx*~=)8f(ck(hL*JC(pj(TS))K)Ow*'H*bn)/H)=:)f/*KF)D5)5i*W{)rS*Zw*eB)-M*=?*@y*z>(dx*E0)PD)1!mh )^Z*:;*8Q(Vg)SU*Bu)<z*)0)Ks)C7*;^(dK)}j(Y0(^X)UG(}G*[b):1(e&*;!AK )Eq)v7);C(|=(~@))6*TK)70)F'*V,):_)9r*G2*{`*T{*/a*nL(V;*q_*y+)@U)f))s!tvx}~ )t!&')*,.%18%=?@C%EHJNPSU%WY]_`cdf%hjkrtv%y{}~ )u!&')+-/04%8:%EK%RT%WY%_ (nv(|{)*'*p'([V*3}(d8)>Y)lB(i*(ZQ*Y,)6G*mQ)C[(ky)[T))*(f9)^m*^P)62)<Q)9[)-_)[n*bz*7\\*_A(|v)AX).|)S7*r>*Y(*JJ)<>)yh(pX)Lv)5,(fL(UE)z*)1i)[j*T>)6B*`V*~U)y\\(e`)n?)7k(c()Rg*_p),X*~:*2q+3k(Xj(}?*Xd*1T)?G)_?(]j(^~*D_)&Z({W)7'*d@)lq*ZZ)z?)2()~4(V[*/9)rl(TW*7f(`7(_m)M5(d^*[|*n^*sl)YY*rZ)J))u!`abdfgklnp%ruyz|~ )v!')+%28%;=%@BCE%GI%KO%RT%VY%[]%jl%np%tvxy{|~ )w!&'%*,%.0%6 )tu(\\&)se):o*N`(t*):B)(~){E)Ie(W[*8Y(j8(Tx)mR){])*!Qy *q>(`5(f=)^e)9.*n~(oe)@n)Ig*d[(hY)W=*.I*IY)5O*/1)mY*;=)vD*si*_/)2o)kM*T1)Ov(`T*XP)O3*3G*>{(n-(bn(Vb(Ta(_D*(G*d_*&i(YL*[t*&C){b);m)&g(\\**51)nL*(i)W6*1o)D6(zh(|V)vN)<[):r)9b)8<*ns);3*_O)}h)nt)5o(tM(fJ)P2([z)5P))n)P?(Vw*X7*Ji)-i*`f)w!78%<>%GI%MO%]_%cgil%oqt%|~ )x!&)*2457:%=?A%GJL%PSTW%Z\\%_a%c )/R*2s)7/(U&(cd*b~)9p*4J)@/)R5(X()1n)W+*TB),v*Ef)-7)82(^&*;v)G=(_s)8t*[=(ZB(~G)xH(|Z(`J)zZ)1<*a2)pp).B)-{)ov*[a)^J)om)}])s8(_f*ar(qU(X0)Z3*_{)>G)}/)e0)VG*1n(yJ)6x)++(nl*?3)}@))e),\\*`J*/U*y')9:)Y_)ut)_;(^D*uF(p5)l2(W~)l5)+-)1f(u-)Vc)Px)ue(eY*sr(_!>t )9A(eg*mF*Tg*Ys)cW)u{*G_*_~*Tq(e=)x!de%jl%wy%~ )y!&'%*,%047:<=?@BDF%HKLNOQ%VX%Z]`bdfi%oqrtvwy|} )z!&'%)+.%24578:; (TG)q/(eK*m<*xV+2S*o.({Q*S_(T!hb (^x*>m)47(ai)F>(Xy)0D(_.)Ts(^()6Y)?9*rW*UQ*`O)m|*c*)rJ)Q2)dO)eX*T_(qf)r`*XL)DA*oA*3w)+<)Wk(u_)|\\)s{*o<)Pn)?O*/O(q7(]v*qn(|W(s((f,*[g)>a*x_(my*mP)q>*`y)9?(gq(t!@` (o~*\\N)Cs*ZH*8U(`[)1p(qF*F@)&;+0<(YM*x}*Sv(w@)0O(d:)6?*a.*c/*{T)0B*2B(]d*2i(|r*{J)U-(Uy)z!<>@AC%QS%UWY]_%df%oq%uw%~ ){!&'%57%9;A%DHKMO%RT%VYZ_%adgh *X0(e.*0B)}c(WK(U<*qO)T*)h1*C6))N)lg*21)L')t3*mE*-4(_T)_h(e**_e*:q*X))dt*{B)T0(o-*9z)?[*4.)5[*r((uu(W:*S|*.T)>9*=U*uI(iZ*ye*4)(c9*Ta(e}*4>)+5)Sf*X9*9s*d.(f-)Q{(_y*.Q(oB)`C)S,*(9(tq(W8)/1)2K*(Z(Tv(|_)E7*FD)&C*ne*yU)mS)`&*`Z(^{*/^*Sz(to(_W(X=(f*(tQ)>r*4(({,)69)7,*^z)*4)R&)}:(WJ(Ya)CK){!ijmo%qt%xz%~ )|!&'%+-%79%BDEG%JNOQT%Y[]%ehikm%ortvy%{} )}!&'*%,.0135%7;=A )Uj)VM)x`*K6),T)l()6]*^o(Yx*eW)?I*5!Z| )+2*5{*Xt(a0*MY*XK(t3([\\(Vl*qk)cT*6K*Wx(|**S`*r:(uT*/[(g;(ld(kU*TI)>4)JQ*mL)po)Xz)*a)kn)D+)E])|l*3z*Xv)2F)y>)>]*Xc(^T(`4*mU*/y*3x*.L(~C)Wy)DE*&;)o}+&I*6a*0|*),):}*oQ)z^(fN(h7)O^):`)4}+04*4w)m=(a3*uT*>e)Fo*F&*qP*s1*nF(Tp(ea*.s)Fl*Z-*2K)C2)+0*1H)}!CDFH%KMOQS%XZ\\^abgikmprsuw%~ )~!&'(*+./13578:<%?A%GIJL%NQS%VY%[^%`i%kmnp%rt%{}~ *&&(pL*2u)Gq))-)>6(a`)0F+4-(X}*\\H(^8({b),P))1)Re)7[*Wz(^=*m\\(bf)SM*:M)eC(p,)Di*X-(tE*_-*=*(g@)~H(Wk)Sk(zt(vE+2X(eA*Ee*~r*UB*3~)>@*x^(n6*sd(`H)k2(`j(|?)7l*L.(UC)7:)/\\)H{(^?({O(^l*N<)~\\*{[*08)1o)^'*X/(]n)*n*`S)ix*N>(ni)tz)-6+42*qI*^R+'T*TE)oj)Fu)Eh*Z8*X5(`W*^t)Yr)HN*n_*bs(n9)E(*K~*_X(gs*&!'*%-/%246%:=>@%BD%FI%KM%OQRT%XZ%]_a%hj%lopr%wy%~ *'!&')%.124%@B%GK +&)(zy)Us)R-(V9({j*~Q*d7)3v*b5*v{(f/)VX(|0(_p(j**0=*2&)<i)8^)@:)43)0f)`3)R!^P (tU)DR*8J(sT(l|*Uu)QK*bc(uJ*2M(eT)Ue(fy(j=*<3*=2)Fk)y6(g7(X7(ee)pk*V;*qQ)Sa)V[*Xk*L<+0[*X:(l-+1o)my)-l)eL)0A(hN(V<)LG*J?)0+*^Z(go)_Z*Dm+06)U&({F),U*.<(j)(Y8)fG(f@(dP(ZI(ek(g'(U;)//)ib(su*>u*4e*G])e<*(z)XG*'!LM%UW%{~ *(!&'%*.%8:%@CDFI%KPQSV%Y[%]_`d%hjk ),d*DB(h~)6g(V&)SX)5S*9x(h)(c])fQ)Yi)l8(`,(b~*TA)KF)-n)/2)W8(o2)O4)gi)G-*_i*/T)8s)0|(hv)n5*Um)`>)VF({])*j*;g)2s+1b)v}*G@*'0)oy(_c)1v)`u)A3)*;)0&*Tr)^K)86*^s).H)0;*Eo(ms)Pz)0m)35(cX)1`)AV*X?)yu(WU)_k)RN*Sp*TV*.r*;y)@X(wu+'Z)UM)WA*UL)U7(WT)^F*<s)52)1Q*tQ*X')xI(_n(nz(q+)Cx)lu)z\\)yg)~P*(!opr%tvy{~ *)!&'%+/12458%>@%EG%NPQS%`b%vxz%} **!&'(*%,.%4 *3i*{:*`1)\\M*Sb+/q(v`*/!*J (ef)Df)HY*^{*'V*sc(e')/W)mb)Ry(d)(y2*.A)85(_S*55))9*@7)6C(^L(zs(WI)x>(`\\)18)UJ({!{y *S!^m )@+).W*r;(u`*/(*.D(kP)EC(t_(XU({m(aa*;o*xj*X>)l/*mq(Zw)z[(W2)EB*~H(y*)P5)pj(o=(|t)}N*qC)`w(^H*4-*97(uE*/E*;<)HA)Ex)v4)uS)7M)8r)~;(Yv(a+(_B*;e)KQ*g=*ZC*X1*N;*o/)~h(W1**!56%km%tv%~ *+!&'%= ([<*8P(`k*{D)WZ)Xv)VJ),7(\\s(vP(|d)UB)Rf)m**?<)GB(t|*So(c/*dE*rC*AH)I:)w+)`O*4z(V8*bP)UC*~N(v{(mQ):d*nJ)sy(Y.*5E)eM*NL*{O*/u*.x(a@)>T*dI*^!im (eH){\\):L)9])ox)yp*J5*r,)5F(al*9I)G.)DU)9/)rR)|Z)TV*.m*N](vD)5.*Bo*9l)lI(ZO(V_)mI*TO(}O))F)}_)?F*eL(V^)Tz*M2*)~*o'(VY*U3*_l*u^)A;)xR*_b)_n)Ut*+!>?%JL%RT%~ *,!&'%F (}B(as*;[(^.*:|)rB)Af++l(V@)1J*(!nc *.i(V)*R|)A_*xh*uD(r[)>g*o])-h)mm*uA)|!LK (_3)_1){^):I){<*.:)gP*w&(U2)^S(UJ*d&(d_)>L)@0*7!u~ (g9(}6)m>*v2)7B)eE)ma(}J*~C*=-(}E(g+)sw(U+)S\\*37)7<)9&))0(^C*Z!+l *o0(Yz(eB)1g)_.(a()8a+0:(w:(ZV)qw(d-*.|)<2)>&)6L)9P(ZD)cS*NC(_&*S}*.w(o**=/*mZ(^g(ex)&N*,!GH%~ *-!&'%-/%35%9;%P (YS)|P)UV*bg*~Y(iy(gA(cp(gZ),=):H)JF(_b)36(_}(q[(b@(o1)tB)qK)+M)3E*)7)5w)6Z(V6)^p*29)7a)_f*uK(oZ*:I)E{)Hv)vX*xw)yI(sr(g^(eL)W~(]p(`U({Y*Tb*43(i<(p0)0L(o4(f1){@)0)(zd)9_)6c(e@)6&({~)E;(h?){e*:T*dK)+)*Ki(t^(p8)7x*Z6*4s(o:)~2(Y2).v({t)OP(c0)}d)e.)Fy)t4)qv)@@(_((U|)pm(~k){k*?&(tt+'Y([W*-!QR%tv%~ *.!&'%46%8HNUVp~ */!-:KQ_xz|%~ *0!&'%)+.%7:; *{])2N)Xt(oG)@O)8W(n,)7V)6,)+i*qc(of)73(j'*Fc*5u*_4(i_*<m)DJ*XV*@5(x,)FB)7P*&P*q`(^<)\\)*U;):\\*NB)4G*/G)_D)Y})hf)Jc)eh)+`*bT)CU)Uf)8o(at)d'*27(XN(vY*d>)_[)V@(b:(U=*t;*on*A})vM**-(]F(ou)<o*3h*(+)T?)Hr)J-(_*(dN)H))dF+1l*&S)ed)y3)ZR)hg)D3*eG++X)wf*<E*;i(el)FJ(U*(d?(ar)ts(d<(`C([_(Xm(YY*0!>AC%FHK%OS%UWX[]%`b%eghj%qsuw%{}~ *1!&'(*+/12457%=@B%FIJMOQ%SU%XZ\\^%befh%mqr )n-)|8*(B)SS*sS(a\\)j2(h;(Yr*31*<n*_o*oq)+_)/N)VB))`)>V*5c*nX)/})_>*.]*(^(_<)G[*(a*96(Tj*^p*eJ)An(VB*Ti)<V*3'(\\X)m;)bE(|C*_N)[L(Us)</*od)+l)?;(`1*KG)_J(ad)ez)i;)D|)vz*tZ(Tz*bA+,9)Vn(_N*XA(ez)78)gl*=T*t:+3p*mv(Wq*1)(_?)^P*rk(~Y*xf(eC(Vx)Y4)hj)K*)uG*{d)lV(`2)no)U=)F&(^9+4,*3((gD)}P)|,*1!svwy%|~ *2!(*%03%58=%@DEGIPQS%UWYZa%fhjoprtvwz{}~ *3!&+%.02%468%EH%MO%Z *r|(og)7L*r=)JK(vx):a*&5)ZN*rA*9m(cq*xe)+&)^d)9k(cs*DC++5+11)uh*tv*Z=*XB+0v)[D)xU)-9*r<)5J*~>(er*n7(Y,)?g(}!jf */V*DE)R6)-o)gA)Y|*/@)&9)8,(zz)Y~(d+(U^)9X)lb)6d*^X(Wa(Ve)ST*.P*Sw*>'*HJ*0?*`s*n})~d*~k*K}*>G)Tp*~P*.v(uU+1Y)gU)t6*Dv*~!6L (kb(et(pU(U]+1D(ce*_Y*54)ry*{g*F0)Yy*@k)C:)30)Zj*3![^_begj%oqrtv{ *4!'*%,0479:<=?IK%OS%Y\\cdfgjry{} *5!&)%,.%02367@BDF%HJ%VXY[^%`bd%hj *U4*9Y*;@)q2)Qs).d*<y)f>*:s*nt)Q;)si*my(c~*:p(^^)*,*V>*X8(U5)ge)E&)G_*dJ*tM)a4)SO)qI(xT*oB)Q/*0v)@p(|.(v-(x\\*q!7F (W'*=o*?J)Mp)px*o1)f.)H'(zo)qo*dn*uL*)3*`/*U'),b*'|)yP*N?)Sz*F^({})*1)HJ)q`*/6(^a(]r(b1(wD*/F*uM*:E):.)rk*Bv)yJ)X+)+/(uf*@i)^H)Qq)7))pX)>J)1/*qL)@W*H/+/s*nG(ej(g(*U7);~*5!kl%prtx%z} *6!()*-%13%68:<%>ADEG%JSU%Y[]%`bd%iklp%tvwy{}~ *7!&'%+-%25%8=>@%BDF%L )<&*C^)L>*6n)vk);o+'l)6|)Ci*<g(s'+1v)SY)Z_(|<*rB*To)c})E\\)71)d&(V=(v:)Q-(rk)BE)*D(bG)2|)Cf)q.)rM)d,)ze)7i(h<(fT*mS*b)(w7*.M)Qv(U0(uC*2F(tn(cf)l4*s[(m_)81*5<)0U*qH)Vy(ff*{V(^Q(yR*5((u{*tW(ZZ)T:(}A)7I(XB(cN*6M*`>)YR*A*)72)*c)vA)<b)93)/'(w3*dS+/o(}D)8`*2x({4(ig*o!KN )V()1()El)eJ(_P({8*7!MN%[]%_abdg%kn%svx| *8!'(%+./135%:=@D%GINRZ\\]_%cefhjl%np%wy{%~ *9!'(%.0 )7Q)T3)cy)60*ma*.W*5>)UO(^h),A(uA(ak)/D(u@)B-*DD)mC)8;)4[*)F*T^(h8)O9+/u)Pm*B{(fY([M)SR(ic*Y[)cJ))])/G)i>)77)9J)cj)-|)X4)U:)=T)[>)pq)vS)q<)lQ(`>(e8(U@)+4)?c*2`*4Z)6^(g1(`B)_0*Jk*Yx)T6(f|*4^(q**Ky*XT*r`*cz(XK)SI(jW)p_)te)6k)_{)[t)-Q*@D)H[)uX*&Y*6z)CI+0F)8x)v3(oR)tG*t})6!<n (aI)i=)Q7*9!12%48<%?BCGHJL%NPSWZ%]abegijny|} *:!()*-.01347>DGHKPU%XZ%\\^`acdfhj%nxy{~ *;!'(+-.2%;>?CEGLPR (i]*5i)mV)pG(cH)n)(\\y(}F*S)*&)([&)ce*~a*y_)ZA)k8)x9)<4)s3)7f*xq*X+(gl*35(U?(oM*:g*=p)*b(_`)kL*T((}T(oD)TQ*xg(wa)ti+'\\*_|*(E(`p)5m*nT(VZ*<B*>k*=L*?c(p^)Cr(n?)A^)Ub*U<)Bt)]E)C])OL)FI)56(v/(TI(_7)ZE)E^)S=(^B)HL(tm)Oy)lc)&a*5;+3<)?y)w!rk *~[*Xw(~.(UK(W<(f3(tw)tA(lV)Qt*_U),@)S+)T8*Sh)9H*;!STVWYZ]_%chj%nrw *<!,-%256:%@CDF%IK%MP%SUVY[]%ch%kqwz{~ *=!&')+,.013%68:<%>AE%GI%KN%P )0I)U9)d:)6)*m!Ax (cR*_R)~9(Vs*U1(Uk+1r*m!df (`g)[B*aB)UA*U?(qB)'F)O!2[ )E6(f_*6&*0t(rq*A6),w)6e)Ld*o:)>m)0])G?)s5(UA(Y1))/*v*)<Y*1g)&@(YX){S(_z*:r(TZ)/a){I*mY(Y>(VF)y^)i<(bL*:')=&)y5(|;)S/*u=*^e)R)(Zn(d5)WO)<{)Ad)R7)1E*xW*T[)*u)iD){=)yC(T^*b7)hd)RI(mo*cx)Ss*Y2(cI*Ea)C0*\\K(}M*~;)Wj*=!QRV%Z]%_a%cehj%msu%z|%~ *>!()%-3%:<%AC%EH%OQ%Z\\%`bg%jln%rtx%z|~ *?!(*,- (e3(wQ+3w*YJ(dq(nD*y.)D(*do)Sw(^4)mn)7])dq(`R(a^*/{)^o)o*(d*+0A)K-)uJ*s]*K^*13)`_)b:(^U)E_)k:(sc)=l(mL*Sf*{K)63*.o)1y)_o(sk(V!UN ).X*vy(W6*Sa(_v(uW*.E)5p(Va)@.)5**;M*?z*;x*Gv)ad)YN({p*.l(^c):()E`*3f*;N*IL(]7({1(uO*_B(U`)Rd(^1*LQ*^Y*q}*AI)if*nj*q?)VI*:S),n)<?)Tg*>2*6@++w(r6*X[(TO(dw*?!./%24%7;>@%GIKLN%QS%_abdf%hlmoqstv%y|} *@!&'*,-/%469:<?%CE%GI%SUVX%Z (WY)>^)G+(js(Tm):s*~d)6.(y+)ig*99)VL)Ho(\\e*<J)t7)C~(`S)SG*.K(\\9(i^)a.)}o)AB)h+*:Y)D.(}v(`:)aM*JI*q9*rK)<r*Xa*7,(i})R\\)5c*/o(rj(W_(i?*XO)A<(TP(|x*Kx)G|)8_)z,)_i*9T(bb*w/(|o(h:*b;*.g(u/*XJ*Eb*8!,- *Xf);J(|b)2x)V,)wh*S{)tl)l0(g&(Ws*\\G)W;(w;*._)x/)S6({X(x8)kp*4B)2u)Wa(so)k!u{ )d7(cV*/4*@![\\%ce%hjl%npqs%vxz%~ *A!&'%),%5=%AC%FJ%TVWY%\\^%bd%fh%prt%w{|~ *B!&' )qA)pt(a**4`(n_))P(tW)eZ)?_)Xp*T;(}=*De(cP)t()7h)@?(VT*yf*Dt({U*T*(eO)sp(Xa(}S*~@(v?),L)wd(sj(T\\)F2(Ux)7W*P[*`U(b')@x(j|(lZ*`:(Vi(Xo*eE*{E)Qo))J)/u({[*N@*T9)>1)5g*{k({?(|])9@(i'(e4)nq(^I*A+)E.)H4)PC)6U*^}(e1*82)Vt)m3(US*XN({')ao*BU)B!(p *0Z*FB+1k+2e(}c)Cm*`()FD)DD)5))|C(r])+L)>k)Zp*B!(),.%46%@C%IK%MOQ%SW%\\^`%fh%np%twxz|%~ *C!&'(*%02%57%E )0.(`Q*2C);Z*JN)l&))M)FF)7^*t`(e))c[*Te)R;)rH)z-(f2)s:*xZ*8<*TX)u1)CR)_C)?Q)<B(k})/O)y9(eU(Tc)P4*3c(|X(k*(mp(W!uw *{G));)Dc*2n)/4*xb*`9({B*Sy*TY):{*8x)=2(kD*:=*d9(Y`*)w*`W*(O(\\q(r))YG({v*T-*3`*dL*?M)~R*Dq*s!(, */&+&D)uj(~-)zv*`z*sD)x0(zi)8p)|x*@))H.(hX*/j)hq*)y*n[)5\\(q}(Vj({:(uF(r,*C!FGI%KM%QS%]_%bd%suw%~ *D!&'%+-%/1%@FGI%MO%QS%UW%^ )g')8/*[@*Z]*4R*:B)6o(eM)TE*d2(tP)/3)Rw(o0);P*X*)nv)Z((o>)MD)n;)[S*U8*Tl(oI)QO*Jp)v6)9Z(eV)_/)Rk(r0);0(q3)Ha*6m(hb*)-(ZH*\\V)Vo*YF)_m)9G)V>)Yl*/'*=g)Fv*`;)V{*rl*Se(t})d>*C1*6P)m`*PR)H0(`n*Zp*nk):/*xx*[9(iu(X5)C=(l})1U)V8(`](}N(tO)WE(rC)l-)kr)0E*84*5q)7{)DF*_s)qz*ZA*X4*mt))^(d;(f0)_E*D!acdf%lw%} *E!)*%-/1%69%=@AFHIMNR%TV%Z\\%^`cghmnp%ruwx{%~ *F!'(%*,%.17%9<%?ACF%HMNP%SVX )RG),4([3(VA)+C)8K*8g*`R)G**dB)sA(ei*n6)-H)|R)GP)8V)}f*.y)n&([N)6X(tZ*`G(_k)y;){G(n:)-v*`L)U~(}e(n[(em(]y)X>(mw)9`*xs*6Q*FW*LV*`8(e{(}t*79)7@)5t*5\\+0,*r6*~!8F )IU(ur)7=(i7)8'(gr*Et)U8(vw)k<*Jz)O|(t<*UW),l)Xo)gc*x](T~)_y({C)us)8N)AJ)p/)1K({R(wd(TM*6')Rq)gE(V5)Dn*09)-d)@C)CY).c(uQ(vu*F![]_abfh%jl%oqrtuwxz%|~ *G!&)%/3468%;=%?AC%HJKO%VXZ%\\^`%ch%jmoprsuw%{}~ *H!&(%.0%4 )(n).9(d'*vx*_n)Fx(n0(i()1_(U')[3*/5*:5*=q(vH(W!Ze (}C*.F)Ch*@r(fw)lL*4G(i{+'g(X/)Ww*Tw(|g)3>(cz)nj)Ws*D~)?)*qJ*.S(f?)zR*)a*q=(k(*1P)kD)8.*FY)VD){c)5-)?C(cv):@)S1))3(f`*m[(U9)Rh*TP(}P)@)*9c)H((f!B8 )Q+)Ox(V()8S(cW*8>(WH(Y7(oA)5&*tB)AT)d.(bg(ab)0x*TS)@])ai)Du*MR)u.)t2)A`(l)(f<*n{)d?*H!5679:>@%BDF%IKLNOQ%UW%Y\\%`d%jl%oq%tv%y{%} *I!&'%/1%46%9;%@B%IKN%QS%WZ )yx)0H))T)0b*6o(t;)1\\)aT)_q)YB)RW)dE)MH*K2))u(UM(xu(j<*n=)Tl*)R*s6)5+*.`)ru*Dr(c2*tb*_')Aw)&4(Y))eY(TQ(d\\(t5(ep)98*o)(]m(Vm++P*.>(gc*W}*J2*8W*qA)V1),c(y5)A.*r_)gj)fA(du*6L*{Z*10({a*r!mF *.Y)q8(dX*ow*{n)~l*Lp)XI(UN*1c)x6*TJ)1s(gx(V?*xY))?)L~(\\M(en*Ul*>1)u9*tH(`d(h@(m8*nZ)V+({l)Vi)AC*I![\\%hj%oqrt%vx%z}~ *J!&'%),%13468%>DEHKMOQ%TV%Z^adeghjl%oq%su%y{%~ *K!&(*%/ (|m(zm)FT*3s(iq)|~)>C)I|(V/)OY*G7*uv(c^)80);@*b0)?>*4E*Tt(^e)H1(d.*I0)4=)Sr)TP*U-(}V*BP*9v*nf)O5*_,)?R)/-).N(Yj*I|)@h*67)f<)1z(^@(`+(on)-F*b(*J**df)*g)D4)/Y(vG(]i(_i*4|(bp)S'*sa)aZ(WL(Yw*1-)C{(je*nb)y8*Jt*.}(rw)5(*tD*DN(k_*x[)-t*Su*?u*d+(e6)@6)*~)lY)0=**l(xA*/!+. *^S(jG({Z)1,)?m)g>*K!13%57%;=%@B%EHILMO%RT%VX[\\_%cefkln%twz%| *L!&')+%-/%57%;=@%DH%LN%PR%UX%[]%_ac *`A)oU)qi*.t*u_*BA(zv){:*t.*Iw(b3)a_).5)@5*TF(|Y*~9))))PB)Rb*S!jl *`B*_V(dA)7&+/!v} (fD(Tq*:+)cw*E7)&i*J7)VR*sb(g|(V.*Ss)`2(gh*qX)_a)WC)pi(Tk)tI*FT(~U),3*Nz*x|*q])^i)Sm(tj)9a)q|*J+)ZS*9:(qa)bL(dB)tO*s^(hS)-J)`Y({k*T~*~V)P<(tT+0&)y_)DM)6/(XQ)mE*0r)T`*r))R.(W+)mv(^G)Fj)Z}*a_*6B(uc)i~*L!de%lnoq%~ *M!&'%03%8:%MO%QSUWXZ%t );M(},*aD){W*U.(vN(gW*7y*<+*MT*26)IX(l<*2l)cU*eI(_)(UL*xU)9N(T`(eS)C1*5v(tB)VU(TF(sx(cJ):5*nK(Y&(WE*JA*xp(t]*a6)ys(V~*4t)m5)S0({S(v\\)-A)I-*Du(ZJ)):(UF)sq(Vy*9A)6T)@\\*ap(}~(VS)-]*7?*`p*3a)mO(V:*KY)26)P~).Q(U6)pc)Y:*TG*Sk*T!n5 ),?*22*1[*.h*;J*<'(mu)Pp*w,*r*(vo(e|*nP)W5({|*{C(}>),R*s-*M!uv%~ *N!&'%:=GM%OQ%SUWY%\\^a%df%hj%ln%y{%~ *O!&')%> (d&*:_)LN(x6+0g)+**/i*<u*>!./ *;|*G0*__*Xb)pa)-U*xv)uH)@i(h1)7O(XE*7<)ml)+N*sj*ZX*F;(g:)TH)V/)R?)0X(b/)k~)*l(WS)0y).r(}))l.*b4*ms)d~)Sg)X)*cv)CG(e!(P (X3*eD*TU(d~)*k*_S)W.(U{)p[)JU*DR)2A*8&(X;(Yg*`v++0)20)W!g^ *r{(Uu(wL*t,(TT(~+)y1({>*TQ*1L)gC(pi*9R*bG(e^*a&(j[)&=).,)2/)OD)e]*46*PQ*O!?@%^`%hj%~ *P!&'%@B%H )Up(|1*KZ*xd*Uv*~7+0*)WT(^p(]h(p-*J_(dU):S*_&(n)(f\\(nB)fR)Y(*/Y*_m*:?)2f)/Z*rX)C.*.@*Y!1j *mX(~_*(T)CF)1&*qT*2N(U~*bm(bh*r^(]f*_a*As*d1)AE*w.(ze(c,)tm)D')Fp(gt)^Y({g*^g(^Y(nd(g\\)=f)Ar*X!^C *5:*>v*aL*)6(_r*CH)E/)@2)\\.*E?*[v(lX*`X)ot)^Q)b\\*W|)7S(`3)TR*X<)/@(rv)3\\)C<*X`)5j(jS)Wm)Ck*^Q*P!IJ%PS%Z\\%~ *Q!&'%R *n;*qG)qh)F8)Jw(g6(U:)_:*T,);^)?-({<){J(Zj(|F)sI)QA*PA*(H)Sl)ph)?K*_()''(}Z*D,)F;(co)54)|F)XL*/>)L<)|M)-T)Zr),])9D)VK)D;(TN))X*X&(Vk*4D)o&*s9)7E)@v)6A)Sj*Xu)a7*0Q(]k*3d(eI*aM)6[(hD*F2*_**2;*nq*@o*_j)UU)h.)?A)q_)kZ)t\\*7t*Ww*m;(Y/)Dz)m]*T.*tK)8@*oH*r+*?i)84)r()-e)e\\(Uv)/F)>o)7Y)Ou)>:*Q!ST%uw%~ *R!&'%;=%[ ))o)mk*bW*S~*9d)E))>*(f5*FZ)ss*4&*5-)RH(U8*.a*3))q4)I5)PO)6*(Zl(Xf(n|)7q)Ot*Ye(eG)@1*.R).b)8+)9o*7!lm *0V))d)&,(`P)Aj)ya)z9*X()^t)mx)Yv)Si){X(Ts)p^).k*mR*JU*.b)yE*4C*eH(W!-R *8?(fl))&)U.*T0*(U*^^*3u))b(g=)pJ({P)A,*~n)hA)F]*Ev)Co)f=*T!\\? *`H)|f)_])a>)7.)s7(kx(U(*>a)E}(aj*E[*X.*nR)}e*R!\\]%{}~ *S!&'(*%\\inx *T!+4Nm *U)(X1)T=)x.*~E)6V)cH)7g(TY)tK*^V)<]*XZ*&()GC)*s*KJ(uS)<K(sm)d{)I6*o&*`5*XX(oC*/A*Tj(_9)8Z)7C(cb)G&)i**:o*cy(i=)r')^W)UF(^E(gS*XD(vs)Yc)Vg(zl**)(Vh*(-)Yk(z`*7c)WW(zg+&t)HV*Zx({N*/=)/m*.O*b?*Xp(tu):,)yW*YZ(ca)?q)x'*T)*r1*.^*mn*-u(k{*d])C>*0R(|h*aT)@q)).(X2)Ej([1(X>(o3)+=#2$*U!CD%KM%PSUVX%_a%df%kn%tw%} *V!&'%)-%3568%:=?%EG%IK%_ (Uz(TR(]e(TV),<(cT(T[(V,(Td+'J(z|(lW(Tn)y2(U,(b}(U4(tS)cY(c})Qp(mt*4h*{l)Q3)re+2\\(T|(V3+2U(U!IV (V'*9O(zk(ie(kV(VX(d!CSY[d *uP*X](c)(eR(c!5=M *X\\(c!ur (_!u{ (`!(GMYZfx{v *?`(a!>CBQT (^N*0<(V!OW]V|u (W&(Vr(W!V.] (XF(W!0`bDf (X!@I )>3(X!<? *V!`a%~ *W!&'%f (X!A9 (W!mx (X!XVskeq`] (Y3(X^(Y5(Xv(Y!oqsNcleZh (Z!(Y| (Y|(Z!\\?^].L<UX ([U(Zs([,(Z!x~ ([!CR|~ (\\!'8T (]+(\\!kjdl (]!,0 (Vq)RD(X!:G (YW+43)RM*'}(^:))E+1g*{m(^M(t:(b!au *O((bx(_^(t?(]z(V4(]{(VG*JL*K)(VI*5?*KW)xQ(zD*I:*1G(^!w} (_!0/ *W!gh%uy *X!QRW_eh%jlnoqrx%~ *Y!&')*-%03%79:<%EG%IK%WY]^`bdg%iln%qtwy%{ (_:(^!bnq *S!]cdgqrt *T!&'/326%8:<=@CDHLMRTWZ]`cdfhkpsuvx%z} *U&*T|*U!(*%,02569:=>@A (cx(d0*q!lqp *r'*qy*r!328?JU]bhj~ *s!*4M *a!vz|x *b!2':9<@ *Y|*Z!&'*.%03%57;<>%@BDJL%RT%VY[\\^%ac%jnor%vy{~ *[!'()+%-01348:;A%EH%MO%Z\\]_`cf *b!>6UKDVJMYlhb]aqu *c!+1OKP^\\fps (`'(th(a!cmn (b&(hQ(b!8>X (e<)be)s[),1(_!ho +'G(dl),>)lW))7(o/(p!3+ (rV(s!;DP (n!ehfoujk (o?(n!w~ (o!LhNi_^KPYV (p!7. (oo(p!<Y1> (ov(p!*_bdc\\B~y (q)(p!ng *[!hjl%prsuw%y{}~ *\\!&'%*-%/1%79;%FIJLMO%UW%ik%~ *]!&' (q!<>. (pw(q!1OJuQ (r!=DYarX *{}+2^)4t*9!@DFVQoKUX^`r *:!&, *9w*:!68Q *9!_~u *:!9:/ *9!p{hqf *:!2< *9k*:!OweR}uJb@FziA *;!&/ *:t*;!)* *:!NC *;!1fpq *:v*<N*;!QIF *<W*;!sDd\\XtU,uBOH{z *]!()%~ *^!&'%. *;!}0~ *<!(&)*l4op\\fOXA8re9t7TZdvx} *=!dH; (q8*=!{n@`9 *>!&B *=!ti7Brf[\\M( *<|*>0*=!SD *>!f[dc} *?!89+:) *>!FPs *?!'=? *>!;w *?!r~ *@!(> *?n*@+*?!{pk *@8*?!RjeH *@!=;d )kc*A7*@H*A8*@w*A9*^!/0%OTjv| *_!.1%35%8;=%@C%FHIK%MPQTWZ%^`cghkqrtx} *`!')*,%.2%467?@DFKMP *A!U: *@!WT *A!XGgc]y )s0*A!Bqz *B!JN-5 *Ax*B!TB+_]Vyg *C!)LtRvc *D0),!;E (t!bg *2m(t{(u'(t~(bw(}!'*19 )5h)6!-b~ )7!4DAX )83)7`)8!J\\T )9e):U)9!)2Fl )8~)9!dB )8z)9!ft ):!QW?^ )9|):!=- );X)9!~v );!KG ):!jz );&):k);!,'d )<1);s)<C*`!QT[%]_%dh%loqruwx{}~ *a!'(%+-3%589;%@CEFH%KN%RU%[]`c%fhik%oqsuwy{}~ *b!&*+-%/138=BCEF )<!'deFgm} )=!+86]y )>)),H).])ko),N(cn(e!NZFEXosc (f!OV%XZG (e~(f![]'6 (g!-? (f!{uh (g!EF/ (f!zj (g!H{Xm_}RQ~ (h&(fv(gN(h'(g!fjw (h!+,. (g!TUO (h/(gz(h!0m9rOfEtuacy| (i`(j!/U (i!Bf:N8I5 *b!HILNOQ%SXZ%\\^%`d%fi%koprtv%y{%} *c!&'%),%.02%EG%JL%NQ%[]_%eg%oq (i!0On%p,)U (j!+r (i|(j!QY( (iz(j?(iw(j!v1 (it(k&(j!]^49 (k!1> (ji(kf(jq(k!23 (jt(k-(j!}d (k!6,9: (j!lm (k!/<+ *^~(k!eOSHkjEGnt (l!F'E (ks(l!;PGJ:BtR_Yijs (m!(Dilrv (n!1'5;@FEX ))!Wa\\Yy )*!*+ *c!rtu~ *d!'(%*,-/034:%<?AGN%PT%XZ\\^bcg%mp%ux%} *e!&'+%.1%46%ACFKM%VX%` )*!&3CJMP (~!8&9<B4DE=FHaNiXW]Omcp~ )&7(~w)&!8UVzy )'()&!wqYn )'!R8.7fUiWeEDcn| )(!:> *U~)(!Xf )-!W[fkmpy} ).!'38@G *J@)-E)d!ruy|} )e!/-:9>T[U^`cm_of *e!ab%~ *f!&'%g )eg)f!*&4 )ev)f!10(5L8?KDc`js )g!&)8 *8;(tK*yn(t!J( *{!8<%AILRUY\\_befh%j )*o)+')*z)+!,;6OKTI *XS)+!hgq~ ),'*73).!OTaZ )/5).y)/6).!lo )/!078 ).!ux )/!*KgXMA?[]<qS )0!QRTS )/t*f!hi%~ *g!&'%<>%VX%p )0!CVos )1-)0!v\\ket )1!l;1]XFZ4 )2!GM<J )1t)2!'5Rq )3!Czbu )4!,Ij ).h*sP*q!8:@BDEKMRSUWY%\\^ad%fhi (Tr)c])51)R!<[cQ )S!Q3>B: )R!op{} )S!4W~ )T))S[)T!LMF, )S`)T!5+O@C )S_)T!(DS *g!qr%vx%~ *h!&'%79%y )U5)T!|a )U!?D )T!\\Ync )U!'I*1 )To)U!KNP/ )V4)Uk)V!AC )UZ)V!67 )U!X\\x_ )Wd)V!jh )W!(X )Vb)W!*[0' )V|)W`)VN)WV)VQ)Wu)X!_?\\ )YJ)X!PwDE )W!|o )X5)Y!wI0x )Zl)Y!z=?USOoLg'Z7 )[!H,- )Z!cT8nu )[!1Z )Z!iHh )[!osr^Xb` )\\^*h!z{%~ *i!&'%TV%~ *j!&') )\\!V4FCOn{km| )]!NWOmi )^!*9 ({!7;LJ\\o )l,*~h);:(|!BL *L\\(|N*[<*Qv*_!Gdfv *`&*_!uzw *`+*_y*`!=<C^IENYmneg| *a!01/G7A: )BP*a!S\\agbj )-!4;:< (}@(gV(}!U^ ({((}!hk *1K),!gfj *9;),y+'S(}s(u!NPZvwp *j!*+%LN%~ *k!&'%.0%2 (ud(v>(u!xkq (v!F& (u|(v!K2yzQ|WLm (w'(v}(w!MO,>.[ (x)(w!epW} (x7*4p(x!l]9< (y!'T (xt(y!;= (xz(y!ILZ?OAEr (z!'&BGP (|!sz (z!ju ({*(z!acr *~!?ABDIGJKORTZ\\]`be%gijlmoq *.!9;=?BC *k!34%:<%~ *l!&'%: *.!GJXZ%\\cefjnquz{ */!),/023N7;<?B%DHILMPRSXZ]\\`b%hk%np%tv )*i)l|)(|)l;*at)g!HKh\\Y )h0)g|)h2)g!qmz )h!*)F: *x\\)h!kJH? )gt)h!Sp )i!2c.-0864 *l!;<%IK%vx%~ *m!&'%7DIKz *n!)-.4@Uvz )h!|{ )i!Id_]a )j&)iu)j!-K=/06:MWX?V )k()ji*v!|}~ )D!18C-N )E1)D!lOX} )E3)DZ)E!4*9 )D!p\\a )E|)F<)Ed)F=)E!u< )F?)E!eAf?i )F3)E!ODn )FA)EM)F!0ef )G!:;(< )Fw)G!>] )FP)G!/@ )Ft)GA)F!sq}|\\ )H6)G!iNQmE )HC)J=)H})I!GH )Hz*o!(4>DILV[aouvx%~ *p!&(%s )IL)Hq)I!3) )J&)Hd)I8)J@)Ia)J/)Ij)J!,S:OgG )I\\)KB)J!VW )KD)J!X52Hjv )K1)J!z| )K!J'7@U )Jd)KV)J\\)Ku)LL)Kc)L!45 )M))Kh)L!a[ )Md)L!mxR )M!R= )L!ZEu )M!@UTm[o )f!Je )P!:;@=KLFSTZc *^!UW[%]_`bacdfhklnqu *p!tu%~ *q!&'%6;NVbgjmor%xz%|~ *r!&-%0479@DEG%IL%PR%TVY[\\ac%gin%z} *s!&' *^!wxy *_!)+ *\\j)5!'37;>=A@H *7`)k!EJUegi )>/)@!789Sb )DW)@!L^I )^`)C5)@!f}z )A&)@~*2<)A!OD1?FQGgt| )B!>4Urs} )C'*X!236;=@EFHIGMUY *N!AD%FH%K )d!3d )c{)d!+4CDIPRTW )7r)8C)9h*s!)+.%02378:%CE%LNOQRTUWX\\_`eghmnpqs%|~ *t!&'%+/%24%689<>%ACFGIN%PT%VXY[%_acd );E)=,*2:)Q!JS]UYegfmux%z )R!(0+19 )>!0Pf )c!kptN *DV(`0*3!|yp *4@)CH*4!A5/18;k%n_FH]Q[ )CN*4!aouxq *5!89 *4v*5')CS*5=*Ue*5!aIWC]sw~ *6!F+,C2;NO?9 (q~(xw*6!ZTc )Ym*6!u| *7E)Cd*7!C4 *t!ef%moprsuw%{~ *u!&'(*%<?@BCEGHJNOQ%SU%]`b%fh%oq%uwy%{~ *v!'()+%/ *7:*6x)O!6IKUXk *y!XYZ\\`a )Pl),})P{*Nm)?2+3=)?!5^hfenptx )^![wqx )_!=B9-3jL )`!9<?XZ )a!C,8 )`n)aB)`s)a!HJh )b!*, )a!xp )b!WK^p )c!;F )^G)`A)a6)b0)5!ZY_de )w!ejps )x!,- )w})x!+3(1@8KV[kx )y+).!\\[ *v!01346%<>@BCEG%wz *w!'(%+-0%G )/n)0!63@ )/s)0!2< )1+)2!-4 )3!+wk )4!@F{ *3!]\\ )SA)TK)WF)t!+-5>LMF )?M)t!bQRn%pTqZaX^ )u!*I23 )t[)u,)t|)u!(Fwovcx} )v!&5<(W\\Lou )w/)vw)w!=NH^ +4.+2!>@A )q!1DM9GHZbYmfux )r!78.*AO *w!HI%~ *x!&'%N )r!ILftdgsx )s!-.>CK )l!7=KHEXov )m'*0!@IG *Oi*0!P\\Yaif )p!f~ *Ii*m!89:>=?@BCGJHM%OVW^]`_bcegi%moprw{%~ *n!&'(*%,/%13258%:<>?ABD *x!OP%Tknruy *y!*/%TVW[]^b%dg%mp%~ *z!&'%5 *n!CEHIM%OQSVWY]\\`acdg%il%pruw%y| *o!+,*-2357%9=?@C6E%GJMOPS%UW%Z\\_`^bce%mpr%t; )s!uz *sf)y!Me[c~ )'A)y!{z )z!=3 *z!67%:<=?%[]%~ *{!&'(+%79;HMNPSWX^ )z!XVp +1m*{z){6)oz)p!',2= )k!46 )l)+/!prx%| +0!)(-/.01589;=%@BCEHLNQ%SUZ]%chdj )m!68:DAPGWX\\hUTgfzq )n!.31/62N<GJ[KPWbUpc`d *{!aco%y{|~ *|!&'%u )nf)o.)n!mk )o2)n!x{ )o!1'50 )n~)o!?PFNH]a *1Y)|S){!>?FLN[lfrnsy *J!BGP[]` *K!'K<ANgShjv *L!F( *Km*L**Ku*L!ME?G6`Wbm *M!9N )m/*4i)p!KM )sj*2!HJLRVX[%]_^gAky| *3!*/FN *MV*x!X`c *|!vw%~ *}!&'%| *x!ilmotz{~ *y!&(),- *D!AH`bsnpo *E!C(&G8B>E.DQ_PiKULJdjO *F!+34/5 *Ek*FU*Ey*F6*E!zsl *F!EI:JLOKe}`gp\\ *G!'1 *F!vsky *G!(k *Fd*G!fgdIY5Wt<LeMBN| *H!?8b *}!}~ *~!&'%5<MSWX^_cps%y|%~ +&!&*,.%0457%;>%ACE%HJ%OQS%VX%[]_a%ikm%su%w *HV*G!qn *H!=' *Gl*H!;u<EC[cMaPZkzp~ *I!MJ5ARXps */w*0!*,- *80)|!gjupq )}))|w)}?)||)}![L>-BE498GR2lnY )~0)}!`qt )~!)6 )}v)~!-,KabsgXc@eW]fo *&3)~|*&!.?<GHLn`^qxm +&!xz%~ +'!&(%*,%68%:<%FHIK%RU%X^b%dfhjkm%~ +(!&'%: *'!(3/AJI *7!wz{}e *I{*8!ABCMOHKX[ST^dikoz *9!&/ *J!\\cf *K!]d *M1*1!,.6>?A *(,)>D*(!AMLNRblmqw|}xu *)!.? *95)B?*1!N]dtpux} *2)*)O**u*+!KS *-:*.5+1!VR *Xs*Y!+;8X *X!gm *U!RT *c!w}{| *d8+(!;<%~ +)!&'%A *d!65D=CQRFHM`Ydaevw~ *e!()*0/5 *U`+0u*Y_*Z!9S *[!N^ *Y!\\fcak}~ *Z!(, *Y!uv *Z)*Ym*Z!:EF1GI2WKbkmz|q} *[!/5.*2&>67FG?ekqdiz *\\!+0,8: *V!*4<7JF )?=*N!PXTV +)!BC%~ +*!&'%H *N!_ei *O_*R<*u>*t!-73JELSRnqt *u)+3!loq%vx +2!CPR *s!VYZko )sM*s}*g!Ww *h8*iU*j(*k/*jM*l!Jw ++!369%< )zB++!?BD%FHINOR%WY%]_abd%kn%qx%{~ +,&+*!IJ%~ ++!&'%/12478=>@CGJ%MQ^`cmr%v|} +,!,-56;<'%+.%02%478:= *u!gp|} *v!&A=5DF *~!{z +&(+0O+&!'+-2163<=B +'!][_a`ei *yo*z!;\\ *{!*) +&!PRW`\\l^jy +'!'+7; +1![\\ *-.+0!y~ +1!&)0 *k;+1!;=y%{~} +2!'.,*/4gqt~| +3!)*0 +,!>?%~ +-!&'%~ +.!&'%~ +/!&'%ntw~ +0!'+237DGI%KMPTV%Y\\efik%twxz%} +1!'(*%/2%:<>%CE%QS%UWXZ]%ac%fh%jnpqs%uwx| +2!&()+-0%35%=?BD%OQTVWY%[]_%dfh%prsu%{} +3!&(+%/1%;>%jmny%~ +4!&'%+/%14%8 .*f.+!Zv .,!oy .-!;<%>@BCGN%PRSV%X -R!XY%~ -S!&'%N")),oo=function(e){var t=Qn(e);return t.URI=eo(t),t}(no),oo),ro=ao;const io=function(){this._queue=Array.from(Zn.HARDWARE.HW_INIT),this._enqueue=function(e){this._queue.push.apply(this._queue,e)}};io.prototype.text=function(e){if(e){let t=ro.encode(e),n=Array.from(t);this._enqueue(n)}return this},io.prototype.print=function(e){return this.text(e),this._enqueue(Zn.LF),this},io.prototype.printQrFormat=function(e){return this._enqueue([27,74,40]),this._enqueue([27,97,1]),this._enqueue([29,72,2]),this._enqueue([29,104,140]),this._enqueue([29,119,2]),this._enqueue([29,107,72,e.length]),this},io.prototype.printArrayP=function(e){return this._enqueue([27,74,e]),this},io.prototype.println=function(e=""){return this.print(e+Zn.EOL)},io.prototype.setAlign=function(e){return this._enqueue(Zn.TEXT_FORMAT["TXT_ALIGN_"+e.toUpperCase()]),this},io.prototype.setFont=function(e){return this._enqueue(Zn.TEXT_FORMAT["TXT_FONT_"+e.toUpperCase()]),this},io.prototype.setSize=function(e,t){return 2>=e&&2>=t&&(this._enqueue(Zn.TEXT_FORMAT.TXT_NORMAL),2===e&&2===t?this._enqueue(Zn.TEXT_FORMAT.TXT_4SQUARE):1===e&&2===t?this._enqueue(Zn.TEXT_FORMAT.TXT_2HEIGHT):2===e&&1===t&&this._enqueue(Zn.TEXT_FORMAT.TXT_2WIDTH)),this},io.prototype.setBold=function(e){return"boolean"!=typeof e&&(e=!0),this._enqueue(e?Zn.TEXT_FORMAT.TXT_BOLD_ON:Zn.TEXT_FORMAT.TXT_BOLD_OFF),this},io.prototype.setUnderline=function(e){return"boolean"!=typeof e&&(e=!0),this._enqueue(e?Zn.TEXT_FORMAT.TXT_UNDERL_ON:Zn.TEXT_FORMAT.TXT_UNDERL_OFF),this},io.prototype.setLineSpacing=function(e){return null==e?this._enqueue(Zn.LINE_SPACING.LS_DEFAULT):(this._enqueue(Zn.LINE_SPACING.LS_SET),this._enqueue([e])),this},io.prototype.lineFeed=function(e=1){return this.print(new Array(e).fill(Zn.EOL).join(""))},io.prototype.setColor=function(e){return this._enqueue(Zn.COLOR[1===e?1:0]),this},io.prototype.beep=function(e,t){return this._enqueue(Zn.BEEP),this._enqueue([e,t]),this},io.prototype.clear=function(){return this._queue=Array.from(Zn.HARDWARE.HW_INIT),this},io.prototype.buffer=function(){return new Uint8Array(this._queue).buffer};function so(e){return/^[\u4e00-\u9fa5]$/.test(e)}function lo(e){let t=0;for(let n=0,o=e.length;n<o;n++)t+=so(e.charAt(n))?2:1;return t}const co={inline:function(e,t,n=" ",o=1){const a=32/o;let r=a-(lo(e)+lo(t))%a;return e+new Array(r).fill(n.charAt(0)).join("")+t},fillLine:function(e="-",t=1){return new Array(32/t).fill(e.charAt(0)).join("")},fillAround:function(e,t="-",n=1){const o=32/n;let a=lo(e);if(a>=o)return e;let r=o-a,i=Math.round(r/2),s=new Array(i).fill(t.charAt(0)).join("");return s+e+s.substr(0,r-i)},ab2hex:function(e){return Array.prototype.map.call(new Uint8Array(e),function(e){return("00"+e.toString(16)).slice(-2)}).join(",")}};function uo(e){switch(e){case 0:return"京东到家";case 1:return"美团外卖";case 2:return"饿了么";case 3:return"饿百新零售";case 5:return"京东商城";case 9:return"京西菜市";case 11:return"微盟";case 14:return"抖音小时购";case 16:return"淘鲜达";default:return"未知平台"}}function mo(e){let t;try{return t=e.expectedDeliveredTime&&-1===e.expectedDeliveredTime.indexOf("1970")?new Date(e.expectedDeliveredTime):new Date(new Date(e.orderCreatedAt).getTime()+36e5),_t(+t)}catch(ts){return"YYYY-MM-DD hh:mm:ss"}}const po=async e=>await sn.api("/v2/order/GetStoreOrderCountInfo","GET",e),fo=async e=>await sn.api("/v2/order/GetStoreAfsOrderCountInfo","GET",e),ho=async e=>await sn.api("/v2/order/GetOrders","GET",e),vo=async e=>await sn.api("/v2/order/AcceptOrRefuseOrder","POST",e),go=async e=>await sn.api("/v2/order/GetPrinterStatus","GET",e),yo=async e=>await sn.api("/v2/order/PrintOrder","PUT",e),ko=async e=>await sn.api("/v2/order/FinishedPickup","POST",e),wo=async e=>await sn.api("/v2/order/ConfirmSelfTake","POST",e),bo=async e=>await sn.api("/v2/order/SelfDelivered","POST",e),xo=async e=>await sn.api("/v2/order/GetAfsOrders","GET",e),So=async e=>await sn.api("/v2/order/AgreeOrRefuseRefund","PUT",e),No=async e=>await sn.api("/v2/jxorder/RefundOnlineOrder","POST",e),Co=async e=>await sn.api("/v2/order/AgreeOrRefuseCancel","PUT",e),_o=async e=>await sn.api("/v2/order/ConfirmReceivedReturnGoods","PUT",e),Eo=async e=>await sn.api("/v2/order/GetOrderInfo","GET",e),Io=async e=>await sn.api("/v2/order/getafsOrders","POST",e),Do=async e=>await sn.api("/v2/order/CancelOrder","PUT",e),Vo=async e=>await sn.api("/v2/cms/CreateQrOrBarCode","POST",e),Bo=async e=>await sn.api("/v2/order/GetOrderUserBuyFirst","GET",e),To=async e=>await sn.api("/v2/order/GetOrderStatusList","GET",e),Po=async e=>await sn.api("/v2/order/GetOrderSkuInfo","GET",e),Ao=async e=>await sn.api("/v2/order/ComplaintRiderList","GET",e),Oo=async e=>await sn.api("/v2/order/ComplaintRider","POST",e),Mo=async e=>await sn.api("/v2/order/PartRefundOrder","PUT",e),Lo=async e=>await sn.api("/v2/order/RefundOrder","PUT",e),jo=async e=>await sn.api("/v2/order/AdjustOrder","PUT",e),Fo=async e=>await sn.api("/v2/order/GetAfsOrderSkuInfo","GET",e),Uo=async e=>await sn.api("/v2/order/QueryOrderWaybillFeeInfo","GET",e),$o=async e=>await sn.api("/v2/store/GetBrands","GET",e),Ro=async e=>await sn.api("/v2/store/GetStoreAcctBalance","GET",e),zo=async e=>await sn.api("/v2/order/SelfDelivering","POST",e),Ho=async e=>await sn.api("/v2/order/UpdateOrderWaybillTip","POST",e),qo=async e=>await sn.api("/v2/store/UpdateStoreCourierMap","PUT",e),Go=async e=>await sn.api("/v2/order/CreateWaybillOnProviders","POST",e),Wo=async e=>await sn.api("/v2/order/CancelWaybill","POST",e),Jo=async e=>await sn.api("/v2/order/AcceptOrRefuseFailedGetOrder","PUT",e),Xo=async e=>await sn.api("/v2/order/CallPMCourier","PUT",e),Ko=async e=>await sn.api("/v2/order/ConfirmReceiveGoods","PUT",e),Yo=async e=>await sn.api("/v2/order/CancelAll3rdWaybills","POST",e),Zo=async e=>await sn.api(`/v2/event/TestUniAppPush?vendorOrderID=${e}`,"GET",e),Qo=async e=>await sn.api("/v2/order/GetInvoiceRecord","POST",e),ea=async e=>await sn.api("/v2/order/UploadOrderInvoice","POST",e),ta=async e=>await sn.api("/v2/order/BathUpdateInvoiceSetting","POST",e),na=async e=>await sn.api("/v2/order/QueryInvoiceSetting","GET",e),oa=async e=>await sn.api("/v2/order/QueryUnansweredInvoice","GET",e);function aa(){const e=new Ut;async function t(e,t){let n=await go({storeID:f("storeID")});if(0==n.code)if(2==n.data.printerStatus){let n={vendorOrderID:e,vendorID:t};0==(await yo(n)).code?V("订单发送成功",1):V("订单发送失败",2)}else{let n={vendorOrderID:e,vendorID:t};0==(await yo(n)).code?uni.jxAlert({title:"提示",content:"打印机已离线,但订单已推动成功"}):V("订单发送失败",2)}else V("获取打印机数据异常",2)}async function n(t,n=1){if(f("deviceName")){let r;r=1==n?{vendorOrderID:t}:t;let i=await ho(r);0==i.code?async function(t){let n={vendorOrderID:t.vendorOrderID,vendorID:t.vendorID},r=await un.get_order_sku_info(n);if(r.code){let n={orderInfo:t,skus:r.data},i=f("commitBTDevCharact");return function(){let t=f("commitBTDevCharact");e.deviceId=t.deviceId,e.serviceId=t.serviceId,e.writeId=t.uuid}(),void Gt.notifyBLEState(i.deviceId,i.serviceId,i.uuid).then(async t=>{12==t?(V("正在打印订单"),e.notifyBLECharacteristicValue(),clearTimeout(o),o=setTimeout(()=>{!async function(e){let t=await async function(e){let t=e.orderInfo,n=e.skus,o=qn.state.storeInfo.allStoreInfo.name?qn.state.storeInfo.allStoreInfo.name:"京西菜市",a=qn.state.storeInfo.allStoreInfo.tel1?qn.state.storeInfo.allStoreInfo.tel1:"18048531223",r=new io;switch(+f("printerRetrySize")||0){case 0:r.clear().setSize(2,2).setAlign("ct").print(`${uo(t.vendorID)}`).setSize(1,1).print(co.fillLine()).setSize(1,1).setAlign("lt").print(`下单时间:${_t(t.orderCreatedAt)}`).setSize(1,1).setAlign("lt").print(`预计送达:${mo(t)}`).setSize(1,1).setAlign("lt").print(`客户姓名:${t.consigneeName}`).setSize(1,1).setAlign("lt").print(`客户电话:${t.consigneeMobile}`).setSize(1,2).setAlign("lt").printArrayP(30).print(`订单编号:${t.vendorOrderID}`).setSize(2,2).setBold(!0).setAlign("ct").printArrayP(30).print(`${uo(t.vendorID)}#${t.orderSeq}`),t.vendorOrderID.length<18&&!f("printerCompatible")&&r.printQrFormat(t.vendorOrderID).print(t.vendorOrderID),3===t.vendorID&&r.setSize(1,2).setAlign("ct").printArrayP(30).print(`饿百取货码: ${t.vendorOrderID2.slice(t.vendorOrderID2.length-4)}`),r.setSize(1,1).print(co.fillLine()).setSize(1,2).setAlign("lt").print(`客户地址:${t.consigneeAddress}`).setSize(1,1).print(co.fillLine()).setSize(1,2).setAlign("lt").print(`客户备注:${t.buyerComment}`).setSize(1,1).print(co.fillLine()).setSize(1,1).setAlign("lt").print("商品列表"),f("printerGoodsMoney")?(r.print("品名 数量").print(co.fillLine()),n.forEach((e,t)=>{r.print(`${t+1}.${e.skuName}`),r.print(Gt.goodsGandle("","",`x${e.count}`)),f("isPrinterUpc")&&e.upc&&r.print(`UPC: ${e.upc}`),r.print(co.fillLine())})):(r.print("品名 数量 单价").print(co.fillLine()),n.forEach((e,t)=>{k("log","at utils/bluetoothPrinter/printerTemplate.ts:116","ZSW-item",e);let n=e.vendorPrice/100;r.print(`${t+1}.${e.skuName}`),r.print(Gt.goodsGandle("",`x${e.count}`,`¥${(1*n).toFixed(2)}`)),f("isPrinterUpc")&&e.upc&&r.print(`UPC: ${e.upc}`),r.print(co.fillLine())})),r.print(`共${t.skuCount}种${t.goodsCount}件商品`),f("printerGoodsMoney")||r.print(`实付金额: ¥${(t.actualPayPrice/100).toFixed(2)}`),r.setSize(1,1).print(co.fillLine()).setSize(1,2).setAlign("ct").print("商品质量问题").print(a).println(o),t.vendorOrderID.length<18&&f("printerCompatible")?r.setSize(1,1).setAlign("ct").print(`#${t.orderSeq}号兼容模式条形码`).printQrFormat(t.vendorOrderID).print(t.vendorOrderID).println().println():r.setSize(1,1).print(co.fillAround(`#${t.orderSeq}完`)).println().println();break;case 1:r.clear().setSize(2,2).setAlign("ct").print(`${uo(t.vendorID)}`).setSize(1,1).print(co.fillLine()).setSize(1,1).setAlign("lt").print(`下单时间:${_t(t.orderCreatedAt)}`).setSize(1,1).setAlign("lt").print(`预计送达:${mo(t)}`).setSize(1,1).setAlign("lt").print(`客户姓名:${t.consigneeName}`).setSize(1,1).setAlign("lt").print(`客户电话:${t.consigneeMobile}`).setSize(1,2).setAlign("lt").printArrayP(30).print(`订单编号:${t.vendorOrderID}`).setSize(2,2).setBold(!0).setAlign("ct").printArrayP(30).print(`${uo(t.vendorID)}#${t.orderSeq}`),t.vendorOrderID.length<18&&!f("printerCompatible")&&r.printQrFormat(t.vendorOrderID).print(t.vendorOrderID),3===t.vendorID&&r.setSize(1,2).setAlign("ct").printArrayP(30).print(`饿百取货码: ${t.vendorOrderID2.slice(t.vendorOrderID2.length-4)}`),r.setSize(1,1).print(co.fillLine()).setSize(1,2).setAlign("lt").setBold(!0).print(`客户地址:${t.consigneeAddress}`).setSize(1,1).print(co.fillLine()).setSize(1,2).setAlign("lt").setBold(!0).print(`客户备注:${t.buyerComment}`).setSize(1,1).print(co.fillLine()).setSize(1,1).setAlign("lt").setBold(!0).print("商品列表"),f("printerGoodsMoney")?(r.print("品名 数量").setSize(1,1).print(co.fillLine()).setSize(1,1).setBold(!0),n.forEach((e,t)=>{r.print(`${t+1}.${e.skuName}`),r.print(Gt.goodsGandle("","",`x${e.count}`)),f("isPrinterUpc")&&e.upc&&r.print(`UPC: ${e.upc}`),r.print(co.fillLine())})):(r.print("品名 数量 单价").setSize(1,1).print(co.fillLine()).setSize(1,1).setBold(!0),n.forEach((e,t)=>{let n=e.vendorPrice/100;r.print(`${t+1}.${e.skuName}`),r.print(Gt.goodsGandle("",`x${e.count}`,`¥${(1*n).toFixed(2)}`)),f("isPrinterUpc")&&e.upc&&r.print(`UPC: ${e.upc}`),r.print(co.fillLine())})),r.setSize(1,1).setBold(!0).print(`共${t.skuCount}种${t.goodsCount}件商品`),f("printerGoodsMoney")||r.print(`实付金额: ¥${(t.actualPayPrice/100).toFixed(2)}`),r.setSize(1,1).print(co.fillLine()).setSize(1,2).setAlign("ct").setBold(!0).print("商品质量问题").print(a).println(o),t.vendorOrderID.length<18&&f("printerCompatible")?r.setSize(1,1).setAlign("ct").print(`#${t.orderSeq}号兼容模式条形码`).printQrFormat(t.vendorOrderID).print(t.vendorOrderID).println().println():r.setSize(1,1).print(co.fillAround(`#${t.orderSeq}完`)).println().println();break;case 2:r.clear().setSize(2,2).setAlign("ct").print(`${uo(t.vendorID)}`).setSize(1,1).print(co.fillLine()).setSize(1,1).setAlign("lt").setBold(!0).print(`下单时间:${_t(t.orderCreatedAt)}`).setSize(1,1).setAlign("lt").setBold(!0).print(`预计送达:${mo(t)}`).setSize(1,1).setAlign("lt").setBold(!0).print(`客户姓名:${t.consigneeName}`).setSize(1,1).setAlign("lt").setBold(!0).print(`客户电话:${t.consigneeMobile}`).setSize(1,2).setAlign("lt").setBold(!0).printArrayP(30).print(`订单编号:${t.vendorOrderID}`).setSize(2,2).setBold(!0).setAlign("ct").printArrayP(30).print(`${uo(t.vendorID)}#${t.orderSeq}`),t.vendorOrderID.length<18&&!f("printerCompatible")&&r.printQrFormat(t.vendorOrderID).print(t.vendorOrderID),3===t.vendorID&&r.setSize(1,2).setAlign("ct").setBold(!0).printArrayP(30).print(`饿百取货码: ${t.vendorOrderID2.slice(t.vendorOrderID2.length-4)}`),r.setSize(1,1).print(co.fillLine()).setSize(2,2).setAlign("lt").setBold(!0).print(`客户地址:${t.consigneeAddress}`).setSize(1,1).print(co.fillLine()).setSize(2,2).setAlign("lt").setBold(!0).print(`客户备注:${t.buyerComment}`).setSize(1,1).print(co.fillLine()).setSize(1,2).setAlign("lt").setBold(!0).print("商品列表"),f("printerGoodsMoney")?(r.print("品名 数量").setSize(1,2).print(co.fillLine()).setSize(1,2).setBold(!0),n.forEach((e,t)=>{r.print(`${t+1}.${e.skuName}`),r.print(Gt.goodsGandle("","",`x${e.count}`)),f("isPrinterUpc")&&e.upc&&r.print(`UPC: ${e.upc}`),r.print(co.fillLine())})):(r.print("品名 数量 单价").setSize(1,2).print(co.fillLine()).setSize(1,2).setBold(!0),n.forEach((e,t)=>{let n=e.vendorPrice/100;r.print(`${t+1}.${e.skuName}`),r.print(Gt.goodsGandle("",`x${e.count}`,`¥${(1*n).toFixed(2)}`)),f("isPrinterUpc")&&e.upc&&r.print(`UPC: ${e.upc}`),r.print(co.fillLine())})),r.setSize(2,2).setBold(!0).print(`共${t.skuCount}种${t.goodsCount}件商品`),f("printerGoodsMoney")||r.print(`实付:¥${(t.actualPayPrice/100).toFixed(2)}`),r.setSize(1,1).print(co.fillLine()).setSize(2,2).setAlign("ct").setBold(!0).print("商品质量问题").print(a).println(o),t.vendorOrderID.length<18&&f("printerCompatible")?r.setSize(1,1).setAlign("ct").print(`#${t.orderSeq}号兼容模式条形码`).printQrFormat(t.vendorOrderID).print(t.vendorOrderID).println().println():r.setSize(1,1).print(co.fillAround(`#${t.orderSeq}完`)).println().println();break;case 3:r.clear().setSize(2,2).setAlign("ct").print(`${uo(t.vendorID)}`).setSize(1,1).print(co.fillAround(`#${t.orderSeq}`)).println().setSize(2,2).setBold(!0).setAlign("ct").print(`${uo(t.vendorID)}#${t.orderSeq}`),t.vendorOrderID.length<18&&!f("printerCompatible")&&r.printQrFormat(t.vendorOrderID).print(t.vendorOrderID),t.vendorOrderID.length<18&&f("printerCompatible")?r.setSize(1,1).setAlign("ct").print(`#${t.orderSeq}号兼容模式条形码`).printQrFormat(t.vendorOrderID).print(t.vendorOrderID).println().println():r.setSize(1,1).print(co.fillAround(`#${t.orderSeq}完`)).println().println()}return await r.buffer()}(e);!function(e){const t=20,n=20;for(let o=0,r=0,i=e.byteLength;o<i;o+=t,r++){let s=e.slice(o,o+t<=i?o+t:i);setTimeout(a,r*n,s)}}(t)}(n),clearTimeout(o)},500)):V("打印机异常请检查")}).catch(async e=>{V(e)})}V("订单商品数据异常")}(i.data.data[0]):V("测试订单数据异常")}else V("未连接打印机")}let o=null;function a(t){e.writeBLECharacteristicValue(t)}return{copyInfo:function(e,t="复制成功",n="复制失败"){k("log","at composables/useOrderInfo.ts:23","复制订单号,数据",e),uni.setClipboardData({data:e,success(e){k("log","at composables/useOrderInfo.ts:27","复制订单号,结果",JSON.stringify(e,void 0,4)),V(t,1)},fail(e){k("log","at composables/useOrderInfo.ts:31","复制订单号,复制失败",e),V(n)}})},phoneCall:function(e,t="拨号完成",n="取消拨号"){uni.makePhoneCall({phoneNumber:e,success(){k("log","at composables/useOrderInfo.ts:48",t)},fail(){V(n)}})},orderDetail:function(e,t){uni.navigateTo({url:`/subPages/orderChild/orderDetail/orderDetail?vendorOrderID=${e}&vendorID=${t}`})},deliverManager:function(e){uni.navigateTo({url:`/subPages/orderChild/deliverManager/deliverManager?orderId=${e}`})},printerOrder:async function(e,o){"0"==f("defaultPrinter")?n(e):"1"==f("defaultPrinter")?t(e,o):uni.jxConfirm({title:"选择设备",content:"请选择打印设备进行打印",confirmText:"网络打印",cancelText:"蓝牙打印",isReturn:1,success:()=>{t(e,o)},fail:()=>{n(e)}})},waybillVendor:function(e,t,n){return-1==e?t<25&&0==n?"暂无配送员":n>=20?"商家自送":"暂无配送信息":Nt.serveInfo.vendorName[e]},afterSalesDetaile:function(e){uni.navigateTo({url:`/subPages/orderChild/afterSalesOrderDetail/afterSalesOrderDetail?afsOrderID=${e}`})},bluetoothPrinter:n}}const{isTrades:ra}=tn();aa();const ia=uni.createInnerAudioContext();let sa=null,la=async()=>{k("log","at utils/bluetoothPrinter/printerOrder.ts:33","监听订单信息");let e=qn.state.storeInfo.allStoreInfo,t=ra(new Date);if(!f("storeID")||!f("token"))return!1;if(!qn.state.serveInfo.isNetWork)return!1;try{let n={storeID:f("storeID"),waitingSecond:86400};n.lastOrderTime=_t(+new Date),sa&&sa.abort(),sa=uni.request({url:D+"/v2/cms/GetNewOrderMsg",data:n,header:{token:f("token")},success:({data:n})=>{let{code:o,data:a}=n;0==o?(qn.commit("serveInfo/setUpdateOrder",Date.now()),a=JSON.parse(a),1==getCurrentPages().length&&uni.setTabBarBadge({index:0,text:"新"}),k("log","at utils/bluetoothPrinter/printerOrder.ts:75","订单状态发生改变",JSON.stringify(a,void 0,4)),function(){let e=null,t=null;uni.vibrateLong({success:()=>{clearTimeout(e),e=setTimeout(()=>{uni.vibrateLong({success:()=>{clearTimeout(t),t=setTimeout(()=>{uni.vibrateLong({}),clearTimeout(t)},700)}}),clearTimeout(e)},700)}})}(),"newOrder"===a.Type?(k("log","at utils/bluetoothPrinter/printerOrder.ts:79","监听订单信息"),async function(){if(!f("deviceName"))return;let e=await ho(da);k("log","at utils/bluetoothPrinter/printerOrder.ts:182","新订单信息",JSON.stringify(e,void 0,4))}(),1==e.status&&t&&f("isPlayShound")&&(ia.src="https://image.jxc4.com/image/e640abe4c40032490264674da03434af.jpg",ia.stop(),ia.play())):"newWait4ApproveAfsOrder"===a.Type?1==e.status&&t&&f("isPlayShound")&&(ia.src="https://image.jxc4.com/image/0a6fe4e82f2905e42012074f66f81698.jpg",ia.stop(),ia.play()):1==e.status&&t&&f("isPlayShound")&&(ia.src="https://image.jxc4.com/image/dafc928fa23d688ce71aa645f9b77c90.jpg",ia.stop(),ia.play()),ua()):ua()},fail:e=>{e.errMsg.includes("abort")||ua()}})}catch(n){V("系统发生错误请重启应用")}},ca=null,ua=Vt(()=>{ca=la,la(),la=null,la=ca},5e3),da={storeIDs:JSON.stringify([f("storeID")]),fromDate:Et(+new Date),toDate:Et(+new Date),statuss:JSON.stringify([5,10,15,17,18,20,22]),offset:0,pageSize:-1};const ma=Gn(e.defineComponent({__name:"userInfo",setup(t){const{previewImage:n}=tn(),{storeInfo:o,businessHours:a,goLogin:r,switchStore:i,switchOpenTime:s,setTime:l,jumpBusinessStatus:c,store:u}=function(){const{newMessage:t,logOutFn:n,getMtStoreIMStatus:o}=tn(),a=e.ref(""),r=e.computed(()=>{if(a.value){let e=+new Date(Et(+new Date)),t=+new Date(Et(a.value))-e;if(t<0)return"营业时间错误请联系运营";{let e=t/1e3/3600/24;return e<1?"门店将在今天自动营业":e>=1&&e<2?"门店将在明天自动营业":e>=2&&e<3?"门店将在后天自动营业":`将在 ${Et(a.value)} 自动营业`}}return""});let i=null;E(async()=>{await u(),clearTimeout(i),i=setTimeout(()=>{uni.stopPullDownRefresh()},1e3)});const s=e.ref({avatar:"https://image.jxc4.com/image/70143fcf48aefe74537533f35a0a8153.jpg",storeName:""});let l=0;x(async()=>{u(),await la(),s.value.storeName=f("storeName"),l!=f("storeID")&&0!=l&&uni.startPullDownRefresh({}),l=f("storeID")}),C(async()=>{await u(),await t()});const c=e.ref({});async function u(){await qn.dispatch("storeInfo/getOneStore",f("storeID")),c.value=qn.getters["storeInfo/businessHours"],a.value=qn.getters["storeInfo/newAutoEnableAt"],await o(),await t(),await la()}return e.onBeforeUnmount(()=>{clearTimeout(i),clearTimeout(null)}),{storeInfo:s,businessHours:c,goLogin:function(){uni.showActionSheet({title:"退出后不会删除任何数据",itemColor:"#e70808",itemList:["退出登录"],popover:{width:5e3},success:function(e){n(),uni.reLaunch({url:"/subPages/login/wxLogin/wxLogin"})},fail:()=>{k("log","at pages/merchant/userInfo/userInfo.ts:119","ZSW-取消退出")}})},switchStore:function(){uni.navigateTo({url:"/subPages/switchStore/switchStore"})},switchOpenTime:r,setTime:function(){uni.navigateTo({url:"/subPages/merchantChild/setBusinessTime/setBusinessTime"})},jumpBusinessStatus:function(){uni.navigateTo({url:"/subPages/merchantChild/setBusinessStatus/setBusinessStatus"})},store:qn}}();return(t,d)=>(e.openBlock(),e.createElementBlock("view",{class:"merchant-root"},[e.createElementVNode("view",{class:e.normalizeClass(["store-timer",{"store-active":""!=e.unref(s)}])},[e.createElementVNode("text",{class:"text"},e.toDisplayString(e.unref(s)),1)],2),e.createElementVNode("view",{class:"info-root"},[e.createElementVNode("view",{class:"user-infor-root"},[e.createElementVNode("image",{src:e.unref(o).avatar,mode:"scaleToFill",onClick:d[0]||(d[0]=t=>e.unref(n)(e.unref(o).avatar))},null,8,["src"]),e.createElementVNode("view",{class:"storeName-style-timer"},[e.createElementVNode("view",{class:"name"},e.toDisplayString(e.unref(o).storeName),1),e.createElementVNode("view",{class:"state"},[e.createElementVNode("view",{class:"tip",onClick:d[1]||(d[1]=(...t)=>e.unref(c)&&e.unref(c)(...t))},[e.createElementVNode("view",{class:"title"},"营业状态:"),e.createElementVNode("view",{class:"do-business-root business-active"},[e.createElementVNode("text",{class:"text"},e.toDisplayString(1===e.unref(u).getters["storeInfo/storeStatus"]?"营业中":0===e.unref(u).getters["storeInfo/storeStatus"]?"临时休息":-1===e.unref(u).getters["storeInfo/storeStatus"]?"休息":-2===e.unref(u).getters["storeInfo/storeStatus"]?"禁用":"未知"),1),e.createVNode(Yn,{icon:"shuxie",color:"#fff"})])])]),"00:00"!=e.unref(a).timer&&"00:00"!=e.unref(a).timer2?(e.openBlock(),e.createElementBlock("view",{key:0,class:"timer-root",onClick:d[2]||(d[2]=(...t)=>e.unref(l)&&e.unref(l)(...t))},[e.createElementVNode("view",{class:"timer"},[e.createTextVNode(" 营业时间段"+e.toDisplayString(e.unref(a).timer1)+"至"+e.toDisplayString(e.unref(a).timer2)+" ",1),e.createVNode(Yn,{icon:"shuxie",color:"#fff"})]),"00:00"!=e.unref(a).timer3&&"00:00"!=e.unref(a).timer4?(e.openBlock(),e.createElementBlock("view",{key:0,class:"timer"},[e.createTextVNode(" 营业时间段"+e.toDisplayString(e.unref(a).timer3)+"至"+e.toDisplayString(e.unref(a).timer4)+" ",1),e.createVNode(Yn,{icon:"shuxie",color:"#fff"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"esc-switchSoter"},[e.createElementVNode("button",{class:"esc-btn",onClick:d[3]||(d[3]=(...t)=>e.unref(r)&&e.unref(r)(...t))},"退出登录"),e.createElementVNode("button",{class:"swithcStore-btn",onClick:d[4]||(d[4]=(...t)=>e.unref(i)&&e.unref(i)(...t))},"切换门店")])])]))}}),[["__scopeId","data-v-ab6870aa"]]),pa=Gn(e.defineComponent({__name:"orderData",props:{saleInfo:{},showMore:{type:Boolean},_vendorPayPercentage:{},isNotQuote:{type:Boolean},isShowShop:{type:Boolean},isZero:{type:Boolean},isUpperfif:{type:Boolean},isOut:{type:Boolean},isAllplatfrom:{type:Boolean}},setup(t){const{wholeCalcPrice:n,singleCalcPrice:o}=tn(),a=t,r=e.computed(()=>qn.getters["storeInfo/isPointStore"]),i=e.computed(()=>r.value||0!=a._vendorPayPercentage&&+a._vendorPayPercentage<50?"实际支付":"实际收入"),s=e.computed(()=>a.saleInfo.count||"0"),l=e.computed(()=>a.saleInfo.actualFee||"0"),c=e.computed(()=>{if(s.value){if(a.isAllplatfrom||a.isOut){let e={vendorPayPercentage:a._vendorPayPercentage,actualPayPrice:a.saleInfo.actualPayPrice,shopPrice:a.saleInfo.shopPrice,isPointStore:r.value,isUpperfif:a.isUpperfif,isZero:a.isZero,isNotQuote:a.isNotQuote,earningPrice:a.saleInfo.earningPrice};return n(e)}{let e={vendorPayPercentage:a._vendorPayPercentage,actualPayPrice:a.saleInfo.actualPayPrice,shopPrice:a.saleInfo.shopPrice,isPointStore:r.value,earningPrice:a.saleInfo.earningPrice};return o(e)}}return 0});function u(){uni.jxAlert({title:"说明",content:"实际收入: 从当日0时到当前时间的实际获得,不再扣点,已扣除售后退款\r\n有效订单: 统计时间内,已支付订单中未被取消的订单数量"})}function d(){1==a.showMore&&uni.navigateTo({url:`/subPages/merchantChild/orderRealTime/orderRealTime?_vendorPayPercentage=${a._vendorPayPercentage}&isShowShop=${a.isShowShop}&isNotQuote=${a.isNotQuote}&isZero=${a.isZero}&isUpperfif=${a.isUpperfif}`})}return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"order-data-root",onClick:d},[e.createElementVNode("view",{class:"title-root"},[e.createElementVNode("view",null,[e.createElementVNode("text",{class:"text"},"今日完成实时数据"),e.createVNode(Yn,{icon:"wenhaoxiao",color:"#cfcccc",onClick:e.withModifiers(u,["stop"])})]),t.showMore?(e.openBlock(),e.createElementBlock("view",{key:0,class:"see-more"},[e.createElementVNode("text",null,"更多"),e.createVNode(Yn,{icon:"gengduo",color:"#cfcccc"})])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"order-money"},[e.createElementVNode("view",{class:"money"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(c.value),1),e.createElementVNode("text",null,e.toDisplayString(i.value),1)]),e.createElementVNode("view",{class:"order"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(s.value),1),e.createElementVNode("text",null,"有效订单量")]),e.createElementVNode("view",{class:"order1"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:+l.value>0}])},e.toDisplayString(l.value),3),e.createElementVNode("text",null,"运费")])])]))}}),[["__scopeId","data-v-0bf45b15"]]),fa=Gn(e.defineComponent({__name:"orderDataJxgy",props:{saleInfo:{},showMore:{type:Boolean}},setup(t){const n=t,o=e.computed(()=>n.saleInfo.actualFee||"0"),a=e.computed(()=>n.saleInfo.realEarningPrice?(n.saleInfo.realEarningPrice/100).toFixed(2):"0.00"),r=e.computed(()=>n.saleInfo.count||"0");function i(){uni.jxAlert({title:"说明",content:"实际收入: 从当日0时到当前时间的实际获得,不再扣点,已扣除售后退款\r\n有效订单: 统计时间内,已支付订单中未被取消的订单数量"})}function s(){1==n.showMore&&uni.navigateTo({url:"/subPages/merchantChild/orderRealTimeJxgy/orderRealTimeJxgy"})}return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"order-data-root",onClick:s},[e.createElementVNode("view",{class:"title-root"},[e.createElementVNode("view",null,[e.createElementVNode("text",{class:"text"},"今日完成实时数据"),e.createVNode(Yn,{icon:"wenhaoxiao",color:"#cfcccc",onClick:e.withModifiers(i,["stop"])})]),t.showMore?(e.openBlock(),e.createElementBlock("view",{key:0,class:"see-more"},[e.createElementVNode("text",null,"更多"),e.createVNode(Yn,{icon:"gengduo",color:"#cfcccc"})])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"order-money"},[e.createElementVNode("view",{class:"money"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(a.value),1),e.createElementVNode("text",null,"门店收益")]),e.createElementVNode("view",{class:"order"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(r.value),1),e.createElementVNode("text",null,"有效订单量")]),e.createElementVNode("view",{class:"order1"},[e.createElementVNode("text",{class:"number"},"-"+e.toDisplayString(o.value),1),e.createElementVNode("text",null,"运费")])])]))}}),[["__scopeId","data-v-0f805e08"]]);function ha(){const{openWeixin:t,watchVersion:n}=tn();const o=e.ref(!1);C(async()=>{uni.getProvider({service:"share",success:function(e){o.value="weixin"==e.provider[0]}}),await i(),await d(),await c()});const a=e.ref(""),r=e.ref(!1);function i(){!async function(e){let t={storeID:f("storeID")},n=await un.get_store_bills(t);if(0==n.code){let t=[];null!=n.data?(s.value=n.data.slice(0,5),s.value=s.value.map(e=>{let t=e.date;return e.date=Et(t),e}),t=n.data[0].url.trim(),e&&e(t)):(s.value=[],e&&e(t))}else V("账单数据异常",2)}(e=>{"string"==typeof e&&(a.value=e,qn.commit("serveInfo/setOrderUrl",e),f("newBillUrl")!==a.value?r.value=!0:r.value=!1)})}const s=e.ref([]);const l=e.ref(0);async function c(){let e={storeIDs:JSON.stringify([+f("storeID")]),fromReadCount:0,toReadCount:0,offset:0,pageSize:-1,fromTime:Et(+new Date-6048e5)+" 00:00:00",toTime:Et(+new Date)+" 23:59:59"},t=await un.Get_store_message_statuses(e);0==t.code?l.value=t.data.totalCount:V("消息数据异常")}let u=e.ref(0);async function d(){let e={jxStoreId:f("storeID")},t=await un.tmp_get_jx_bad_comments_no(e);0==t.code?u.value=t.data?t.data:0:V("差评数据异常",2)}e.watch(()=>qn.getters["storeInfo/imMtStatus"],e=>{e&&e.length>0&&p()});const m=e.ref(0);async function p(){if(qn.getters["storeInfo/imMtStatus"]&&qn.getters["storeInfo/imMtStatus"].length>0){let e={storeId:f("storeID"),startTime:`${Et(+new Date-6048e5)} 00:00:00`,endTime:`${Et()} 23:59:59`,pageSize:-1,offset:0},t=await Qo(e);m.value=t.data.totalCount}}let h=null;E(()=>{clearTimeout(h),h=setTimeout(async()=>{uni.stopPullDownRefresh(),await d(),await c(),await i(),await p()},1e3)});const v=e.ref(!1);return e.onBeforeUnmount(()=>{clearTimeout(h)}),{getGroupChat:function(){t("subPages/merchantChild/enterGroupChat/enterGroupChat")},getSelfInfo:async function(){let e=await un.get_self_info();if(0==e.code){let t=Math.floor((+new Date-+new Date(e.data.createdAt))/1e3/24/3600),n=Math.floor((+new Date-+new Date(qn.state.storeInfo.createStoreTimer))/1e3/24/3600);uni.jxAlert({title:"回首过往",content:`门店ID:${f("storeID")}\r\n\r\n您注册于${Et(e.data.createdAt)}\r\n来到京西${t}天\r\n\r\n门店创建于${Et(qn.state.storeInfo.createStoreTimer)}\r\n在平台经营${n}天`})}else V("注册数据异常",2)},moveToWM:function(){let e=qn.state.storeInfo.allStoreInfo.marketManPhone?qn.state.storeInfo.allStoreInfo.marketManPhone:"18048531223";"jxcs"==f("terrace")&&1!==qn.state.storeInfo.allStoreInfo.packageSwitch?(-2===qn.state.storeInfo.storeStatus&&uni.jxAlert({title:"物料申请",content:"门店已被禁用,请联系运营"}),t(`pages/index/index?storeID=666666&fromStoreID=${f("storeID")}&storeType=c4`,"gh_0d7e2243b51f")):uni.jxAlert({title:"物料申请",content:`非常抱歉,无法进入物料商城,请联系运营${e}`})},newBillShow:r,billList:s,msgCount:l,badCommentCount:u,invoiceCount:m,openAppOrApplet:function(){t("pages/merchant/index")},isVarsion:v,isUpdate:function(e){n(t=>{t?(uni.globalAlert({data:{type:3}}),v.value=!0):(v.value=!1,1==e&&V("已经是最新版"))})},isInstallWx:o}}const va=Gn(e.defineComponent({__name:"options",props:{cidNotice:{type:Boolean}},setup(t){const{getGroupChat:n,getSelfInfo:o,moveToWM:a,newBillShow:r,msgCount:i,billList:s,badCommentCount:l,invoiceCount:c,openAppOrApplet:u,isVarsion:d,isUpdate:m}=ha(),p=t,f=e.computed(()=>p.cidNotice),h=e.ref(uni.getSystemInfoSync().appVersion),v=e.ref([{id:1,icon:"/static/merchant-icon/1.png",title:"加入群聊",isIos:!0},{id:2,icon:"/static/merchant-icon/2.png",title:"营业资质",isIos:!1},{id:3,icon:"/static/merchant-icon/3.png",title:"我的店铺",isIos:!1},{id:4,icon:"/static/merchant-icon/4.png",title:"我的账单",isIos:!1},{id:5,icon:"/static/merchant-icon/5.png",title:"差评管理",isIos:!1},{id:6,icon:"/static/merchant-icon/6.png",title:"消息通知",isIos:!1},{id:7,icon:"/static/merchant-icon/7.png",title:"物料申请",isIos:!0},{id:16,icon:"/static/merchant-icon/8.png",title:"扫码进店",isIos:!1},{id:8,icon:"/static/merchant-icon/9.png",title:"待配商品",isIos:!1},{id:9,icon:"/static/merchant-icon/10.png",title:"门店评分",isIos:!1},{id:10,icon:"/static/merchant-icon/11.png",title:"帮助中心",isIos:!1},{id:11,icon:"/static/merchant-icon/12.png",title:"官方客服",isIos:!1},{id:12,icon:"/static/merchant-icon/13.png",title:"设置",isIos:!1},{id:13,icon:"/static/merchant-icon/14.png",title:"活动信息",isIos:!1},{id:14,icon:"/static/merchant-icon/15.png",title:"注册时间",isIos:!1},{id:15,icon:"/static/merchant-icon/17.png",title:"打开小程序",isIos:!0},{id:18,icon:"/static/merchant-icon/19.png",title:"个人信息",isIos:!1},{id:22,icon:"/static/merchant-icon/22.png",title:"发票管理",isIos:!1},{id:20,icon:"/static/merchant-icon/21.png",title:"收款信息"},{id:19,icon:"/static/merchant-icon/20.png",title:"配送余额",isIos:!1},{id:17,icon:"/static/merchant-icon/18.png",title:"检查更新",isIos:!1}]),g=e.computed(()=>{if("ios"==uni.getSystemInfoSync().platform)return v.value.filter(e=>0==e.isIos);{let e=uni.getSystemInfoSync().brand;return"huawei"==e||"honor"==e?v.value.filter(e=>17!=e.id):v.value}});return(t,p)=>(e.openBlock(),e.createElementBlock("view",{class:"options-root",style:e.normalizeStyle({"padding-bottom":f.value?"72rpx":""})},[e.createElementVNode("view",{style:{display:"grid","grid-template-columns":"repeat(auto-fill, minmax(175rpx, 1fr))"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(t,p)=>(e.openBlock(),e.createElementBlock("view",{key:p,onClick:e=>function(e){switch(e){case 1:n();break;case 2:uni.navigateTo({url:"/subPages/merchantChild/businessLicense/businessLicense"});break;case 3:uni.navigateTo({url:"/subPages/merchantChild/platformM/platformM"});break;case 4:uni.navigateTo({url:`/subPages/merchantChild/bill/bill?billList=${JSON.stringify(s.value)}`});break;case 5:uni.navigateTo({url:`/subPages/merchantChild/evaluateM/evaluateM?number=${l.value}`});break;case 6:uni.navigateTo({url:"/subPages/merchantChild/message/message"});break;case 7:a();break;case 8:uni.navigateTo({url:"/subPages/merchantChild/waitGoods/waitGoods"});break;case 9:uni.navigateTo({url:"/subPages/merchantChild/storeScore/storeScore"});break;case 10:uni.navigateTo({url:"/subPages/merchantChild/helpCenter/helpCenter"});break;case 11:uni.navigateTo({url:"/subPages/orderChild/getPhone/getPhone"});break;case 12:uni.navigateTo({url:"/subPages/merchantChild/setUp/setUp"});break;case 13:uni.navigateTo({url:"/subPages/merchantChild/activity/activity"});break;case 14:o();break;case 15:u();break;case 16:uni.navigateTo({url:"/subPages/merchantChild/shareStore/shareStore"});break;case 17:m(1);break;case 18:uni.navigateTo({url:"/subPages/merchantChild/useInfo/useInfo"});break;case 19:uni.navigateTo({url:"/subPages/merchantChild/accountBalance/accountBalance"});break;case 20:uni.navigateTo({url:"/subPages/merchantChild/payeeInfo/payeeInfo"});break;case 22:uni.navigateTo({url:"/subPages/merchantChild/invoice/invoice"})}}(t.id)},[e.createElementVNode("view",{class:"grid-item-box"},[e.createElementVNode("image",{src:t.icon,mode:"scaleToFill",class:"image"},null,8,["src"]),e.createElementVNode("text",{class:"text"},e.toDisplayString(t.title),1),4==t.id&&e.unref(r)?(e.openBlock(),e.createElementBlock("text",{key:0,class:"bill-new"},"new")):e.createCommentVNode("",!0),6==t.id&&e.unref(i)>0?(e.openBlock(),e.createElementBlock("text",{key:1,class:"msg-count"},e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0),5==t.id&&+e.unref(l)>0?(e.openBlock(),e.createElementBlock("text",{key:2,class:"evaluate-number"},e.toDisplayString(+e.unref(l)<99?e.unref(l):"99+"),1)):e.createCommentVNode("",!0),22==t.id&&+e.unref(c)>0?(e.openBlock(),e.createElementBlock("text",{key:3,class:"evaluate-number"},e.toDisplayString(+e.unref(c)<99?e.unref(c):"99+"),1)):e.createCommentVNode("",!0),17==t.id&&e.unref(d)?(e.openBlock(),e.createElementBlock("text",{key:4,class:"newVarsion"},"新")):e.createCommentVNode("",!0)])],8,["onClick"]))),128))]),e.createElementVNode("text",{class:"v"},"𝑽 "+e.toDisplayString(h.value),1)],4))}}),[["__scopeId","data-v-79883b65"]]),ga=Gn(e.defineComponent({__name:"index",setup(t){const{saleInfo:n,_vendorPayPercentage:o,isShowShop:a,isNotQuote:r,isZero:i,isUpperfif:s,getMsg:l,isMsg:c,cidNotice:u}=function(){const{logOutFn:t,getMtStoreIMStatus:n}=tn();let o=null;E(()=>{clearTimeout(o),o=setTimeout(async()=>{uni.stopPullDownRefresh(),await s(),await p(-1),await r(),await n(),clearTimeout(o)},1e3)});let a=e.ref(!1);async function r(){let e=await un.get_self_info();0==e.code&&(f("cid")==e.data.c_id?a.value=!1:a.value=!0)}C(async()=>{await p(-1),await s(),await r()});const i=e.ref({earningPrice:0,count:0});async function s(){let e=`${Et()} 00:00:00`,t=`${Et()} 23:59:59`,n={storeIDs:`[${parseInt(f("storeID"))}]`,fromTime:e,toTime:t,statuss:JSON.stringify([110])};await un.get_store_order_sale_info(n).then(e=>{let t={earningPrice:0,shopPrice:0,realEarningPrice:0,count:0,actualPayPrice:0,actualFee:0};0==e.code?((e.data||[]).forEach(e=>{110===e.status&&(t.actualPayPrice+=e.actualPayPrice,t.realEarningPrice+=e.realEarningPrice,t.earningPrice+=e.earningPrice,t.shopPrice+=e.shopPrice,t.count+=e.count,t.actualFee+=e.actualFee)}),t.actualFee=+(t.actualFee/100).toFixed(2),i.value=t):i.value=t})}const l=e.ref(0),c=e.ref(!0),u=e.ref(!0),d=e.ref(!1),m=e.ref(!1);async function p(e){let t={storeID:f("storeID"),vendorID:e},n=await un.get_store_vendor_maps(t);if(0==n.code){let e=n.data;l.value=e[0].vendorPayPercentage,c.value=!0,c.value=e.some(e=>0!=e.vendorPayPercentage&&e.vendorPayPercentage<=50),u.value=e.every(e=>0==e.vendorPayPercentage),d.value=e.every(e=>e.vendorPayPercentage>50),c.value&&(m.value=e.every(e=>e.vendorPayPercentage>50))}else l.value=0}const h=e.computed(()=>qn.state.storeInfo.isNewMessage);return e.onBeforeUnmount(()=>{clearTimeout(o)}),{saleInfo:i,_vendorPayPercentage:l,isShowShop:m,isNotQuote:c,isZero:u,isUpperfif:d,getMsg:function(){uni.removeTabBarBadge({index:3}),qn.commit("storeInfo/setIsNewMessage",!1),uni.navigateTo({url:"/subPages/merchantChild/message/message"})},isMsg:h,goLogin:function(){uni.showActionSheet({title:"退出后不会删除任何数据",itemColor:"#e70808",itemList:["重新登录"],popover:{width:5e3},success:function(e){t(),uni.reLaunch({url:"/subPages/login/wxLogin/wxLogin"})}})},cidNotice:a}}();return(t,d)=>{const m=w(e.resolveDynamicComponent("jx-loading"),Wn),p=w(e.resolveDynamicComponent("jx-login-empty"),Kn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"status_bar"}),e.createVNode(ma),"jxcs"==e.unref(f)("terrace")||"gblm"==e.unref(f)("terrace")?(e.openBlock(),e.createBlock(pa,{key:0,showMore:!0,saleInfo:e.unref(n),_vendorPayPercentage:e.unref(o),isShowShop:e.unref(a),isNotQuote:e.unref(r),isZero:e.unref(i),isUpperfif:e.unref(s),isOut:!0},null,8,["saleInfo","_vendorPayPercentage","isShowShop","isNotQuote","isZero","isUpperfif"])):(e.openBlock(),e.createBlock(fa,{key:1,showMore:!0,saleInfo:e.unref(n)},null,8,["saleInfo"])),e.createVNode(va,{cidNotice:e.unref(u)},null,8,["cidNotice"]),e.createElementVNode("view",{class:"tip-root"},[e.unref(c)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"new-msg",onClick:d[0]||(d[0]=(...t)=>e.unref(l)&&e.unref(l)(...t))},[e.createElementVNode("image",{src:"https://image.jxc4.com/image/e17593d0abe4daa160a9d67f46732f7b.png",mode:"scaleToFill"}),e.createElementVNode("view",{class:"msg"},[e.createElementVNode("view",{class:"title"},"新系统消息"),e.createElementVNode("view",null,"请查收您的系统信息")]),e.createElementVNode("view",{class:"btn"},"立即查看")])):e.createCommentVNode("",!0)]),e.createVNode(m),e.createVNode(p,{title:"马上登录,开始使用"})],64)}}}),[["__scopeId","data-v-b089c996"]]),ya=Gn(e.defineComponent({__name:"jx-load-more",props:{color:{default:"#aaa"},loadText:{default:"正在加载中..."},tip:{default:"没有更多了"},size:{default:"22rpx"},isLoad:{type:Boolean},marginTop:{default:"0rpx"}},setup:t=>(e.useCssVars(e=>({"3e54f39d":e.color,"3dfca6f2":e.size,add257fe:e.marginTop})),(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"jx-load-more"},[e.withDirectives(e.createElementVNode("view",{class:"isLoad"},[e.createElementVNode("text",{class:"load-icon"}),e.createElementVNode("text",{class:"load-text"},e.toDisplayString(t.loadText),1)],512),[[e.vShow,t.isLoad]]),e.withDirectives(e.createElementVNode("text",null,[e.createElementVNode("text",{class:"text"},"———"),e.createTextVNode(" "+e.toDisplayString(t.tip)+" ",1),e.createElementVNode("text",{class:"text"},"———")],512),[[e.vShow,!t.isLoad]])])))}),[["__scopeId","data-v-7f942558"]]),ka=Gn(e.defineComponent({__name:"jx-price",props:{symbol:{default:"¥"},isSymbol:{type:Boolean,default:!0},isMoney:{type:Boolean,default:!0},price:{default:"0"},color:{default:"#969696"},size:{default:"32rpx"},sizeM:{default:"32rpx"},sizeN:{default:"32rpx"}},setup(t){e.useCssVars(e=>({f5d99700:e.color,"14d64344":e.size,f41bb4ee:e.sizeM,f41bb4ec:e.sizeN}));const n=t,o=e.computed(()=>n.isMoney?(+n.price/100).toFixed(2):n.price);return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"price-root"},[t.isSymbol?(e.openBlock(),e.createElementBlock("text",{key:0,class:"money"},e.toDisplayString(t.symbol),1)):e.createCommentVNode("",!0),e.createElementVNode("text",{class:"number"},e.toDisplayString(o.value),1)]))}}),[["__scopeId","data-v-168d5ee1"]]);let wa=class{constructor(e,t){this.options=e,this.animation=uni.createAnimation({...e}),this.currentStepAnimates={},this.next=0,this.$=t}_nvuePushAnimates(e,t){let n=this.currentStepAnimates[this.next],o={};if(o=n||{styles:{},config:{}},ba.includes(e)){o.styles.transform||(o.styles.transform="");let n="";"rotate"===e&&(n="deg"),o.styles.transform+=`${e}(${t+n}) `}else o.styles[e]=`${t}`;this.currentStepAnimates[this.next]=o}_animateRun(e={},t={}){let n=this.$.$refs.ani.ref;if(n)return new Promise((o,a)=>{nvueAnimation.transition(n,{styles:e,...t},e=>{o()})})}_nvueNextAnimate(e,t=0,n){let o=e[t];if(o){let{styles:a,config:r}=o;this._animateRun(a,r).then(()=>{t+=1,this._nvueNextAnimate(e,t,n)})}else this.currentStepAnimates={},"function"==typeof n&&n(),this.isEnd=!0}step(e={}){return this.animation.step(e),this}run(e){this.$.animationData=this.animation.export(),this.$.timer=setTimeout(()=>{"function"==typeof e&&e()},this.$.durationTime)}};const ba=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"];function xa(e,t){if(t)return clearTimeout(t.timer),new wa(e,t)}ba.concat(["opacity","backgroundColor"],["width","height","left","right","top","bottom"]).forEach(e=>{wa.prototype[e]=function(...t){return this.animation[e](...t),this}});const Sa=Gn({name:"uniTransition",emits:["click","change"],props:{show:{type:Boolean,default:!1},modeClass:{type:[Array,String],default:()=>"fade"},duration:{type:Number,default:300},styles:{type:Object,default:()=>({})},customClass:{type:String,default:""},onceRender:{type:Boolean,default:!1}},data:()=>({isShow:!1,transform:"",opacity:0,animationData:{},durationTime:300,config:{}}),watch:{show:{handler(e){e?this.open():this.isShow&&this.close()},immediate:!0}},computed:{stylesObject(){let e={...this.styles,"transition-duration":this.duration/1e3+"s"},t="";for(let n in e){t+=this.toLine(n)+":"+e[n]+";"}return t},transformStyles(){return"transform:"+this.transform+";opacity:"+this.opacity+";"+this.stylesObject}},created(){this.config={duration:this.duration,timingFunction:"ease",transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init(e={}){e.duration&&(this.durationTime=e.duration),this.animation=xa(Object.assign(this.config,e),this)},onClick(){this.$emit("click",{detail:this.isShow})},step(e,t={}){return this.animation?(Object.keys(e).forEach(t=>{const n=e[t];"function"==typeof this.animation[t]&&(Array.isArray(n)?this.animation[t](...n):this.animation[t](n))}),this.animation.step(t),this):this},run(e){this.animation&&this.animation.run(e)},open(){clearTimeout(this.timer),this.isShow=!0,this.transform=this.styleInit(!1).transform||"",this.opacity=this.styleInit(!1).opacity||0,this.$nextTick(()=>{this.timer=setTimeout(()=>{this.animation=xa(this.config,this),this.tranfromInit(!1).step(),this.animation.run(()=>{this.transform="",this.opacity=this.styleInit(!1).opacity||1,this.$emit("change",{detail:this.isShow})})},80)})},close(e){this.animation&&this.tranfromInit(!0).step().run(()=>{this.isShow=!1,this.animationData=null,this.animation=null;let{opacity:e,transform:t}=this.styleInit(!1);this.opacity=e||1,this.transform=t,this.$emit("change",{detail:this.isShow})})},styleInit(e){let t={transform:"",opacity:1};const n=(e,n)=>{const o=this.animationType(e)[n];n.startsWith("fade")?t.opacity=o:t.transform+=o+" "};return"string"==typeof this.modeClass?n(e,this.modeClass):this.modeClass.forEach(t=>n(e,t)),t},tranfromInit(e){let t=(e,t)=>{let n=null;"fade"===t?n=e?0:1:(n=e?"-100%":"0","zoom-in"===t&&(n=e?.8:1),"zoom-out"===t&&(n=e?1.2:1),"slide-right"===t&&(n=e?"100%":"0"),"slide-bottom"===t&&(n=e?"100%":"0")),this.animation[this.animationMode()[t]](n)};return"string"==typeof this.modeClass?t(e,this.modeClass):this.modeClass.forEach(n=>{t(e,n)}),this.animation},animationType:e=>({fade:e?1:0,"slide-top":`translateY(${e?"0":"-100%"})`,"slide-right":`translateX(${e?"0":"100%"})`,"slide-bottom":`translateY(${e?"0":"100%"})`,"slide-left":`translateX(${e?"0":"-100%"})`,"zoom-in":`scaleX(${e?1:.8}) scaleY(${e?1:.8})`,"zoom-out":`scaleX(${e?1:1.2}) scaleY(${e?1:1.2})`}),animationMode:()=>({fade:"opacity","slide-top":"translateY","slide-right":"translateX","slide-bottom":"translateY","slide-left":"translateX","zoom-in":"scale","zoom-out":"scale"}),toLine:e=>e.replace(/([A-Z])/g,"-$1").toLowerCase()}},[["render",function(t,n,o,a,r,i){return e.withDirectives((e.openBlock(),e.createElementBlock("view",{ref:"ani",animation:r.animationData,class:e.normalizeClass(o.customClass),style:e.normalizeStyle(i.transformStyles),onClick:n[0]||(n[0]=(...e)=>i.onClick&&i.onClick(...e))},[e.renderSlot(t.$slots,"default")],14,["animation"])),[[e.vShow,r.isShow]])}]]),Na={name:"uniPopup",components:{},emits:["change","maskClick"],props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},isMaskClick:{type:Boolean,default:null},maskClick:{type:Boolean,default:null},backgroundColor:{type:String,default:"none"},safeArea:{type:Boolean,default:!0},maskBackgroundColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},borderRadius:{type:String}},watch:{type:{handler:function(e){this.config[e]&&this[this.config[e]](!0)},immediate:!0},isDesktop:{handler:function(e){this.config[e]&&this[this.config[this.type]](!0)},immediate:!0},maskClick:{handler:function(e){this.mkclick=e},immediate:!0},isMaskClick:{handler:function(e){this.mkclick=e},immediate:!0},showPopup(e){}},data(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{backgroundColor:"transparent",borderRadius:this.borderRadius||"0",position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:"top"}},computed:{getStyles(){let e={backgroundColor:this.bg};return this.borderRadius,e=Object.assign(e,{borderRadius:this.borderRadius}),e},isDesktop(){return this.popupWidth>=500&&this.popupHeight>=500},bg(){return""===this.backgroundColor||"none"===this.backgroundColor?"transparent":this.backgroundColor}},mounted(){(()=>{const{windowWidth:e,windowHeight:t,windowTop:n,safeArea:o,screenHeight:a,safeAreaInsets:r}=uni.getSystemInfoSync();this.popupWidth=e,this.popupHeight=t+(n||0),o&&this.safeArea?this.safeAreaInsets=r.bottom:this.safeAreaInsets=0})()},unmounted(){this.setH5Visible()},activated(){this.setH5Visible(!this.showPopup)},deactivated(){this.setH5Visible(!0)},created(){null===this.isMaskClick&&null===this.maskClick?this.mkclick=!0:this.mkclick=null!==this.isMaskClick?this.isMaskClick:this.maskClick,this.animation?this.duration=300:this.duration=0,this.messageChild=null,this.clearPropagation=!1,this.maskClass.backgroundColor=this.maskBackgroundColor},methods:{setH5Visible(e=!0){},closeMask(){this.maskShow=!1},disableMask(){this.mkclick=!1},clear(e){e.stopPropagation(),this.clearPropagation=!0},open(e){if(this.showPopup)return;e&&-1!==["top","center","bottom","left","right","message","dialog","share"].indexOf(e)||(e=this.type),this.config[e]?(this[this.config[e]](),this.$emit("change",{show:!0,type:e})):k("error","at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:310","缺少类型:",e)},close(e){this.showTrans=!1,this.$emit("change",{show:!1,type:this.type}),clearTimeout(this.timer),this.timer=setTimeout(()=>{this.showPopup=!1},300)},touchstart(){this.clearPropagation=!1},onTap(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.mkclick&&this.close())},top(e){this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},e||(this.showPopup=!0,this.showTrans=!0,this.$nextTick(()=>{this.showPoptrans(),this.messageChild&&"message"===this.type&&this.messageChild.timerClose()}))},bottom(e){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0,paddingBottom:this.safeAreaInsets+"px",backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},e||this.showPoptrans()},center(e){this.popupstyle="center",this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center",borderRadius:this.borderRadius||"0"},e||this.showPoptrans()},left(e){this.popupstyle="left",this.ani=["slide-left"],this.transClass={position:"fixed",left:0,bottom:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},e||this.showPoptrans()},right(e){this.popupstyle="right",this.ani=["slide-right"],this.transClass={position:"fixed",bottom:0,right:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},e||this.showPoptrans()},showPoptrans(){this.$nextTick(()=>{this.showPopup=!0,this.showTrans=!0})}}};const Ca=Gn(Na,[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("uni-transition"),Sa);return r.showPopup?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uni-popup",[r.popupstyle,i.isDesktop?"fixforpc-z-index":""]])},[e.createElementVNode("view",{onTouchstart:n[1]||(n[1]=(...e)=>i.touchstart&&i.touchstart(...e))},[r.maskShow?(e.openBlock(),e.createBlock(s,{key:"1",name:"mask","mode-class":"fade",styles:r.maskClass,duration:r.duration,show:r.showTrans,onClick:i.onTap},null,8,["styles","duration","show","onClick"])):e.createCommentVNode("",!0),e.createVNode(s,{key:"2","mode-class":r.ani,name:"content",styles:r.transClass,duration:r.duration,show:r.showTrans,onClick:i.onTap},{default:e.withCtx(()=>[e.createElementVNode("view",{class:e.normalizeClass(["uni-popup__wrapper",[r.popupstyle]]),style:e.normalizeStyle(i.getStyles),onClick:n[0]||(n[0]=(...e)=>i.clear&&i.clear(...e))},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)]),_:3},8,["mode-class","styles","duration","show","onClick"])],32)],2)):e.createCommentVNode("",!0)}],["__scopeId","data-v-86c48806"]]),_a=[{font_class:"arrow-down",unicode:""},{font_class:"arrow-left",unicode:""},{font_class:"arrow-right",unicode:""},{font_class:"arrow-up",unicode:""},{font_class:"auth",unicode:""},{font_class:"auth-filled",unicode:""},{font_class:"back",unicode:""},{font_class:"bars",unicode:""},{font_class:"calendar",unicode:""},{font_class:"calendar-filled",unicode:""},{font_class:"camera",unicode:""},{font_class:"camera-filled",unicode:""},{font_class:"cart",unicode:""},{font_class:"cart-filled",unicode:""},{font_class:"chat",unicode:""},{font_class:"chat-filled",unicode:""},{font_class:"chatboxes",unicode:""},{font_class:"chatboxes-filled",unicode:""},{font_class:"chatbubble",unicode:""},{font_class:"chatbubble-filled",unicode:""},{font_class:"checkbox",unicode:""},{font_class:"checkbox-filled",unicode:""},{font_class:"checkmarkempty",unicode:""},{font_class:"circle",unicode:""},{font_class:"circle-filled",unicode:""},{font_class:"clear",unicode:""},{font_class:"close",unicode:""},{font_class:"closeempty",unicode:""},{font_class:"cloud-download",unicode:""},{font_class:"cloud-download-filled",unicode:""},{font_class:"cloud-upload",unicode:""},{font_class:"cloud-upload-filled",unicode:""},{font_class:"color",unicode:""},{font_class:"color-filled",unicode:""},{font_class:"compose",unicode:""},{font_class:"contact",unicode:""},{font_class:"contact-filled",unicode:""},{font_class:"down",unicode:""},{font_class:"bottom",unicode:""},{font_class:"download",unicode:""},{font_class:"download-filled",unicode:""},{font_class:"email",unicode:""},{font_class:"email-filled",unicode:""},{font_class:"eye",unicode:""},{font_class:"eye-filled",unicode:""},{font_class:"eye-slash",unicode:""},{font_class:"eye-slash-filled",unicode:""},{font_class:"fire",unicode:""},{font_class:"fire-filled",unicode:""},{font_class:"flag",unicode:""},{font_class:"flag-filled",unicode:""},{font_class:"folder-add",unicode:""},{font_class:"folder-add-filled",unicode:""},{font_class:"font",unicode:""},{font_class:"forward",unicode:""},{font_class:"gear",unicode:""},{font_class:"gear-filled",unicode:""},{font_class:"gift",unicode:""},{font_class:"gift-filled",unicode:""},{font_class:"hand-down",unicode:""},{font_class:"hand-down-filled",unicode:""},{font_class:"hand-up",unicode:""},{font_class:"hand-up-filled",unicode:""},{font_class:"headphones",unicode:""},{font_class:"heart",unicode:""},{font_class:"heart-filled",unicode:""},{font_class:"help",unicode:""},{font_class:"help-filled",unicode:""},{font_class:"home",unicode:""},{font_class:"home-filled",unicode:""},{font_class:"image",unicode:""},{font_class:"image-filled",unicode:""},{font_class:"images",unicode:""},{font_class:"images-filled",unicode:""},{font_class:"info",unicode:""},{font_class:"info-filled",unicode:""},{font_class:"left",unicode:""},{font_class:"link",unicode:""},{font_class:"list",unicode:""},{font_class:"location",unicode:""},{font_class:"location-filled",unicode:""},{font_class:"locked",unicode:""},{font_class:"locked-filled",unicode:""},{font_class:"loop",unicode:""},{font_class:"mail-open",unicode:""},{font_class:"mail-open-filled",unicode:""},{font_class:"map",unicode:""},{font_class:"map-filled",unicode:""},{font_class:"map-pin",unicode:""},{font_class:"map-pin-ellipse",unicode:""},{font_class:"medal",unicode:""},{font_class:"medal-filled",unicode:""},{font_class:"mic",unicode:""},{font_class:"mic-filled",unicode:""},{font_class:"micoff",unicode:""},{font_class:"micoff-filled",unicode:""},{font_class:"minus",unicode:""},{font_class:"minus-filled",unicode:""},{font_class:"more",unicode:""},{font_class:"more-filled",unicode:""},{font_class:"navigate",unicode:""},{font_class:"navigate-filled",unicode:""},{font_class:"notification",unicode:""},{font_class:"notification-filled",unicode:""},{font_class:"paperclip",unicode:""},{font_class:"paperplane",unicode:""},{font_class:"paperplane-filled",unicode:""},{font_class:"person",unicode:""},{font_class:"person-filled",unicode:""},{font_class:"personadd",unicode:""},{font_class:"personadd-filled",unicode:""},{font_class:"personadd-filled-copy",unicode:""},{font_class:"phone",unicode:""},{font_class:"phone-filled",unicode:""},{font_class:"plus",unicode:""},{font_class:"plus-filled",unicode:""},{font_class:"plusempty",unicode:""},{font_class:"pulldown",unicode:""},{font_class:"pyq",unicode:""},{font_class:"qq",unicode:""},{font_class:"redo",unicode:""},{font_class:"redo-filled",unicode:""},{font_class:"refresh",unicode:""},{font_class:"refresh-filled",unicode:""},{font_class:"refreshempty",unicode:""},{font_class:"reload",unicode:""},{font_class:"right",unicode:""},{font_class:"scan",unicode:""},{font_class:"search",unicode:""},{font_class:"settings",unicode:""},{font_class:"settings-filled",unicode:""},{font_class:"shop",unicode:""},{font_class:"shop-filled",unicode:""},{font_class:"smallcircle",unicode:""},{font_class:"smallcircle-filled",unicode:""},{font_class:"sound",unicode:""},{font_class:"sound-filled",unicode:""},{font_class:"spinner-cycle",unicode:""},{font_class:"staff",unicode:""},{font_class:"staff-filled",unicode:""},{font_class:"star",unicode:""},{font_class:"star-filled",unicode:""},{font_class:"starhalf",unicode:""},{font_class:"trash",unicode:""},{font_class:"trash-filled",unicode:""},{font_class:"tune",unicode:""},{font_class:"tune-filled",unicode:""},{font_class:"undo",unicode:""},{font_class:"undo-filled",unicode:""},{font_class:"up",unicode:""},{font_class:"top",unicode:""},{font_class:"upload",unicode:""},{font_class:"upload-filled",unicode:""},{font_class:"videocam",unicode:""},{font_class:"videocam-filled",unicode:""},{font_class:"vip",unicode:""},{font_class:"vip-filled",unicode:""},{font_class:"wallet",unicode:""},{font_class:"wallet-filled",unicode:""},{font_class:"weibo",unicode:""},{font_class:"weixin",unicode:""}],Ea={name:"UniIcons",emits:["click"],props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},customPrefix:{type:String,default:""},fontFamily:{type:String,default:""}},data:()=>({icons:_a}),computed:{unicode(){let e=this.icons.find(e=>e.font_class===this.type);return e?e.unicode:""},iconSize(){return"number"==typeof(e=this.size)||/^[0-9]*$/g.test(e)?e+"px":e;var e},styleObj(){return""!==this.fontFamily?`color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`:`color: ${this.color}; font-size: ${this.iconSize};`}},methods:{_onClick(e){this.$emit("click",e)}}};const Ia=Gn(Ea,[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("text",{style:e.normalizeStyle(i.styleObj),class:e.normalizeClass(["uni-icons",["uniui-"+o.type,o.customPrefix,o.customPrefix?o.type:""]]),onClick:n[0]||(n[0]=(...e)=>i._onClick&&i._onClick(...e))},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)}],["__scopeId","data-v-51e1ef12"]]),Da=["{","}"];const Va=/^(?:\d)+/,Ba=/^(?:\w)+/;const Ta="zh-Hans",Pa="zh-Hant",Aa="en",Oa=Object.prototype.hasOwnProperty,Ma=(e,t)=>Oa.call(e,t),La=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,n=Da){if(!t)return[e];let o=this._caches[e];return o||(o=function(e,[t,n]){const o=[];let a=0,r="";for(;a<e.length;){let i=e[a++];if(i===t){r&&o.push({type:"text",value:r}),r="";let t="";for(i=e[a++];void 0!==i&&i!==n;)t+=i,i=e[a++];const s=i===n,l=Va.test(t)?"list":s&&Ba.test(t)?"named":"unknown";o.push({value:t,type:l})}else r+=i}return r&&o.push({type:"text",value:r}),o}(e,n),this._caches[e]=o),function(e,t){const n=[];let o=0;const a=Array.isArray(t)?"list":(r=t,null!==r&&"object"==typeof r?"named":"unknown");var r;if("unknown"===a)return n;for(;o<e.length;){const r=e[o];switch(r.type){case"text":n.push(r.value);break;case"list":n.push(t[parseInt(r.value,10)]);break;case"named":"named"===a&&n.push(t[r.value])}o++}return n}(o,t)}};function ja(e,t){if(!e)return;if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if("chinese"===(e=e.toLowerCase()))return Ta;if(0===e.indexOf("zh"))return e.indexOf("-hans")>-1?Ta:e.indexOf("-hant")>-1?Pa:(n=e,["-tw","-hk","-mo","-cht"].find(e=>-1!==n.indexOf(e))?Pa:Ta);var n;let o=[Aa,"fr","es"];t&&Object.keys(t).length>0&&(o=Object.keys(t));const a=function(e,t){return t.find(t=>0===e.indexOf(t))}(e,o);return a||void 0}class Fa{constructor({locale:e,fallbackLocale:t,messages:n,watcher:o,formater:a}){this.locale=Aa,this.fallbackLocale=Aa,this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=a||La,this.messages=n||{},this.setLocale(e||Aa),o&&this.watchLocale(o)}setLocale(e){const t=this.locale;this.locale=ja(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach(e=>{e(this.locale,t)})}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,n=!0){const o=this.messages[e];o?n?Object.assign(o,t):Object.keys(t).forEach(e=>{Ma(o,e)||(o[e]=t[e])}):this.messages[e]=t}f(e,t,n){return this.formater.interpolate(e,t,n).join("")}t(e,t,n){let o=this.message;return"string"==typeof t?(t=ja(t,this.messages))&&(o=this.messages[t]):n=t,Ma(o,e)?this.formater.interpolate(o[e],n).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}const Ua={en:{"uni-search-bar.cancel":"cancel","uni-search-bar.placeholder":"Search enter content"},"zh-Hans":{"uni-search-bar.cancel":"取消","uni-search-bar.placeholder":"请输入搜索内容"},"zh-Hant":{"uni-search-bar.cancel":"取消","uni-search-bar.placeholder":"請輸入搜索內容"}},{t:$a}=function(e,t={},n,o){if("string"!=typeof e){const n=[t,e];e=n[0],t=n[1]}"string"!=typeof e&&(e="undefined"!=typeof uni&&uni.getLocale?uni.getLocale():"undefined"!=typeof global&&global.getLocale?global.getLocale():Aa),"string"!=typeof n&&(n="undefined"!=typeof __uniConfig&&__uniConfig.fallbackLocale||Aa);const a=new Fa({locale:e,fallbackLocale:n,messages:t,watcher:o});let r=(e,t)=>{if("function"!=typeof getApp)r=function(e,t){return a.t(e,t)};else{let e=!1;r=function(t,n){const o=getApp().$vm;return o&&(o.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale(e=>{t.setLocale(e)}):e.$watch(()=>e.$locale,e=>{t.setLocale(e)})}(o,a))),a.t(t,n)}}return r(e,t)};return{i18n:a,f:(e,t,n)=>a.f(e,t,n),t:(e,t)=>r(e,t),add:(e,t,n=!0)=>a.add(e,t,n),watch:e=>a.watchLocale(e),getLocale:()=>a.getLocale(),setLocale:e=>a.setLocale(e)}}(Ua),Ra={name:"UniSearchBar",emits:["input","update:modelValue","clear","cancel","confirm","blur","focus"],props:{placeholder:{type:String,default:""},radius:{type:[Number,String],default:5},clearButton:{type:String,default:"auto"},cancelButton:{type:String,default:"auto"},cancelText:{type:String,default:""},bgColor:{type:String,default:"#F8F8F8"},textColor:{type:String,default:"#000000"},maxlength:{type:[Number,String],default:100},value:{type:[Number,String],default:""},modelValue:{type:[Number,String],default:""},focus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},data:()=>({show:!1,showSync:!1,searchVal:""}),computed:{cancelTextI18n(){return this.cancelText||$a("uni-search-bar.cancel")},placeholderText(){return this.placeholder||$a("uni-search-bar.placeholder")}},watch:{modelValue:{immediate:!0,handler(e){this.searchVal=e,e&&(this.show=!0)}},focus:{immediate:!0,handler(e){if(e){if(this.readonly)return;this.show=!0,this.$nextTick(()=>{this.showSync=!0})}}},searchVal(e,t){this.$emit("input",e),this.$emit("update:modelValue",e)}},methods:{searchClick(){this.readonly||this.show||(this.show=!0,this.$nextTick(()=>{this.showSync=!0}))},clear(){this.searchVal="",this.$nextTick(()=>{this.$emit("clear",{value:""})})},cancel(){this.readonly||(this.$emit("cancel",{value:this.searchVal}),this.searchVal="",this.show=!1,this.showSync=!1,uni.hideKeyboard())},confirm(){uni.hideKeyboard(),this.$emit("confirm",{value:this.searchVal})},blur(){uni.hideKeyboard(),this.$emit("blur",{value:this.searchVal})},emitFocus(e){this.$emit("focus",e.detail)}}};const za=Gn(Ra,[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("uni-icons"),Ia);return e.openBlock(),e.createElementBlock("view",{class:"uni-searchbar"},[e.createElementVNode("view",{style:e.normalizeStyle({borderRadius:o.radius+"px",backgroundColor:o.bgColor}),class:"uni-searchbar__box",onClick:n[5]||(n[5]=(...e)=>i.searchClick&&i.searchClick(...e))},[e.createElementVNode("view",{class:"uni-searchbar__box-icon-search"},[e.renderSlot(t.$slots,"searchIcon",{},()=>[e.createVNode(s,{color:"#c0c4cc",size:"18",type:"search"})],!0)]),r.show||r.searchVal?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,focus:r.showSync,disabled:o.readonly,placeholder:i.placeholderText,maxlength:o.maxlength,class:"uni-searchbar__box-search-input","confirm-type":"search",type:"text","onUpdate:modelValue":n[0]||(n[0]=e=>r.searchVal=e),style:e.normalizeStyle({color:o.textColor}),onConfirm:n[1]||(n[1]=(...e)=>i.confirm&&i.confirm(...e)),onBlur:n[2]||(n[2]=(...e)=>i.blur&&i.blur(...e)),onFocus:n[3]||(n[3]=(...e)=>i.emitFocus&&i.emitFocus(...e))},null,44,["focus","disabled","placeholder","maxlength"])),[[e.vModelText,r.searchVal]]):(e.openBlock(),e.createElementBlock("text",{key:1,class:"uni-searchbar__text-placeholder"},e.toDisplayString(o.placeholder),1)),r.show&&("always"===o.clearButton||"auto"===o.clearButton&&""!==r.searchVal)&&!o.readonly?(e.openBlock(),e.createElementBlock("view",{key:2,class:"uni-searchbar__box-icon-clear",onClick:n[4]||(n[4]=(...e)=>i.clear&&i.clear(...e))},[e.renderSlot(t.$slots,"clearIcon",{},()=>[e.createVNode(s,{color:"#c0c4cc",size:"20",type:"clear"})],!0)])):e.createCommentVNode("",!0)],4),"always"===o.cancelButton||r.show&&"auto"===o.cancelButton?(e.openBlock(),e.createElementBlock("text",{key:0,onClick:n[6]||(n[6]=(...e)=>i.cancel&&i.cancel(...e)),class:"uni-searchbar__cancel"},e.toDisplayString(i.cancelTextI18n),1)):e.createCommentVNode("",!0)])}],["__scopeId","data-v-31cac268"]]),Ha=e.defineComponent({__name:"shopping-search",props:{isFilter:{}},emits:["serachShopping","clearInpu","createGoods"],setup(t,{emit:n}){const o=t,a=e.ref("");let r=!1;e.watch(()=>o.isFilter,e=>{r="hot"==e||"audit"==e});const i=n;function s(e){if(r){let e=setTimeout(()=>{a.value="",clearTimeout(e)},500);return V("该分类暂不支持搜索")}i("serachShopping",e.value)}function l(e){if(r){let e=setTimeout(()=>{a.value="",clearTimeout(e)},500);return V("该分类暂不支持搜索")}c(e)}const c=Vt(e=>{i("serachShopping",e)},1e3);function u(e){r||i("clearInpu",e.value)}function d(){i("createGoods")}return(t,n)=>{const o=w(e.resolveDynamicComponent("jx-icon"),Yn),r=w(e.resolveDynamicComponent("uni-search-bar"),za);return e.openBlock(),e.createElementBlock("view",{class:"search-root"},[e.createElementVNode("view",{class:"add-shopping",onClick:d},[e.createVNode(o,{icon:"jiahao",color:"#4eb331"}),e.createElementVNode("text",null,"新建")]),e.createVNode(r,{cancelButton:"none",clearButton:"auto",placeholder:"请输入关键字 例如:精华液",onConfirm:s,onInput:l,onClear:u,modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e)},null,8,["modelValue"])])}}}),qa=Gn(Ha,[["__scopeId","data-v-e4852c47"]]),Ga=async e=>sn.api("/v2/store/sku/UpdateStoresSkus","PUT",e),Wa=async e=>sn.api("/v2/store/sku/UpdateStoresSkusSale","PUT",e),Ja=async e=>sn.api("/v2/store/GetStoreCategoryMap","GET",e),Xa=async e=>sn.api("/v2/sku/GetCategories","GET",e),Ka=async e=>sn.api("/v2/store/sku/GetStoresSkusForStore","GET",e),Ya=async e=>sn.api("/v2/store/sku/GetTopSkusByCityCode","GET",e),Za=async e=>sn.api("/v2/store/sku/GetStoreSkuAudit","GET",e),Qa=async e=>sn.api("/v2/sku/GetSkuNamesNew","GET",e),er=async e=>sn.api("/v2/store/sku/StoreSkuPriceAudit","POST",e),tr=async e=>sn.api("/v2/sku/GetJdUpcCodeByName","GET",e),nr=async e=>sn.api("/v2/store/sku/CreateSkusAndFocusFromWx","POST",e);function or(t){C(async()=>{await o()});const n=e.ref([]);async function o(){let e={storeID:f("storeID"),parentID:-1},t=await Ja(e);0==t.code?r(t.data,!0):(n.value=[],async function(){let e=await Xa();0==e.code&&r(e.data,!1)}())}const a=e.ref(!1);function r(e,o){let r=[];e.forEach(e=>{"3件9.9"!==e.name&&(e.name=e.name.slice(0,4)),r.push(e)}),o||(r=r.filter(e=>0===e.type));let i,s=r.filter(e=>1===e.level),l=r.filter(e=>2===e.level),c=[];s.forEach(e=>{i=o?l.filter(t=>t.parentID===e.categoryID):l.filter(t=>t.parentID===e.id),e.children=i,a.value=o,c.push(e)});let u=t.dafauleData.concat(c);n.value=u}return{cat:n,GetStoreCategoryMap:o}}const ar=Gn(e.defineComponent({__name:"left-bar",props:{dafauleData:{}},emits:["oneMenuClick"],setup(t,{expose:n,emit:o}){e.useCssVars(e=>({f3186828:u.value}));const a=t,{cat:r,GetStoreCategoryMap:i}=or(a),s=o,l=e.ref(!1),c=e.ref(0),u=e.ref("0px");const d=e.ref(-1);return n({GetStoreCategoryMap:i}),(t,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,class:e.normalizeClass(["one-item",{"one-item-active":n==c.value&&0!=t.children.length&&l.value,"item-name":c.value==n&&0==t.children.length}])},[e.createElementVNode("view",{class:e.normalizeClass([{"never-pen-active":n==c.value&&0!=t.children.length},"one-item-name"]),onClick:e=>function(e,t){c.value==t?l.value=!l.value:l.value=!0,c.value=t,u.value=90*(e.length+1)+"rpx",d.value=-1,l.value&&s("oneMenuClick",e.categoryID)}(t,n)},[0!=t.children.length?(e.openBlock(),e.createElementBlock("text",{key:0,class:"iconfont icon-jiantou1"})):(e.openBlock(),e.createElementBlock("text",{key:1,class:"noe-seat noe-seat-active"})),e.createElementVNode("text",null,e.toDisplayString(t.name),1)],10,["onClick"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.children,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["tow-item",{"tow-item-active":d.value==n}]),key:n,onClick:e=>function(e,t){d.value!=t&&(d.value=t,s("oneMenuClick",e.categoryID))}(t,n)},[e.createElementVNode("text",{class:"tow-seat tow-seat-active"}),e.createTextVNode(e.toDisplayString(t.name),1)],10,["onClick"]))),128))],2))),128))}}),[["__scopeId","data-v-c1fcbd64"]]);
|
||
/**
|
||
* @vue/reactivity v3.5.24
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/
|
||
let rr,ir,sr,lr=0;function cr(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===pr)return;if(e.globalVersion=pr,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!function(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(cr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}(e)))return;e.flags|=2;const n=e.dep,o=rr,a=mr;rr=e,mr=!0;try{!function(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}(e);const o=e.fn(e._value);(0===n.version||t.hasChanged(o,e._value))&&(e.flags|=128,e._value=o,n.version++)}catch(r){throw n.version++,r}finally{rr=o,mr=a,function(e){let t,n=e.depsTail,o=n;for(;o;){const e=o.prevDep;-1===o.version?(o===n&&(n=e),ur(o),dr(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=e}e.deps=t,e.depsTail=n}(e),e.flags&=-3}}function ur(e,t=!1){const{dep:n,prevSub:o,nextSub:a}=e;if(o&&(o.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)ur(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function dr(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let mr=!0,pr=0;class fr{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class hr{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!rr||!mr||rr===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==rr)t=this.activeLink=new fr(rr,this),rr.deps?(t.prevDep=rr.depsTail,rr.depsTail.nextDep=t,rr.depsTail=t):rr.deps=rr.depsTail=t,vr(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=rr.depsTail,t.nextDep=void 0,rr.depsTail.nextDep=t,rr.depsTail=t,rr.deps===t&&(rr.deps=e)}return t}trigger(e){this.version++,pr++,this.notify(e)}notify(e){lr++;try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{!function(){if(--lr>0)return;if(sr){let e=sr;for(sr=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ir;){let n=ir;for(ir=void 0;n;){const o=n.next;if(n.next=void 0,n.flags&=-9,1&n.flags)try{n.trigger()}catch(t){e||(e=t)}n=o}}if(e)throw e}()}}}function vr(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)vr(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(t.isSymbol));class gr{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new hr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=pr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&rr!==this)return function(e,t=!1){if(e.flags|=8,t)return e.next=sr,void(sr=e);e.next=ir,ir=e}(this,!0),!0}get value(){const e=this.dep.track();return cr(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function yr(e,n,o=!1){let a,r;t.isFunction(e)?a=e:(a=e.get,r=e.set);return new gr(a,r,o)}function kr(e){const t=yr(()=>{qn.getters["storeInfo/isNewPriceDisplay"]}),n=yr(()=>+f("userType"));const o=Bt({time:500,success:async e=>{let t={storeIDs:JSON.stringify([f("storeID")]),payload:JSON.stringify([{nameID:e.skuName.id,skus:[{skuID:e.sku.id,isSale:0===+e.status?-1:+e.status}]}])};0==(await Ga(t)).code?(i(e.sku,e.skuName,e.status),e.sku.autoSaleAt&&(e.sku.autoSaleAt=0)):V("修改失败",2)},fail:e=>{V("操作太快")}});const a=Bt({time:500,success:async e=>{let t=function(){let e=+new Date,t=+new Date(`${Et(+new Date)} ${r.value}`);return e<t?`${Et(+new Date)} ${r.value}`:`${Et(+new Date+864e5)} ${r.value}`}(),n={storeIDs:JSON.stringify([f("storeID")]),payload:JSON.stringify([{skuID:e.sku.id,isSale:-1,isAsync:!1}]),autoSaleAt:t},o=await Wa(n);if(0==o.code)i(e.sku,e.skuName,0),e.sku.autoSaleAt=t;else{let e=o.desc.indexOf("["),t="";-1!==e&&JSON.parse(o.desc.substring(e)).forEach(e=>{t=t.length>0?t+";\n"+e["平台名"]+":【"+e["错误信息"]+"】":t+e["平台名"]+":【"+e["错误信息"]+"】"}),"-105"===o.code&&o.desc.includes("本地数据修改成功,但同步失败,请根据错误提示处理")?V(`${t}`):V("修改失败",2)}},fail:e=>{V("操作太快")}});const r=yr(()=>{let{autoSaleAt:e=""}=Nt.serveInfo;return e});async function i(t,n,o){if(e.isAudit)return!1;t.storeSkuStatus=+o,n.skus.some(e=>e.storeSkuStatus)?n.skuAllnoSale=!1:n.skuAllnoSale=!0}return{isNewPriceDisplay:t,userType:n,updateSaleStatus:function(e,t,n){if(+e.storeSkuStatus===+n&&!e.autoSaleAt)return!1;o({sku:e,skuName:t,status:n})},tmpSaleNo:function(e,t){if(0===e.storeSkuStatus&&e.autoSaleAt)return!1;a({sku:e,skuName:t})}}}const wr=Gn(e.defineComponent({__name:"right-main",props:{skuName:{},isAudit:{type:Boolean},isHot:{type:Boolean},showMountTab:{type:Boolean}},emits:["handleSale","openPriceDialog","openDialog","toExamine"],setup(t,{emit:n}){const{copyInfo:o}=aa(),{phoneCall:a}=tn(),r=t,{isNewPriceDisplay:i,updateSaleStatus:s,tmpSaleNo:l}=kr(r),{previewImage:c}=tn(),u=n;function d(e,t,n){let o={nameID:e.id,Skus:[{skuID:t.id,stock:t.stock,locationCode:t.locationCode&&"EMPTY_VALUE"!==t.locationCode?t.locationCode:""}]};u("openDialog",{payload:o,type:n,name:e.name})}function m(e,t){let n={status:t,nameID:e.nameID,storeID:f("storeID"),auditPrice:e.auditUnitPrice};u("toExamine",n)}const p=e.computed(()=>qn.state.storeInfo.allStoreInfo);return(t,n)=>{const h=w(e.resolveDynamicComponent("jx-icon"),Yn),v=w(e.resolveDynamicComponent("jx-price"),ka);return e.openBlock(),e.createElementBlock("view",{class:"skuName-cell"},[e.createElementVNode("view",{class:"skuName"},[e.createElementVNode("view",{class:"skuName-img",onClick:n[0]||(n[0]=e=>function(e){let t=[e.img,e.img2,e.img3,e.img4,e.img5].filter(e=>e&&e.length>0);c(t)}(t.skuName))},[e.withDirectives(e.createElementVNode("view",null,"不可售",512),[[e.vShow,t.skuName.skuAllnoSale]]),e.createElementVNode("image",{class:"imglabel",mode:"scaleToFill","lazy-load":"",src:t.skuName.img},null,8,["src"])]),e.createElementVNode("view",{class:"skuName-info"},[e.createElementVNode("view",{class:"skuName-name"},e.toDisplayString(t.skuName.prefix?"["+t.skuName.prefix+"]":"")+e.toDisplayString(t.skuName.name),1),e.createElementVNode("view",{onClick:n[1]||(n[1]=e.withModifiers(n=>e.unref(o)(""+t.skuName.id,"复制nameID成功"),["stop"])),style:{color:"#818181"}},[e.createElementVNode("text",null,e.toDisplayString(t.skuName.id),1),e.createVNode(h,{icon:"fuzhi",color:"#818181",style:{"margin-left":"10rpx"}})]),e.createElementVNode("view",{class:"skuName-price",onClick:n[2]||(n[2]=e=>{return n=t.skuName,void(r.isAudit||u("openPriceDialog",n));var n})},[e.createVNode(v,{price:t.skuName.unitPrice,color:"#F60D58",sizeM:"22rpx",sizeN:"38rpx"},null,8,["price"]),t.isAudit?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"icon-modify"},[e.createVNode(h,{icon:"shuxie",color:"#999",size:38})]))]),e.createElementVNode("view",null,["份"===t.skuName.unit?(e.openBlock(),e.createElementBlock("view",{key:0,class:"skuName-tips"}," 该价格为每斤价格 ")):e.createCommentVNode("",!0),"份"!==t.skuName.unit?(e.openBlock(),e.createElementBlock("view",{key:1,class:"skuName-tips green"}," 该价格为每"+e.toDisplayString(t.skuName.unit)+"价格 ",1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("view",{class:"check-display"},[e.createTextVNode(" 审核中价格:"),e.createVNode(v,{price:t.skuName.auditUnitPrice,color:"#f44",size:"24rpx"},null,8,["price"])],512),[[e.vShow,t.skuName.auditUnitPrice]])])])]),t.isAudit?(e.openBlock(),e.createElementBlock("view",{key:1,class:"aduit-wall"},[e.createElementVNode("view",{class:"aduit-type"},e.toDisplayString(1===t.skuName.type?"【价格】正在审核中":"【新建】正在审核中"),1),4&~+e.unref(f)("userType")?(e.openBlock(),e.createElementBlock("view",{key:1,class:"aduit-btn-group"},[e.createElementVNode("view",{class:"btn",onClick:n[6]||(n[6]=t=>e.unref(a)(p.value.marketManName))},"联系运营加快审核")])):(e.openBlock(),e.createElementBlock("view",{key:0,class:"aduit-btn-group"},[e.createElementVNode("view",{class:"btn refuse",onClick:n[4]||(n[4]=e=>m(t.skuName,-1))},"拒绝"),e.createElementVNode("view",{class:"btn",onClick:n[5]||(n[5]=e=>m(t.skuName,1))},"批准")]))])):(e.openBlock(),e.createElementBlock("view",{key:0,class:"skus-wrapper-new"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.skuName.skus,(n,o)=>(e.openBlock(),e.createElementBlock("view",{key:o,class:"sku-cell2"},[""!==n.mtwmID&&!(16&~n.mtwmSyncStatus)&&2&~n.mtwmSyncStatus&&4&~n.mtwmSyncStatus?(e.openBlock(),e.createElementBlock("view",{key:0,class:"error mt"},"美团:该商品无法修改价格,请联系运营修改")):e.createCommentVNode("",!0),""!==n.ebaiID&&!(16&~n.ebaiSyncStatus)&&2&~n.ebaiSyncStatus&&4&~n.ebaiSyncStatus?(e.openBlock(),e.createElementBlock("view",{key:1,class:"error eb"},"饿佰:该商品无法修改价格,请联系运营修改")):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"cell-top"},[e.createElementVNode("view",{class:"price"},[e.createElementVNode("view",{class:"sku-spec"},e.toDisplayString(n.specQuality)+e.toDisplayString(n.specUnit),1),e.createElementVNode("view",{class:e.normalizeClass(["sku-price",{"promotion-price":!e.unref(i)&&n.actPrice}])},[e.createVNode(v,{price:n.comparePrice,sizeM:"22rpx",sizeN:"28rpx",color:"#000"},null,8,["price"])],2)]),e.createElementVNode("view",{class:"btn-group"},[e.createElementVNode("view",{class:e.normalizeClass(["btn",{onActive:n.storeSkuStatus}]),onClick:o=>e.unref(s)(n,t.skuName,1)}," 可售 ",10,["onClick"]),e.createElementVNode("view",{class:e.normalizeClass(["btn",{onActive:!n.storeSkuStatus&&!n.autoSaleAt}]),onClick:o=>e.unref(s)(n,t.skuName,0)}," 不可售 ",10,["onClick"]),t.isHot?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["btn tmpSaleNo",{onActive:!n.storeSkuStatus&&n.autoSaleAt}]),onClick:o=>e.unref(l)(n,t.skuName)},[e.createElementVNode("text",null,"临时"),e.createElementVNode("text",null,"不可售")],10,["onClick"]))])]),e.createElementVNode("view",{style:{display:"flex",color:"#666","margin-top":"20rpx","justify-content":"center"}},[e.createElementVNode("view",{onClick:e=>d(t.skuName,n,"stock")},[e.createTextVNode(" 库存:"+e.toDisplayString(n.stock)+" ",1),e.createVNode(h,{icon:"shuxie",color:"#999",size:24})],8,["onClick"]),e.createElementVNode("view",{style:{"margin-left":"20rpx"},onClick:e=>d(t.skuName,n,"locationCode")},[e.createTextVNode(" 货架码:"+e.toDisplayString(n.locationCode&&"EMPTY_VALUE"!==n.locationCode?n.locationCode:"")+" ",1),e.createVNode(h,{icon:"shuxie",color:"#999",size:24})],8,["onClick"])]),e.createElementVNode("view",{class:"cell-bottom"},e.toDisplayString(n.comment?n.comment:""),1),n.autoSaleAt?(e.openBlock(),e.createElementBlock("view",{key:2,class:"sku-autoSaleAt"},[e.createTextVNode(" 该规格将在 "),e.createElementVNode("text",null,e.toDisplayString(n.autoSaleAt),1),e.createTextVNode(" 可售 ")])):e.createCommentVNode("",!0)]))),128)),t.showMountTab?(e.openBlock(),e.createElementBlock("view",{key:0,class:"checkBoxWrap"},[e.createElementVNode("label",{onClick:n[3]||(n[3]=e=>{return n=t.skuName,void u("handleSale",n);var n})},[e.createElementVNode("checkbox",{color:"#4eb331",style:{transform:"scale(0.8)"}}),e.createTextVNode("选中商品 ")])])):e.createCommentVNode("",!0)]))])}}}),[["__scopeId","data-v-27a0732a"]]),br=Gn(e.defineComponent({__name:"shopping-filter",props:{isCheckoutFilter:{type:Boolean},updateStateOk:{type:Boolean}},emits:["updateIsSale","updateTowFilter"],setup(t,{emit:n}){const o=t,a=e.ref([{title:"全部",name:"all",lable:2,status:-1},{title:"可售",name:"status",lable:1,status:1},{title:"不可售",name:"status",lable:0,status:0},{title:"有库存",name:"stock",lable:4,status:2},{title:"无库存",name:"stock",lable:5,status:3},{title:"无货架码",name:"locationCode",lable:7,status:!0},{title:"批量",name:"",lable:3,status:-1}]),r=e.ref([{title:"全部",lable:2,status:-1},{title:"批量",lable:3,status:-1}]),i=n,s=e.ref(2);const l=Bt({time:2e3,success:(e,t)=>{s.value=e.lable,c.value=e.lable;let n={status:t,lable:e.lable,name:e.name};i("updateIsSale",n)},fail:()=>{V("老板要点慢点哦")}}),c=e.ref(2);return e.watch(()=>o.updateStateOk,e=>{e&&(c.value=2,s.value=2)}),(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["filter-root",{"filter-fill":t.isCheckoutFilter}])},[t.isCheckoutFilter?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["item item-fill",{active:c.value==t.lable}]),key:n,onClick:e=>function(e,t){if(c.value==e)return;c.value=e,s.value=e,i("updateTowFilter",{status:t,lable:e})}(t.lable,t.status)},e.toDisplayString(t.title),11,["onClick"]))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["item item-fill",{active:s.value==t.lable}]),key:n,onClick:e=>function(e,t){s.value!=e.lable&&l(e,t)}(t,t.status)},e.toDisplayString(t.title),11,["onClick"]))),128))],2))}}),[["__scopeId","data-v-50fcd688"]]);function xr(){function t(){d.value=[],g.value=1,u.value=0}const n=e.ref(null);let o="";const a=e.ref(!1);let r=0;x(()=>{r!=f("storeID")&&0!=r&&(a.value=!0),r=f("storeID")});const i=e.ref("0px");C(async()=>{uni.getSystemInfo({success:e=>{i.value=e.statusBarHeight+"px"}}),await h()});const s=e.ref(""),l=e.ref(""),c=e.ref(!1),u=e.ref(0),d=e.ref([]),m=e.ref(!1),p=e.ref(!1);async function h(){k.value=!0;let e={categoryID:l.value,isFocus:!0,keyword:s.value,offset:y.value*(g.value-1),pageSize:y.value,isAct:c.value,status:-1,storeID:f("storeID")};E.value&&"all"!==E.value.name&&(e[E.value.name]=E.value.status),function(e){for(let t in e)""+e[t]!=""&&""+e[t]!=null||delete e[t]}(e);let n=await Ka(e);if(0==n.code){u.value=n.data.totalCount;let e=v(n.data.skuNames||[]);if(d.value=d.value.concat(e),0==e.length)return V("该分类未找到商品")}else t(),V("分类查询错误");k.value=!1}function v(e){return e.map(e=>(e.auditUnitPrice=e.auditUnitPrice,e.skus.some(e=>e.storeSkuStatus)?e.skuAllnoSale=!1:e.skuAllnoSale=!0,e.skus=e.skus.map(e=>(e.comparePrice=e.price,e.autoSaleAt=+new Date(e.autoSaleAt)>0?_t(e.autoSaleAt):0,e)),e))}e.ref(qn.getters["storeInfo/isNewPriceDisplay"]);const g=e.ref(1),y=e.ref(20),k=e.ref(!1);const w=e.ref(!1),b=e.ref("");function S(e){c.value=!1,p.value=!1,w.value=!1,l.value="",s.value="",b.value=e,m.value=!1,t(),"all"==e?(c.value=!1,h()):"act"==e?(c.value=!0,h()):"hot"==e?(p.value=!0,w.value=!0,async function(){k.value=!0;let e={storeID:f("storeID")},n=await Ya(e);if(0==n.code){let e=n.data||[];e.length>0?(u.value=e.length,d.value=v(e)):(t(),V("暂无畅销商品"))}else V("分类查询错误"),t();k.value=!1}()):"audit"==e?(w.value=!0,m.value=!0,N()):(l.value=e,h())}async function N(){k.value=!0;let e={storeIDs:JSON.stringify([f("storeID")]),applyTimeStart:Et(+new Date-2592e6)+" 00:00:00",applyTimeEnd:Et(+new Date)+" 23:59:59",statuss:JSON.stringify([0]),types:JSON.stringify([1,2]),offset:y.value*(g.value-1),pageSize:y.value},n=await Za(e);if(0==n.code){u.value=n.data.totalCount;let e=n.data.data||[],t=function(e){let t=e.map(e=>({auditUnitPrice:e.unitPrice,unitPrice:e.originPrice,skuAllnoSale:!1,nameID:e.nameID,img:e.img,unit:e.unit,type:e.type,prefix:e.prefix,name:e.skuName}));return t}(e);if(d.value=d.value.concat(t),0==e.length)return V("暂无待审核商品")}else V("分类查询错误"),t();k.value=!1}const _=e.ref(!1),E=e.ref();async function I(e){E.value=e,3==e.lable?_.value=!0:_.value=!1,3!=e.lable&&(t(),await h())}let D=[];let B=null;const T=e.ref(!1);const P=e.computed(()=>qn.getters["storeInfo/isPointStore"]),A=e.ref({unit:"",auditUnitPrice:""});const O=e.ref(""),M=e.computed(()=>{let e=A.value.auditUnitPrice;return e?+(1*e/100).toFixed(2):0}),L=e.ref(null);async function j(e,t,n){let o={storeIDs:JSON.stringify([+f("storeID")]),payload:JSON.stringify([{nameID:A.value.id,unitPrice:e}])};if(L.value.close(),0==(await Ga(o)).code){let o={storeIDs:JSON.stringify([+f("storeID")]),isFocus:!0,nameIDs:JSON.stringify([t]),fromStatus:0,toStatus:1};const a=await un.get_stores_skus(o);if(0==a.code){let e=a.data.skuNames||[];if(e.length>0){let n=d.value.findIndex(e=>e.id==t);-1!==n&&(d.value[n]=v(e)[0])}}P.value||"E"==qn.state.storeInfo.allStoreInfo.storeLevel?(V("修改成功"),O.value=""):(O.value="",V(+e<n?"修改成功":"提交成功, 请等待审核"))}else V("修改失败",2)}const F=e.ref(null),U=e.ref({payload:{nameID:0,Skus:[]},name:"",type:"price"}),$=e.ref("");const R=e.ref({}),z=e.ref(null),H=e.ref("");return e.onBeforeUnmount(()=>{clearTimeout(B),clearTimeout(null),clearTimeout(o)}),{dafauleData:[{categoryID:"all",children:[],level:1,name:"所有分类"},{categoryID:"act",children:[],level:1,name:"活动商品"},{categoryID:"hot",children:[],level:1,name:"畅销推荐"},{categoryID:"audit",children:[],level:1,name:"待审商品"}],totalCount:u,skuNames:d,skuNameItem:U,isAudit:m,isHot:p,showMountTab:_,scrolltolower:function(){if(g.value++,y.value*(g.value-1)>u.value||u.value<y.value)k.value=!1;else{if(k.value)return;if("hot"==b.value)return;if("audit"==b.value)return N();h()}},isLoad:k,updateIsSale:I,updateTowFilter:async function(e){if(3==e.lable)return _.value=!0;_.value=!1,"hot"==b.value&&S(b.value),"audit"==b.value&&S(b.value)},serachShopping:async function(e){t(),s.value=e,await h()},clearInpu:async function(){t(),s.value="",await h()},oneMenuClick:S,isCheckoutFilter:w,isFilter:b,handleSale:function(e){D&&D.some(t=>t.nameID==e.id)?D=D.filter(t=>t.nameID!=e.id):(D.push({nameID:Number(e.id)}),D=function(e,t){let n=new Set;return e.reduce((e,o)=>n.has(o[t])?e:(n.add(o[t]),[...e,o]),[])}(D,"nameID"))},handleChangeSale:async function(e){if(0==D.length)return V("未选择商品");D.forEach(t=>{t.isSale=e});let t={storeIDs:JSON.stringify([f("storeID")]),payload:JSON.stringify(D)};if(0==(await Ga(t)).code){V("修改成功");let e={status:-1,lable:2};T.value=!0,B=setTimeout(()=>{I(e),clearTimeout(B)},1e3)}else V("修改失败",2),T.value=!1},updateStateOk:T,createGoods:function(){uni.navigateTo({url:"/subPages/shoppingChild/createGoods/createGoods"})},isPointStore:P,skuName:A,auditUnitPrice:M,currentValue:O,popup:L,stockOrCode:$,popupDialog:F,handleConfirm:function(){if(isNaN(+O.value))return V("请输入格式正确的价格");if(+O.value<.01)return V("请输入大于等于1分钱的价格");if(O.value.toString().indexOf(".")>-1&&O.value.toString().split(".")[1].length>2)return V("最多只能有两位小数");let e=Math.round(100*+O.value);if(e==A.value.unitPrice)return V("没有修改价格");e>1.3*A.value.unitPrice||e<.7*A.value.unitPrice?uni.jxConfirm({title:"提示",content:`修改幅度超过30%,新价格为¥${(e/100).toFixed(2)},是否确定修改?`,success:()=>{j(e,A.value.id,A.value.unitPrice)}}):j(e,A.value.id,A.value.unitPrice)},openPriceDialog:function(e){A.value=e,L.value.open()},openDialog:function(e){U.value=e;const t=e.payload.Skus[0];"stock"===e.type&&($.value=t.stock+""),"locationCode"===e.type&&($.value=t.locationCode),F.value.open()},sureStockOrCode:async function(){const e=U.value.payload.nameID,t=U.value.payload.Skus[0].skuID;let n={storeIDs:JSON.stringify([+f("storeID")])};if("stock"===U.value.type?n.payload=JSON.stringify([{nameID:e,Skus:[{skuID:t,stock:+$.value}]}]):n.payload=JSON.stringify([{nameID:e,Skus:[{skuID:t,locationCode:""+$.value?""+$.value:"EMPTY_VALUE"}]}]),F.value.close(),0==(await Ga(n)).code){let e={storeIDs:JSON.stringify([+f("storeID")]),isFocus:!0,nameIDs:JSON.stringify([U.value.payload.nameID]),fromStatus:0,toStatus:1};const t=await un.get_stores_skus(e);if(0==t.code){let e=t.data.skuNames||[];if(e.length>0){let t=d.value.findIndex(e=>e.id==U.value.payload.nameID);-1!==t&&(d.value[t]=v(e)[0])}}V("修改成功")}},handleDelete:function(){uni.jxConfirm({title:"提示",content:`确认删除《${A.value.name}》吗?`,confirmText:"确认",success:async()=>{L.value.close();let e={storeIDs:JSON.stringify([f("storeID")]),payload:JSON.stringify([{nameID:A.value.id,isFocus:-1}])};if(0==(await Ga(e)).code){if(V("删除成功"),d.value=d.value.filter(e=>e.id!=A.value.id),0==d.value.length)return t()}else V("删除失败",2)}})},refresherrefresh:function(){a.value=!0,clearTimeout(o),o=setTimeout(()=>{a.value=!1,t(),S(b.value),"hot"!=b.value&&n.value.GetStoreCategoryMap()},500)},triggered:a,leftBarRef:n,statusBarHeight:i,toExamine:function(e){R.value=e,1==e.status?H.value=e.auditPrice/100:H.value="",z.value.open()},toExamineData:R,toExaminePopup:z,toExamineConfirm:async function(){z.value.close();let e={status:R.value.status,isAsync:!1,isContinueWhenError:!0,payload:JSON.stringify([{storeID:R.value.storeID,nameID:R.value.nameID,...1==R.value.status?{auditPrice:Math.floor(100*+H.value)}:{remark:H.value}}])},n=await er(e);if(0==n.code){if(V("操作成功"),d.value=d.value.filter(e=>e.nameID!=R.value.nameID),0==d.value.length)return t()}else V(n.desc||n.data)},toExamineValue:H}}const Sr=Gn(e.defineComponent({__name:"main",setup(t){const{dafauleData:n,totalCount:o,skuNames:a,skuNameItem:r,isAudit:i,isHot:s,showMountTab:l,scrolltolower:c,isLoad:u,updateIsSale:d,updateTowFilter:m,serachShopping:p,clearInpu:f,oneMenuClick:h,isCheckoutFilter:v,isFilter:g,handleSale:y,handleChangeSale:k,updateStateOk:b,createGoods:x,isPointStore:S,skuName:N,auditUnitPrice:C,currentValue:_,popup:E,stockOrCode:I,popupDialog:D,handleConfirm:V,openPriceDialog:B,openDialog:T,sureStockOrCode:P,handleDelete:A,refresherrefresh:O,triggered:M,leftBarRef:L,statusBarHeight:j,toExamine:F,toExamineData:U,toExaminePopup:$,toExamineConfirm:R,toExamineValue:z}=xr();return(t,H)=>{const q=w(e.resolveDynamicComponent("jx-load-more"),ya),G=w(e.resolveDynamicComponent("jx-empty"),Jn),W=w(e.resolveDynamicComponent("jx-price"),ka),J=w(e.resolveDynamicComponent("uni-popup"),Ca),X=w(e.resolveDynamicComponent("jx-loading"),Wn),K=w(e.resolveDynamicComponent("jx-login-empty"),Kn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"status_bar"}),e.createElementVNode("view",null,[e.createVNode(qa,{class:"shopping-cel",isFilter:e.unref(g),onSerachShopping:e.unref(p),onClearInpu:e.unref(f),onCreateGoods:e.unref(x)},null,8,["isFilter","onSerachShopping","onClearInpu","onCreateGoods"])]),e.createElementVNode("view",{class:"main-center-root"},[e.createElementVNode("view",{class:"left-bar-root"},[e.createElementVNode("scroll-view",{"scroll-y":"",style:e.normalizeStyle({height:`calc(100vh - 92rpx - ${e.unref(j)})`})},[e.createVNode(ar,{ref_key:"leftBarRef",ref:L,dafauleData:e.unref(n),onOneMenuClick:e.unref(h)},null,8,["dafauleData","onOneMenuClick"])],4)]),e.createElementVNode("view",{class:"right-center"},[e.createVNode(br,{onUpdateIsSale:e.unref(d),onUpdateTowFilter:e.unref(m),isCheckoutFilter:e.unref(v),updateStateOk:e.unref(b)},null,8,["onUpdateIsSale","onUpdateTowFilter","isCheckoutFilter","updateStateOk"]),e.createElementVNode("scroll-view",{"scroll-y":"",style:e.normalizeStyle({height:`calc(100vh - 182rpx - ${e.unref(j)})`}),"refresher-enabled":"","refresher-triggered":e.unref(M),onScrolltolower:H[1]||(H[1]=(...t)=>e.unref(c)&&e.unref(c)(...t)),onRefresherrefresh:H[2]||(H[2]=(...t)=>e.unref(O)&&e.unref(O)(...t))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),t=>(e.openBlock(),e.createBlock(wr,{key:t.id,skuName:t,isAudit:e.unref(i),isHot:e.unref(s),showMountTab:e.unref(l),onHandleSale:e.unref(y),onOpenPriceDialog:e.unref(B),onOpenDialog:e.unref(T),onToExamine:e.unref(F)},null,8,["skuName","isAudit","isHot","showMountTab","onHandleSale","onOpenPriceDialog","onOpenDialog","onToExamine"]))),128)),e.withDirectives(e.createVNode(q,{isLoad:e.unref(u),tip:"没有更多商品了"},null,8,["isLoad"]),[[e.vShow,e.unref(o)>=4]]),e.withDirectives(e.createVNode(G,{class:"jx-empty",title:"该分类暂无商品"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"createGoods",onClick:H[0]||(H[0]=(...t)=>e.unref(x)&&e.unref(x)(...t))},"去创建商品")]),_:1},512),[[e.vShow,0==e.unref(o)]])],44,["refresher-triggered"])])]),e.unref(l)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"MountWrap"},[e.createElementVNode("view",{class:"btn onActive",onClick:H[3]||(H[3]=t=>e.unref(k)(1))},"可售"),e.createElementVNode("view",{class:"btn onActive",onClick:H[4]||(H[4]=t=>e.unref(k)(-1))},"不可售")])):e.createCommentVNode("",!0),e.createVNode(J,{ref_key:"popup",ref:E,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"status_bar"}),e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("text",{class:"text"},e.toDisplayString(e.unref(S)?"改价":"提交改价审核"),1),e.createElementVNode("view",{class:"tip"},[e.createTextVNode(" 当前价格每"),e.createElementVNode("text",{style:{color:"#f60d58"}},e.toDisplayString("份"===e.unref(N).unit?"斤":e.unref(N).unit),1),e.createTextVNode(": "),e.createVNode(W,{price:e.unref(N).unitPrice,color:"#4eb331"},null,8,["price"])]),e.unref(C)>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"tip audit"},[e.createTextVNode(" 正在审核:¥"),e.createElementVNode("text",null,e.toDisplayString(e.unref(C)),1)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"digit","onUpdate:modelValue":H[5]||(H[5]=t=>e.isRef(_)?_.value=t:null),placeholder:"请输入修改价格"},null,512),[[e.vModelText,e.unref(_)]]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:H[6]||(H[6]=t=>e.unref(E).close())},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:H[7]||(H[7]=(...t)=>e.unref(V)&&e.unref(V)(...t))},"确定修改")]),e.createElementVNode("view",{class:"delete"},[e.createElementVNode("view",{class:"delete-text",onClick:H[8]||(H[8]=(...t)=>e.unref(A)&&e.unref(A)(...t))},"删除《"+e.toDisplayString(e.unref(N).name)+"》",1)])])]),_:1},512),e.createVNode(J,{ref_key:"toExaminePopup",ref:$,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"status_bar"}),e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("text",{class:"text"},e.toDisplayString(1==e.unref(U).status?"同意申请":"拒绝申请"),1),e.createElementVNode("view",{class:"tip audit"},"商户申请价格:¥"+e.toDisplayString(e.unref(U).auditPrice/100),1),e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"digit","onUpdate:modelValue":H[9]||(H[9]=t=>e.isRef(z)?z.value=t:null),placeholder:1==e.unref(U).status?"请输入审核价格":"请输入拒绝原因"},null,8,["placeholder"]),[[e.vModelText,e.unref(z)]]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:H[10]||(H[10]=t=>e.unref($).close())},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:H[11]||(H[11]=(...t)=>e.unref(R)&&e.unref(R)(...t))},"确定")])])]),_:1},512),e.createVNode(J,{ref_key:"popupDialog",ref:D,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("view",{class:"text"},e.toDisplayString("stock"===e.unref(r).type?"修改库存":"修改货架码"),1),e.createElementVNode("view",{class:"tip-new"},e.toDisplayString(e.unref(r).name),1),e.createElementVNode("view",{class:"ipt-box"},[e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"stock"===e.unref(r).type?"number":"text","onUpdate:modelValue":H[12]||(H[12]=t=>e.isRef(I)?I.value=t:null),placeholder:"stock"===e.unref(r).type?"请输入商品库存":"请输入商品货架码"},null,8,["type","placeholder"]),[[e.vModelDynamic,e.unref(I)]])]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:H[13]||(H[13]=t=>e.unref(D).close())},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:H[14]||(H[14]=(...t)=>e.unref(P)&&e.unref(P)(...t))},"确定")])])]),_:1},512),e.createVNode(X),e.createVNode(K,{title:"马上登录,管理商品"})],64)}}}),[["__scopeId","data-v-24fcf901"]]),Nr=e.defineComponent({__name:"jx-ios-android",props:{isShow:{}},setup(t){const n=e.computed(()=>uni.getSystemInfoSync().platform);return(t,o)=>n.value==t.isShow?(e.openBlock(),e.createElementBlock("view",{key:0},[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("",!0)}});const Cr=e.defineComponent({__name:"jx-tab",emits:["jxTab"],setup(t,{expose:n,emit:o}){const{currentStatus:a,orderStatus:r,scrollLeft:i,record:s,clickTab:l,getOrderCount:c}=function(){x(async()=>{await r()});const t=e.ref(2),n=e.ref([{id:1,status:[3],name:"待接单",count:0},{id:2,status:[10],name:"待拣货",count:0},{id:3,status:[15],name:"待配送",count:0},{id:4,status:[20],name:"配送中",count:0},{id:5,status:[5,10,15,20,17,18,22],name:"异常单",count:0},{id:6,status:[155,160,165,167,180,190],name:"售后单",count:0},{id:7,status:[110,115,120],name:"已完成",count:0}]),o=e.ref(0),a=e.ref(1);async function r(){let e={storeID:f("storeID"),lastHours:1*(new Date).getHours()+48},t=await po(e),o=await fo(e);if(0==t.code&&0==o.code){let e=t.data||[],a=o.data||[];e.length>0?(n.value[0].count=e.filter(e=>3===e.status&&0===e.lockStatus).length>0?e.filter(e=>3===e.status&&0===e.lockStatus)[0].count:0,n.value[0].count+=e.filter(e=>3===e.status&&-20===e.lockStatus).length>0?e.filter(e=>3===e.status&&0===e.lockStatus)[0].count:0,n.value[1].count=e.filter(e=>10===e.status&&0===e.lockStatus).length>0?e.filter(e=>10===e.status&&0===e.lockStatus)[0].count:0,n.value[1].count+=e.filter(e=>10===e.status&&-20===e.lockStatus).length>0?e.filter(e=>10===e.status&&0===e.lockStatus)[0].count:0,n.value[2].count=e.filter(e=>15===e.status&&0===e.lockStatus).length>0?e.filter(e=>15===e.status&&0===e.lockStatus)[0].count:0,n.value[2].count+=e.filter(e=>15===e.status&&-20===e.lockStatus).length>0?e.filter(e=>15===e.status&&-20===e.lockStatus)[0].count:0,n.value[3].count=e.filter(e=>20===e.status&&0===e.lockStatus).length>0?e.filter(e=>20===e.status&&0===e.lockStatus)[0].count:0,n.value[3].count+=e.filter(e=>20===e.status&&-20===e.lockStatus).length>0?e.filter(e=>20===e.status&&-20===e.lockStatus)[0].count:0,n.value[4].count=e.filter(e=>17===e.status&&0===e.lockStatus).length>0?e.filter(e=>17===e.status&&0===e.lockStatus)[0].count:0,n.value[4].count+=e.filter(e=>18===e.status&&0===e.lockStatus).length>0?e.filter(e=>18===e.status&&0===e.lockStatus)[0].count:0,n.value[4].count+=e.filter(e=>22===e.status&&0===e.lockStatus).length>0?e.filter(e=>22===e.status&&0===e.lockStatus)[0].count:0,n.value[4].count+=e.filter(e=>-5===e.lockStatus&&e.status<100).length>0?e.filter(e=>-5===e.lockStatus&&e.status<100)[0].count:0):(n.value[0].count=0,n.value[1].count=0,n.value[2].count=0,n.value[3].count=0,n.value[4].count=0),a.length>0?(n.value[5].count=a.find(e=>155===e.status)?a.find(e=>155===e.status).count:0,n.value[5].count+=a.find(e=>165===e.status)?a.find(e=>155===e.status).count:0):n.value[5].count=0}}return{currentStatus:t,orderStatus:n,scrollLeft:o,record:a,clickTab:function(e,n,i){t.value=e;let{offsetLeft:s}=i.target;o.value=e>n?s-75:s-225,a.value=e,r()},getOrderCount:r}}(),u=o;let d=2;return n({getOrderCount:c}),(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"jx-tabs"},[e.createElementVNode("scroll-view",{class:"tab-scroll","scroll-x":"true","scroll-with-animation":"","scroll-left":e.unref(i)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),t=>(e.openBlock(),e.createElementBlock("view",{key:t.id,class:e.normalizeClass(["scroll-item",{jxTabsActive:e.unref(a)==t.id}]),onClick:n=>function(e,t,n,o){if(d==e)return!1;d=e,u("jxTab",t),l(e,n,o)}(t.id,t,e.unref(s),n)},[e.createTextVNode(e.toDisplayString(t.name)+" ",1),0!=t.count?(e.openBlock(),e.createElementBlock("text",{key:0,class:"badge"},e.toDisplayString(t.count),1)):e.createCommentVNode("",!0)],10,["onClick"]))),128))],8,["scroll-left"])]))}}),_r=Gn(Cr,[["__scopeId","data-v-d5154d63"]]),Er=Gn(e.defineComponent({__name:"orderListTop",props:{item:{}},setup(t){const{copyInfo:n,phoneCall:o}=aa();let a=t;const r=e.computed(()=>(17===a.item.status||18===a.item.status||22===a.item.status)&&-5!==a.item.lockStatus),i=e.computed(()=>(10===a.item.status||15===a.item.status||20===a.item.status)&&0===a.item.lockStatus),s=e.computed(()=>3===a.item.vendorID?a.item.vendorOrderID2:a.item.vendorOrderID),l=e.computed(()=>{let e=a.item;return-5===e.lockStatus?"申请取消":17===e.status?"待审核":18===e.status?"取货失败":22===e.status?"投递失败":"未知"}),c=e.ref(),u=e.ref();x(()=>{if(-5===a.item.lockStatus){let{purchaseVendorInfo:e}=qn.state.serveInfo.sysInfo,{userApplyCancelWaitMinute:t}=e[a.item.vendorID],n=new Date(a.item.lockStatusTime).getTime()+60*t*1e3-(new Date).getTime();c.value=n>0?`${new Date(n).getMinutes()}`:"已超时",u.value=setInterval(()=>{n=new Date(a.item.lockStatusTime).getTime()+60*t*1e3-(new Date).getTime(),c.value=n>0?`${new Date(n).getMinutes()}`:"已超时"},1e3)}});const d=e.computed(()=>{let e="";return e=It(a.item.expectedDeliveredTime)?new Date(new Date(a.item.orderCreatedAt).getTime()+36e5):new Date(a.item.expectedDeliveredTime),`${e.getHours()<10?"0"+e.getHours():e.getHours()}:${e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes()}`}),m=e.computed(()=>{let e="";e=It(a.item.pickDeadline)?It(a.item.expectedDeliveredTime)?new Date(a.item.orderCreatedAt).getTime()+18e5:new Date(a.item.expectedDeliveredTime).getTime()-18e5:new Date(a.item.pickDeadline).getTime();let t=(e-(new Date).getTime())/1e3/60;t=Math.floor(t);let n="";n=It(a.item.expectedDeliveredTime)?new Date(a.item.orderCreatedAt).getTime()+36e5-(new Date).getTime():new Date(a.item.expectedDeliveredTime).getTime()-(new Date).getTime();let o=Math.floor(n/1e3/60);switch(a.item.status){case 10:return 0===a.item.lockStatus?t<0?'<span class="order-bg-cs"> </span>':t<5?`<span class="rest-time picktime3">${t}分钟</span>`:t<10?`<span class="rest-time picktime2">${t}分钟</span>`:t>60&&2===a.item.businessType?'<span class="order-bg-dsd"> </span>':`<span class="rest-time picktime1">${t}分钟</span>`:'<span class="order-delivered">已锁定</span>';case 15:case 20:return p(o);case 105:case 110:return'<span class="order-delivered">已送达</span>';case 115:return'<span class="order-delivered">已取消</span>';case 120:return'<span class="order-delivered">已失败</span>';default:return""}});function p(e){return e<0?'<span class="order-bg-cs"> </span>':e<5?`<span class="rest-time arrived3">${e}分钟</span>`:e<20?`<span class="rest-time arrived2">${e}分钟</span>`:e>60&&2===a.item.businessType?'<span class="order-bg-dsd"> </span>':`<span class="rest-time arrived1">${e}分钟</span>`}return e.computed(()=>110!=a.item.status&&115!=a.item.status&&120!=a.item.status),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"order-info"},[e.createElementVNode("view",{class:"order"},[e.createElementVNode("view",{class:"h-number index-color"},[e.createElementVNode("text",{class:e.normalizeClass(["brand",`icon-${t.item.vendorID}`])},null,2),e.createElementVNode("text",{class:"num-root"},[e.createElementVNode("text",null,"#"),e.createElementVNode("text",{class:"num"},e.toDisplayString(t.item.orderSeq),1)])]),t.item.buyerComment.includes("支付方式")?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"timer"},"预计"+e.toDisplayString(d.value)+"前送达",1))]),i.value?(e.openBlock(),e.createElementBlock("view",{key:0,innerHTML:m.value},null,8,["innerHTML"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("view",{key:1},[-5!==t.item.lockStatus||6&t.item.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0},[e.createElementVNode("text",{class:"rest-time canceltime"},[e.createTextVNode(e.toDisplayString(c.value),1),"已超时"!==c.value?(e.openBlock(),e.createElementBlock("text",{key:0},"分钟")):e.createCommentVNode("",!0)])])),e.createElementVNode("text",{class:"order-delivered"},e.toDisplayString(l.value),1)])):e.createCommentVNode("",!0),110===t.item.status?(e.openBlock(),e.createElementBlock("text",{key:2,class:"compelet"},"已完成")):115===t.item.status?(e.openBlock(),e.createElementBlock("text",{key:3,class:"cancel"},"已取消")):120===t.item.status?(e.openBlock(),e.createElementBlock("text",{key:4,class:"fail"},"已失败")):e.createCommentVNode("",!0)]),t.item.buyerComment.includes("支付方式")?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"order-title"},[e.createElementVNode("view",null,[e.createElementVNode("text",{class:"name"},e.toDisplayString(t.item.consigneeName.slice(0,1))+"...",1)]),e.createElementVNode("view",{class:"see-map",onClick:a[0]||(a[0]=e.withModifiers(e=>function(e){let t=[];if(e.consigneeMobile){let n=e.consigneeMobile.split(",");t.push(n[1]?"临1:"+n[0]+"转"+n[1]:"临1:"+n[0])}if(e.consigneeMobile2){let n=e.consigneeMobile2.split(",");t.push(n[1]?"临1:"+n[0]+"转"+n[1]:"临1:"+n[0])}if(0===t.length)return V("该订单暂无联系方式",2);uni.showActionSheet({itemColor:"#4eb331",itemList:t,popover:{width:5e3},success:function(t){0===t.tapIndex&&o(e.consigneeMobile),1===t.tapIndex&&o(e.consigneeMobile2)}})}(t.item),["stop"]))},"拨打电话"),e.createElementVNode("view",{class:"see-map",onClick:a[1]||(a[1]=e.withModifiers(e=>function(e){if(1===e.vendorID){if(1!==qn.getters["storeInfo/imMtStatus"][0].imStatus)return V("美团IM状态已关闭",1);h("vendorUserInfo",{venderOrderID:e.vendorOrderID,orderSeq:e.orderSeq,vendorOrgCode:e.vendorOrgCode,vendorStoreID:e.vendorStoreID,userID:e.vendorUserID,vendorID:e.vendorID}),uni.navigateTo({url:"/subPages/messageChild/msgChat/msgChat"})}else V("暂不支持聊天",2)}(t.item),["stop"]))},"发消息")])),e.createElementVNode("view",{class:"order-number",onClick:a[2]||(a[2]=e.withModifiers(t=>e.unref(n)(s.value,"复制订单号成功"),["stop"]))},[e.createElementVNode("text",{class:"number"},"订单号:"+e.toDisplayString(s.value),1),e.createElementVNode("text",{class:"copy"},"复制")])],64))}}),[["__scopeId","data-v-9f25b762"]]),Ir=Gn(e.defineComponent({__name:"jx-real-income",props:{orderData:{},color:{default:"#000"},isTip:{type:Boolean,default:!0},size:{default:"32rpx"}},setup(t){e.useCssVars(e=>({"92f858d8":e.color,ebe91ca0:e.size}));const n=t,o=e.computed(()=>qn.getters["storeInfo/isPointStore"]),a=e.computed(()=>{const e=n.orderData;if(Object.keys(e).length){if(new Date(e.orderCreatedAt)<new Date("2020-06-07 18:00:00"))return e.oldPayPercentage>=50&&e.oldPayPercentage<=100?(e.earningPrice/100).toFixed(2):((e.totalShopMoney-e.desiredFee)*(100-e.oldPayPercentage/2)/100/100).toFixed(2);return function(e){return 0!=e.vendorPayPercentage?e.vendorPayPercentage<50?(e.actualPayPrice/100).toFixed(2):(e.earningPrice/100).toFixed(2):e.isPointStore?(e.actualPayPrice/100).toFixed(2):(e.earningPrice/100).toFixed(2)}({vendorPayPercentage:e.vendorPayPercentage,actualPayPrice:e.actualPayPrice,shopPrice:e.shopPrice,isPointStore:o.value,payPercentage:e.payPercentage,earningPrice:e.earningPrice})}return 0});return(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("text",null,"¥"+e.toDisplayString(a.value),1),a.value>=100&&t.isTip?(e.openBlock(),e.createElementBlock("image",{key:0,class:"not-rot",src:"https://image.jxc4.com/image/55bf8b7218f23db8cf3b39531dccf738.png",mode:"scaleToFill"})):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-9512d36c"]]),Dr=Gn(e.defineComponent({__name:"orderMoney",props:{item:{}},setup(t){const n=e.computed(()=>qn.getters["storeInfo/isPointStore"]);return(t,o)=>{const a=w(e.resolveDynamicComponent("jx-real-income"),Ir);return e.openBlock(),e.createElementBlock("view",{class:"order-totalCount"},[e.createElementVNode("text",{class:"totalCount"},"共"+e.toDisplayString(t.item.skuCount)+"种"+e.toDisplayString(t.item.goodsCount)+"件商品",1),e.createElementVNode("view",null,[e.createTextVNode(e.toDisplayString(0!=t.item.vendorPayPercentage?t.item.vendorPayPercentage<50?"实际支付:":"实际收入:":n.value?"实际支付:":"实际收入:"),1),e.createVNode(a,{orderData:t.item,color:"#585858"},null,8,["orderData"])]),2===t.item.businessType?(e.openBlock(),e.createElementBlock("view",{key:0,class:"preIcon"},"预订单")):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-7955ea9f"]]),Vr=Gn(e.defineComponent({__name:"jx-real-income-jxgy",props:{order:{},color:{default:"#000"},isTip:{type:Boolean,default:!0}},setup(t){e.useCssVars(e=>({"3dcf0826":e.color}));const n=t,o=e.computed(()=>qn.getters["storeInfo/isPointStore"]),a=e.computed(()=>{const e=n.order;return Object.keys(e).length?o.value?e.newEarningPrice?(e.newEarningPrice/100).toFixed(2):"0.00":e.earningPrice?(e.earningPrice/100).toFixed(2):"0.00":0});return(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("text",null,"¥"+e.toDisplayString(a.value),1),a.value>=100&&t.isTip?(e.openBlock(),e.createElementBlock("image",{key:0,class:"not-rot",src:"https://image.jxc4.com/image/55bf8b7218f23db8cf3b39531dccf738.png",mode:"scaleToFill"})):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-41c8a501"]]),Br=Gn(e.defineComponent({__name:"orderMoneyJxgy",props:{item:{}},setup:t=>(t,n)=>{const o=w(e.resolveDynamicComponent("jx-real-income-jxgy"),Vr);return e.openBlock(),e.createElementBlock("view",{class:"order-totalCount"},[e.createElementVNode("text",{class:"totalCount"},"共"+e.toDisplayString(t.item.skuCount)+"种"+e.toDisplayString(t.item.goodsCount)+"件商品",1),e.createElementVNode("view",null,[e.createTextVNode(" 门店收益:"),e.createVNode(o,{order:t.item,color:"#585858"},null,8,["order"])]),2===t.item.businessType?(e.openBlock(),e.createElementBlock("view",{key:0,class:"preIcon"},"预订单")):e.createCommentVNode("",!0)])}}),[["__scopeId","data-v-c8d4dbd5"]]),Tr=Gn(e.defineComponent({__name:"pending-order",props:{item:{}},setup(t){const{orderDetail:n}=aa();async function o(e,t,n){let o={vendorOrderID:e,vendorID:t,isAccept:n};0==(await vo(o)).code?(V(n?"接单成功":"拒绝订单成功",1),qn.commit("serveInfo/setUpdateOrder",Date.now())):V("订单数据异常")}return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"pending-order-root position-relative",onClick:a[2]||(a[2]=o=>e.unref(n)(t.item.vendorOrderID,t.item.vendorID))},[e.createVNode(Er,{item:t.item},null,8,["item"]),"jxcs"==e.unref(f)("terrace")||"gblm"==e.unref(f)("terrace")?(e.openBlock(),e.createBlock(Dr,{key:0,item:t.item},null,8,["item"])):(e.openBlock(),e.createBlock(Br,{key:1,item:t.item},null,8,["item"])),e.createElementVNode("view",{class:"operation-btn"},[e.createElementVNode("view",{class:"refuse",onClick:a[0]||(a[0]=e.withModifiers(e=>o(t.item.vendorOrderID,t.item.vendorID,!1),["stop"]))},"拒绝接单"),e.createElementVNode("view",{class:"need",onClick:a[1]||(a[1]=e.withModifiers(e=>o(t.item.vendorOrderID,t.item.vendorID,!0),["stop"]))},"立即接单")])]))}}),[["__scopeId","data-v-850c95ab"]]),Pr=Gn(e.defineComponent({__name:"pending-picking",props:{item:{}},setup(t){const{orderDetail:n,printerOrder:o}=aa();return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"pending-picking-root position-relative",onClick:a[2]||(a[2]=o=>e.unref(n)(t.item.vendorOrderID,t.item.vendorID))},[e.createVNode(Er,{item:t.item},null,8,["item"]),e.createElementVNode("view",{class:"remarks"},"备注:"+e.toDisplayString(t.item.buyerComment||"该订单用户未进行备注"),1),"jxcs"==e.unref(f)("terrace")||"gblm"==e.unref(f)("terrace")?(e.openBlock(),e.createBlock(Dr,{key:0,item:t.item},null,8,["item"])):(e.openBlock(),e.createBlock(Br,{key:1,item:t.item},null,8,["item"])),10===t.item.status&&0===t.item.lockStatus?(e.openBlock(),e.createElementBlock("view",{key:2,class:"operation"},[e.createElementVNode("view",{class:"printerBtn",onClick:a[0]||(a[0]=e.withModifiers(n=>e.unref(o)(t.item.vendorOrderID,t.item.vendorID),["stop"]))},"打印订单"),e.createElementVNode("view",{class:"pickingBtn",onClick:a[1]||(a[1]=e.withModifiers(e=>async function(e,t){let n={vendorOrderID:e,vendorID:t};0==(await ko(n)).code?(V("拣货成功",1),qn.commit("serveInfo/setUpdateOrder",Date.now())):V("拣货异常",2)}(t.item.vendorOrderID,t.item.vendorID),["stop"]))},"拣货完成")])):e.createCommentVNode("",!0),"self"===t.item.deliveryType?(e.openBlock(),e.createElementBlock("view",{key:3,class:"self-order"},"[自提订单]")):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-8761086d"]]),Ar=Gn(e.defineComponent({__name:"pending-distribution",props:{item:{},type:{}},setup(t){const{orderDetail:n,deliverManager:o,phoneCall:a,waybillVendor:r}=aa(),i=t,s=e.computed(()=>r(i.item.waybillVendorID,i.item.status,i.item.waybillStatus)),l=e.computed(()=>!(3&~i.item.deliveryFlag||0!==i.item.lockStatus||"self"===i.item.deliveryType||i.item.vendorWaybillID)),c=e.computed(()=>15===i.item.status&&-1===i.item.waybillVendorID&&0===i.item.lockStatus&&"self"===i.item.deliveryType),u=e.ref(null);function d(){m.value="",u.value.open()}const m=e.ref();function p(e){if("jx"!=e&&""==m.value)return V("请输入自提码");uni.jxConfirm({title:"自提订单",content:"是否完成自提(请确保用户已出示正确订单,以免引起不必要的损失)",success:async()=>{let t={vendorOrderID:i.item.vendorOrderID,vendorID:i.item.vendorID,selfTakeCode:"jx"===e?"135246":m.value};0==(await wo(t)).code?(V("自提成功",1),u.value.close(),qn.commit("serveInfo/setUpdateOrder",Date.now())):V("自提发生异常",2)}})}function h(){uni.jxConfirm({title:"提示",content:"是否确认送达商品",success:async()=>{let e={vendorOrderID:i.item.vendorOrderID,vendorID:i.item.vendorID},t=await bo(e);0==t.code?(V("送达成功",1),qn.commit("serveInfo/setUpdateOrder",Date.now())):V("送达异常"+t.desc,2)}})}return(t,r)=>{const i=w(e.resolveDynamicComponent("jx-icon"),Yn),v=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"distribution-root position-relative",onClick:r[4]||(r[4]=o=>e.unref(n)(t.item.vendorOrderID,t.item.vendorID))},[e.createVNode(Er,{item:t.item},null,8,["item"]),e.createElementVNode("view",{class:"address"},"地址:"+e.toDisplayString(t.item.consigneeAddress),1),"jxcs"==e.unref(f)("terrace")||"gblm"==e.unref(f)("terrace")?(e.openBlock(),e.createBlock(Dr,{key:0,item:t.item},null,8,["item"])):(e.openBlock(),e.createBlock(Br,{key:1,item:t.item},null,8,["item"])),t.item.courierName?(e.openBlock(),e.createElementBlock("view",{key:2,class:"distribution-msg"},[e.createElementVNode("text",{class:"vender-name"},e.toDisplayString(s.value),1),e.createElementVNode("text",{class:"distribution-name"},e.toDisplayString(t.item.courierName),1),t.item.courierMobile.split(",")[1]?(e.openBlock(),e.createElementBlock("text",{key:0,class:"distribution-mobile",onClick:r[0]||(r[0]=e.withModifiers(n=>e.unref(a)(t.item.courierMobile),["stop"]))},e.toDisplayString(t.item.courierMobile.split(",")[0]+"转"+t.item.courierMobile.split(",")[1]),1)):(e.openBlock(),e.createElementBlock("text",{key:1,class:"distribution-mobile"},e.toDisplayString(t.item.courierMobile),1)),e.createVNode(i,{icon:"24gf-telephone",color:"#999999",onClick:r[1]||(r[1]=e.withModifiers(n=>e.unref(a)(t.item.courierMobile),["stop"])),size:38})])):e.createCommentVNode("",!0),"self"===t.item.deliveryType?(e.openBlock(),e.createElementBlock("view",{key:3,class:"self-order self"},"[自提订单]")):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"operation"},[e.createElementVNode("view",{class:"printerBtn",onClick:r[2]||(r[2]=e.withModifiers(n=>e.unref(o)(t.item.vendorOrderID),["stop"]))},"配送管理"),e.createElementVNode("view",{class:"pickingBtn"},"查看详情")]),c.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[9!=t.item.vendorID?(e.openBlock(),e.createElementBlock("view",{key:0,class:"btn-picked",onClick:e.withModifiers(d,["stop"])},"输入自提码")):(e.openBlock(),e.createElementBlock("view",{key:1,class:"btn-picked",onClick:r[3]||(r[3]=e.withModifiers(e=>p("jx"),["stop"]))},"完成自提"))],64)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",{key:5,class:"btn-picked",onClick:e.withModifiers(h,["stop"])},[e.createTextVNode(" 确认送达 "),128&~t.item.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0},"[已操作]"))])):e.createCommentVNode("",!0)]),e.createVNode(v,{ref_key:"popup",ref:u,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"takeCode-root"},[e.createElementVNode("view",{class:"title"},"自提订单"),e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"text",placeholder:"请输入自提码","onUpdate:modelValue":r[5]||(r[5]=e=>m.value=e)},null,512),[[e.vModelText,m.value]]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"cancel",onClick:r[6]||(r[6]=e.withModifiers(e=>u.value.close(),["stop"]))},"取消"),e.createElementVNode("view",{class:"confirm",onClick:r[7]||(r[7]=e.withModifiers(e=>p("noJx"),["stop"]))},"确定")])])]),_:1},512)],64)}}}),[["__scopeId","data-v-1d2a81d2"]]),Or=Gn(e.defineComponent({__name:"after-sales-order",props:{item:{}},setup(t){const{copyInfo:n,afterSalesDetaile:o}=aa(),a=t,r=e.computed(()=>{switch(a.item.status){case 155:return"待审核";case 160:return"已审核";case 165:return"退货待确认";case 167:return"退货已收到";case 180:return"售后成功";case 190:return"售后失败";default:return"未知"}}),i=e.computed(()=>{switch(a.item.appealType){case 1:return"仅退款";case 2:return"退货退款";case 3:return"重发商品";default:return"未知"}}),s=e.computed(()=>{let e=0;return a.item.skus.forEach(t=>{e+=t.count}),e}),l=e.ref(null),c=e.ref("");async function u(e){let t={afsOrderID:a.item.afsOrderID,vendorID:a.item.vendorID,approveType:e,reason:1===e?"同意退款":c.value};m(await So(t))}async function d(){c.value?u(3):V("请输入驳回原因")}function m(e){0==e.code?(V("操作成功",1),p(),qn.commit("serveInfo/setUpdateOrder",Date.now())):uni.jxAlert({title:"错误",content:e.desc})}function p(){c.value="",l.value.close()}function f(){uni.jxConfirm({title:"提示",content:"是否同意处理该售后单",success:()=>{u(1)}})}function h(){uni.jxConfirm({title:"提示",content:"是否已经收到货",success:async()=>{let e={afsOrderID:a.item.afsOrderID,vendorID:a.item.vendorID};m(await _o(e))}})}return(t,a)=>{const u=w(e.resolveDynamicComponent("jx-icon"),Yn),m=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"after-sales-root position-relative",onClick:a[3]||(a[3]=n=>e.unref(o)(t.item.afsOrderID))},[e.createElementVNode("view",{class:"top-title"},[e.createElementVNode("view",{class:"order",onClick:a[0]||(a[0]=e.withModifiers(o=>e.unref(n)(t.item.afsOrderID,"售后单号复制成功"),["stop"]))},[e.createElementVNode("text",null,"售后单号:"+e.toDisplayString(t.item.afsOrderID),1),e.createVNode(u,{icon:"fuzhi",color:"#ffffff"})]),e.createElementVNode("text",{class:e.normalizeClass(180==t.item.status?"success":"warring")},e.toDisplayString(r.value),3)]),e.createElementVNode("view",{class:"platform",onClick:a[1]||(a[1]=e.withModifiers(o=>e.unref(n)(t.item.vendorOrderID,"订单号复制成功"),["stop"]))},[e.createElementVNode("text",{class:e.normalizeClass(["brand",`icon-${t.item.vendorID}`])},null,2),e.createElementVNode("text",{class:"orderSeq"},"#"+e.toDisplayString(t.item.orderSeq),1),e.createElementVNode("text",{class:"num"},"订单号:"+e.toDisplayString(t.item.vendorOrderID),1),e.createVNode(u,{icon:"fuzhi",color:"#818181"})]),e.createElementVNode("view",{class:"detaile-text"},e.toDisplayString(t.item.reasonDesc||"用户未评价"),1),e.createElementVNode("view",{class:"after-text"},[e.createElementVNode("text",null,"售后方式:"),e.createElementVNode("text",{class:"mode"},e.toDisplayString(i.value),1)]),e.createElementVNode("view",{class:"created-time"},"申请时间:"+e.toDisplayString(e.unref(_t)(t.item.afsCreatedAt)||"无"),1),null!=t.item.skus?(e.openBlock(),e.createElementBlock("view",{key:0,class:"shopping-count"},"共"+e.toDisplayString(t.item.skus.length||0)+"份 "+e.toDisplayString(s.value)+"件商品",1)):e.createCommentVNode("",!0),t.item.refuseReason?(e.openBlock(),e.createElementBlock("view",{key:1,class:"shopping-count"},[e.createElementVNode("text",null,"驳回理由: "+e.toDisplayString(t.item.refuseReason),1)])):e.createCommentVNode("",!0),155!==t.item.status||3&t.item.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:2,class:"operation-btn"},[e.createElementVNode("text",{class:"text"},"若退款造成的损失较大,建议联系顾客,自行上门取回退货。"),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"reject",onClick:a[2]||(a[2]=e.withModifiers(e=>l.value.open(),["stop"]))},"驳回"),e.createElementVNode("view",{class:"resolve",onClick:e.withModifiers(f,["stop"])},"同意")])])),165!==t.item.status||4&t.item.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:3,class:"confirm-goods"},[e.createElementVNode("view",{class:"text",onClick:e.withModifiers(h,["stop"])},"商家确认收货")])),e.createElementVNode("view",{class:"detail-btn"},"查看详情"),e.createElementVNode("view",{class:"tips-text"},[155===t.item.status&&3&t.item.flag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[1==(3&t.item.flag)?(e.openBlock(),e.createElementBlock("text",{key:0},"已【同意】售后")):e.createCommentVNode("",!0),3&~t.item.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:1},"已【驳回】售后"))],64)):e.createCommentVNode("",!0),165===t.item.status&&4&t.item.flag?(e.openBlock(),e.createElementBlock("text",{key:1},"已确认收货")):e.createCommentVNode("",!0)])]),e.createVNode(m,{ref_key:"popup",ref:l,type:"center"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"reson-root"},[e.createElementVNode("view",{class:"title"},"驳回原因"),e.withDirectives(e.createElementVNode("textarea",{class:"textarea","onUpdate:modelValue":a[4]||(a[4]=e=>c.value=e),placeholder:"请输入驳回原因"},null,512),[[e.vModelText,c.value,void 0,{trim:!0}]]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"cancal",onClick:p},"取消"),e.createElementVNode("view",{class:"confirm",onClick:d},"确定")])])]),_:1},512)],64)}}}),[["__scopeId","data-v-7ce6cde7"]]),Mr=Gn(e.defineComponent({__name:"completed",props:{item:{}},setup(t){const{orderDetail:n,phoneCall:o,waybillVendor:a}=aa(),r=t,i=e.computed(()=>a(r.item.waybillVendorID,r.item.status,r.item.waybillStatus));return(t,a)=>{const r=w(e.resolveDynamicComponent("jx-icon"),Yn);return e.openBlock(),e.createElementBlock("view",{class:"compelet-root position-relative",onClick:a[3]||(a[3]=o=>e.unref(n)(t.item.vendorOrderID,t.item.vendorID))},[e.createVNode(Er,{item:t.item},null,8,["item"]),"jxcs"==e.unref(f)("terrace")||"gblm"==e.unref(f)("terrace")?(e.openBlock(),e.createBlock(Dr,{key:0,item:t.item},null,8,["item"])):(e.openBlock(),e.createBlock(Br,{key:1,item:t.item},null,8,["item"])),e.createElementVNode("view",{class:"address"},"地址:"+e.toDisplayString(t.item.buyerComment.includes("支付方式")?e.unref(qn).getters["storeInfo/storeAddress"]:t.item.consigneeAddress),1),t.item.buyerComment.includes("支付方式")?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:2,class:"distribution-msg"},[e.createElementVNode("text",{class:"vender-name"},e.toDisplayString(i.value),1),e.createElementVNode("text",{class:"distribution-name"},e.toDisplayString(t.item.courierName),1),t.item.courierMobile.split(",")[1]?(e.openBlock(),e.createElementBlock("text",{key:0,class:"distribution-mobile",onClick:a[0]||(a[0]=e.withModifiers(n=>e.unref(o)(t.item.courierMobile),["stop"]))},e.toDisplayString(t.item.courierMobile.split(",")[0]+"转"+t.item.courierMobile.split(",")[1]),1)):(e.openBlock(),e.createElementBlock("text",{key:1,class:"distribution-mobile",onClick:a[1]||(a[1]=e.withModifiers(n=>e.unref(o)(t.item.courierMobile),["stop"]))},e.toDisplayString(t.item.courierMobile),1)),e.withDirectives(e.createVNode(r,{icon:"24gf-telephone",color:"#999999",onClick:a[2]||(a[2]=e.withModifiers(n=>e.unref(o)(t.item.courierMobile),["stop"])),size:38,style:{"margin-left":"10rpx"}},null,512),[[e.vShow,""!=t.item.courierMobile]])])),e.createElementVNode("view",{class:"detail-btn"},"查看详情")])}}}),[["__scopeId","data-v-0df05f9b"]]),Lr=e.defineComponent({__name:"order-filter",props:{orderState:{},orderStateInfo:{}},emits:["filterData"],setup(t,{expose:n,emit:o}){const a=e.ref(null),r=t,i=e.ref(0),s=e.ref([{key:0,name:"创建时间"},{key:1,name:"完成时间"}]);function l(e){i.value=+e.detail.value}const c=e.ref(Et(+new Date((new Date).getTime()-6048e5)));e.watch(()=>r.orderStateInfo,e=>{e&&6===e.id&&e.count?(N.value=1,c.value=Et(+new Date((new Date).getTime()-1728e5))):(N.value=0,c.value=Et(+new Date((new Date).getTime()-6048e5)))});const u=e.ref(Et(+new Date)),d=e.ref("");function m(e){c.value=e.detail.value}function p(e){u.value=e.detail.value}const f=e.ref(0),h=e.ref([{id:-1,name:"全部"},{id:0,name:"京东到家"},{id:1,name:"美团外卖"},{id:3,name:"饿百新零售"},{id:5,name:"京东商城"},{id:9,name:"京西商城"}]);function v(e){f.value=e.detail.value}const g=e.ref(0),y=e.ref([{id:-1,name:"全部"},{id:0,name:"京东到家专送"},{id:1,name:"美团专送"},{id:3,name:"饿百专送"},{id:101,name:"达达众包"},{id:102,name:"美团配送"},{id:103,name:"蜂鸟配送"},{id:105,name:"UU跑腿"},{id:106,name:"顺丰同城"}]);function k(e){g.value=e.detail.value}const b=e.ref(0),x=e.ref([{id:-1,name:"全部"},{id:1,name:"仅退款"},{id:2,name:"退货退款"},{id:3,name:"重发商品"}]);function S(e){b.value=e.detail.value}const N=e.ref(1),C=e.ref([{id:-1,name:"全部"},{id:155,name:"待审核"},{id:160,name:"已审核"},{id:165,name:"退货待确认"},{id:167,name:"退货已收到"},{id:180,name:"售后成功"},{id:190,name:"售后失败"}]);function _(e){N.value=e.detail.value}const E=o;function I(){let e={fromTime:c.value,toTime:u.value,vendorID:h.value[f.value].id,waybillVendorID:y.value[g.value].id,isDateFinish:Boolean(i.value),appealTypes:x.value[b.value].id,afsStatus:C.value[N.value].id};E("filterData",e),a.value.close()}return n({openRef:function(){a.value.open()}}),(t,n)=>{const o=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createBlock(o,{ref_key:"popup",ref:a,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"switch-filter"},[e.createElementVNode("view",{class:"condition"},"查询条件"),7==t.orderState?(e.openBlock(),e.createElementBlock("view",{key:0,class:"item"},[e.createElementVNode("text",{class:"title"},"时间类型:"),e.createElementVNode("picker",{class:"value",mode:"selector",value:i.value,range:s.value,"range-key":"name",onChange:l},e.toDisplayString(s.value[i.value].name),41,["value","range"])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"查询时间:"),e.createElementVNode("view",{class:"root"},[e.createElementVNode("picker",{class:"value",mode:"date",value:c.value,start:"2010-01-01",end:d.value,onChange:m},e.toDisplayString(c.value),41,["value","end"]),e.createElementVNode("text",null,"至"),e.createElementVNode("picker",{class:"value",mode:"date",value:u.value,start:"2010-01-01",end:d.value,onChange:p},e.toDisplayString(u.value),41,["value","end"])])]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"外卖平台:"),e.createElementVNode("picker",{class:"value",mode:"selector",value:f.value,range:h.value,"range-key":"name",onChange:v},e.toDisplayString(h.value[f.value].name),41,["value","range"])]),7==t.orderState?(e.openBlock(),e.createElementBlock("view",{key:1,class:"item"},[e.createElementVNode("text",{class:"title"},"配送方式:"),e.createElementVNode("picker",{class:"value",mode:"selector",value:g.value,range:y.value,"range-key":"name",onChange:k},e.toDisplayString(y.value[g.value].name),41,["value","range"])])):e.createCommentVNode("",!0),6==t.orderState?(e.openBlock(),e.createElementBlock("view",{key:2,class:"item"},[e.createElementVNode("text",{class:"title"},"售后方式:"),e.createElementVNode("picker",{class:"value",mode:"selector",value:b.value,range:x.value,"range-key":"name",onChange:S},e.toDisplayString(x.value[b.value].name),41,["value","range"])])):e.createCommentVNode("",!0),6==t.orderState?(e.openBlock(),e.createElementBlock("view",{key:3,class:"item"},[e.createElementVNode("text",{class:"title"},"售后状态:"),e.createElementVNode("picker",{class:"value",mode:"selector",value:N.value,range:C.value,"range-key":"name",onChange:_},e.toDisplayString(C.value[N.value].name),41,["value","range"])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"btnRoot"},[e.createElementVNode("text",{class:"cancel",onClick:n[0]||(n[0]=e=>a.value.close())},"取消"),e.createElementVNode("text",{class:"confirm",onClick:I},"确定")])])]),_:1},512)}}}),jr=Gn(Lr,[["__scopeId","data-v-a7b1adaf"]]),Fr=Gn(e.defineComponent({__name:"bottom-component",props:{title:{},confirmText:{},order:{}},emits:["handleCancel","handleConfirm"],setup(t,{emit:n}){const o=n;function a(){o("handleConfirm")}return(t,n)=>(e.openBlock(),e.createElementBlock("view",null,[(17!==t.order.status||24&t.order.flag)&&(22!==t.order.status||32&t.order.flag)&&(18!==t.order.status||64&t.order.flag)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"abnormal-op"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.title),1),e.createElementVNode("view",{class:"op"},[e.createElementVNode("view",{class:"btn-confirm",onClick:e.withModifiers(a,["stop"])},e.toDisplayString(t.confirmText),1)])])),17===t.order.status&&24&t.order.flag||22===t.order.status&&32&t.order.flag||18===t.order.status&&64&t.order.flag?(e.openBlock(),e.createElementBlock("view",{key:1,class:"abnormal-dealed"},[e.createTextVNode(e.toDisplayString(t.title)+" ",1),8==(24&t.order.flag)?(e.openBlock(),e.createElementBlock("text",{key:0,class:"agree"},"[已同意]")):e.createCommentVNode("",!0),24&~t.order.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:1,class:"refuse"},"[已拒绝]请联系:18048531223")),32&~t.order.flag&&64&~t.order.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:2,class:"agree"},"[已发单]")),e.createElementVNode("text",null,[e.renderSlot(t.$slots,"default",{},void 0,!0)])])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-a74efd46"]]);const Ur=Gn(e.defineComponent({__name:"abnormal-order",props:{item:{}},setup(t){const n=t,{fnCancelOrder:o,fnCancelDeliver:a,fnCallNew:r,fnGoodsReturn:i}=function(e){async function t(){let t={vendorOrderID:e.item.vendorOrderID,vendorID:e.item.vendorID};uni.jxConfirm({title:"提示",content:"是否重新召唤骑手进行配送",success:async()=>{0==(await Xo(t)).code?(V("操作成功"),qn.commit("serveInfo/setUpdateOrder",Date.now())):V("操作失败")}})}return{fnCancelOrder:function(t){let n={vendorOrderID:e.item.vendorOrderID,vendorID:e.item.vendorID,acceptIt:Boolean(t),reason:"理由暂无"};0==t&&uni.jxConfirm({title:"提示",content:"是否拒绝用户取消该订单",success:async()=>{0==(await Co(n)).code?(V("拒绝成功",1),qn.commit("serveInfo/setUpdateOrder",Date.now())):V("决绝失败",2)}}),1==t&&uni.jxConfirm({title:"提示",content:"是否同意用户取消该订单",success:async()=>{0==(await Co(n)).code?(V("同意成功",1),qn.commit("serveInfo/setUpdateOrder",Date.now())):V("同意失败",2)}})},fnCancelDeliver:function(n){let o={vendorOrderID:e.item.vendorOrderID,vendorID:e.item.vendorID,acceptIt:Boolean(n),reason:"理由暂无"};0==n&&uni.jxConfirm({title:"提示",content:"拒绝后只能由该配送员完成本订单",success:async()=>{0==(await Jo(o)).code?(qn.commit("serveInfo/setUpdateOrder",Date.now()),t()):V("操作失败",2)}}),1==n&&uni.jxConfirm({title:"提示",content:"是否同意取消该订单配送",success:async()=>{0==(await Jo(o)).code?(qn.commit("serveInfo/setUpdateOrder",Date.now()),t()):V("操作失败",2)}})},fnCallNew:t,fnGoodsReturn:function(){let t={vendorOrderID:e.item.vendorOrderID,vendorID:e.item.vendorID};uni.jxConfirm({title:"提示",content:"确认已经收到退回的货物",success:async()=>{0==(await Ko(t)).code?(V("操作成功"),qn.commit("serveInfo/setUpdateOrder",Date.now())):V("操作失败")}})}}}(n),{orderDetail:s}=aa();return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"abnormal-order position-relative",onClick:n[6]||(n[6]=n=>e.unref(s)(t.item.vendorOrderID,t.item.vendorID))},[e.createVNode(Er,{item:t.item},null,8,["item"]),"jxcs"==e.unref(f)("terrace")||"gblm"==e.unref(f)("terrace")?(e.openBlock(),e.createBlock(Dr,{key:0,item:t.item},null,8,["item"])):(e.openBlock(),e.createBlock(Br,{key:1,item:t.item},null,8,["item"])),e.createElementVNode("view",{class:"divider"}),e.createElementVNode("view",{class:"address"},"地址:"+e.toDisplayString(t.item.consigneeAddress),1),-5===t.item.lockStatus?(e.openBlock(),e.createElementBlock("view",{key:2},[6&t.item.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"abnormal-op",onClick:n[2]||(n[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("view",{class:"title"},"用户申请取消订单"),e.createElementVNode("view",{class:"op"},[e.createElementVNode("view",{class:"btn-cancel",onClick:n[0]||(n[0]=e.withModifiers(t=>e.unref(o)(0),["stop"]))},"拒绝"),e.createElementVNode("view",{class:"btn-confirm",onClick:n[1]||(n[1]=e.withModifiers(t=>e.unref(o)(1),["stop"]))},"同意")])])),6&t.item.flag?(e.openBlock(),e.createElementBlock("view",{key:1,class:"abnormal-dealed"},[e.createTextVNode(" 用户申请取消订单 "),2==(6&t.item.flag)?(e.openBlock(),e.createElementBlock("text",{key:0,class:"agree"},"[已同意]")):e.createCommentVNode("",!0),6&~t.item.flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:1,class:"refuse"},"[已拒绝]"))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),17===t.item.status&&0===t.item.lockStatus?(e.openBlock(),e.createBlock(Fr,{key:3,title:"骑手申请取消配送",onHandleCancel:n[3]||(n[3]=t=>e.unref(a)(0)),onHandleConfirm:n[4]||(n[4]=t=>e.unref(a)(1)),confirmText:"同意",order:t.item},null,8,["order"])):e.createCommentVNode("",!0),18===t.item.status&&0===t.item.lockStatus?(e.openBlock(),e.createBlock(Fr,{key:4,title:"骑手取货失败",onHandleConfirm:e.unref(r),confirmText:"重新召唤骑手",order:t.item},null,8,["onHandleConfirm","order"])):e.createCommentVNode("",!0),22===t.item.status&&0===t.item.lockStatus?(e.openBlock(),e.createBlock(Fr,{key:5,title:"用户拒收",onHandleConfirm:n[5]||(n[5]=t=>e.unref(i)()),confirmText:"确认退回",order:t.item},null,8,["order"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-8ea6e993"]]);function $r(){const{isTrades:t}=tn();function n(){b.value=[],w.value=1,S.value=0}const o=e.ref([10]),a=e.ref(2),r=e.ref();let i=null;const s=e.ref(!1);const l=e.ref(!1);let c=0,u=e.ref(!1),d=e.ref(!1),m=e.ref(!0);x(()=>{switch(uni.getSystemInfoSync().platform){case"android":const e=y("RC-NoticeMonitoring");e.isBatteryOptimizations(e=>{u.value=1!=e});y("Ba-Notify").isNotifyEnabled(e=>{d.value=!e.isNotifyEnabled}),e.isNotification(e=>{m.value=1!=e});break;case"ios":k("log","at pages/order-manager/main.ts:151","iOS不支持此功能")}});const p=e.ref(!0),h=e.ref(!1);x(async()=>{uni.removeTabBarBadge({index:0}),qn.state.storeInfo.allStoreInfo.id||await async function(){await qn.dispatch("storeInfo/getOneStore",f("storeID"))}(),c!=f("storeID")&&0!=c&&(await n(),s.value=!0),c=f("storeID"),p.value=t(new Date);let e=qn.state.storeInfo.allStoreInfo;h.value=1==e.status,uni.removeTabBarBadge({index:0})});const v=e.ref("0px");C(async()=>{uni.getSystemInfo({success:e=>{v.value=e.statusBarHeight+"px"}}),await n(),await _()});const g=e.ref(33),w=e.ref(1),b=e.ref([]),S=e.ref(0),N=e.ref({fromTime:Et(+new Date((new Date).getTime()-6048e5)),toTime:Et(+new Date),vendorID:"",waybillVendorID:"",isDateFinish:!1,appealTypes:"",afsStatus:""});async function _(){l.value=!0;let e=Et(+new Date((new Date).getTime()-6048e5)),t=Et(+new Date),r={fromDate:e,toDate:t,storeIDs:JSON.stringify([f("storeID")]),statuss:JSON.stringify(o.value),offset:g.value*(w.value-1),pageSize:g.value,isJxFirst:!0};7==a.value&&(r={fromDate:N.value.fromTime?N.value.fromTime:e,toDate:N.value.toTime?N.value.toTime:t,storeIDs:JSON.stringify([f("storeID")]),statuss:JSON.stringify(o.value),offset:g.value*(w.value-1),pageSize:g.value,isDateFinish:N.value.isDateFinish,vendorIDs:`[${N.value.vendorID}]`,waybillVendorIDs:`[${N.value.waybillVendorID}]`,isJxFirst:!0,keyword:T.value});let i=await ho(E(r));if(0==i.code){w.value<=1&&n();let e=i.data.data||[];0==e.length&&V("暂无该类型订单"),b.value=b.value.concat(e),S.value=i.data.totalCount}else await n(),S.value=0;l.value=!1}function E(e){for(let t in e)""!=e[t]&&"[-1]"!=e[t]||delete e[t];return e}async function I(){l.value=!0;let e={storeIDs:JSON.stringify([f("storeID")]),fromTime:`${N.value.fromTime} 00:00:00`,toTime:`${N.value.toTime} 23:59:59`,pageSize:g.value,offset:g.value*(w.value-1),vendorIDs:`[${N.value.vendorID}]`,appealTypes:`[${N.value.appealTypes}]`,statuss:`[${N.value.afsStatus}]`,isDetail:!0,keyword:T.value},t=await xo(E(e));if(0==t.code){w.value<=1&&n();let e=t.data.data||[];0==e.length&&V("暂无售后订单"),b.value=b.value.concat(e),S.value=t.data.totalCount}else await n(),S.value=0;l.value=!1}const D=e.ref(null);function B(){D.value.getOrderCount()}const T=e.ref("");let P=Vt(_,800),A=Vt(I,800);const O=e.ref(0);const M=e.ref(null);e.watch(()=>qn.state.serveInfo.updateOrder,async()=>{await n(),await B(),6==a.value?await I():await P()});const L=e.ref("94rpx");return e.watch(()=>a.value,e=>{[1,2,4,5].includes(e)?L.value="100rpx":L.value="190rpx"}),e.onBeforeUnmount(()=>{clearTimeout(i)}),{jxTabClick:async function(e){r.value=e,await n(),uni.removeTabBarBadge({index:0}),T.value="",a.value=e.id,o.value=e.status,6==e.id?(r.value.count&&(N.value.fromTime=Et(+new Date((new Date).getTime()-1728e5)),N.value.afsStatus="155"),await I()):await _()},orderDataList:b,totalCount:S,orderState:a,orderStateInfo:r,tabInfo:D,searchStore:async function(e){T.value=e,await n(),7==a.value?await _():await I()},keyword:T,changeIpt:async function(e){T.value=e,await n(),7==a.value?await P():await A()},clearIpt:async function(){T.value="",await n(),7==a.value?await _():await I()},scorllHeight:L,active:O,orderFilterRef:M,filterData:async function(e){let t=(+new Date-+new Date(e.fromTime))/1e3/60/60/24;return 7!=a.value&&t>59?V("售后查询不能超过60天"):7==a.value&&t>180?V("最大查询天数为180天"):(N.value=e,await n(),void(7==a.value?await _():await I()))},refresherrefresh:function(){uni.removeTabBarBadge({index:0}),s.value=!0,clearTimeout(i),i=setTimeout(async()=>{s.value=!1,await n(),await B(),5==a.value&&(S.value=0),6==a.value?await I():await _()},500)},triggered:s,scrolltolower:async function(){if(uni.removeTabBarBadge({index:0}),w.value++,g.value*(w.value-1)>S.value||S.value<g.value)l.value=!1;else{if(l.value)return;7==a.value?await _():await I()}},isLoad:l,distributionStatu:function(e){O.value=e},isRest:p,isStatu:h,statusBarHeight:v,battery:u,notice:d,lockScreen:m,setNotice:function(){uni.navigateTo({url:"/subPages/merchantChild/backstageApp/backstageApp"})}}}const Rr=e.defineComponent({__name:"main",setup(t){e.useCssVars(e=>({"6cb63cf1":M.value,"6cb63d10":L.value,"5ad2022e":V.value,"6cb63cf0":A.value,"6cb63d0f":O.value}));const{jxTabClick:n,orderDataList:o,totalCount:a,orderState:r,orderStateInfo:i,tabInfo:s,searchStore:l,keyword:c,changeIpt:u,clearIpt:d,scorllHeight:m,active:p,orderFilterRef:f,filterData:h,refresherrefresh:v,triggered:g,scrolltolower:y,isLoad:k,distributionStatu:b,isRest:x,isStatu:S,statusBarHeight:N,battery:C,notice:_,lockScreen:E,setNotice:I}=$r();function D(){uni.navigateTo({url:"/subPages/orderChild/getPhone/getPhone"})}const V=e.ref("0s");let B=0,T=0;function P(){V.value="0s",B=0,T=0;let e=uni.getSystemInfoSync();B=e.windowWidth,T=e.windowHeight}const A=e.ref("20rpx"),O=e.ref("450rpx"),M=e.ref("20rpx"),L=e.ref("300rpx");function j(e,t){F(e,t)}const F=Bt({time:5,success(e,t){let n=e.changedTouches[0];1==t&&(A.value=n.clientX-25+"px",O.value=n.clientY-25+"px"),2==t&&(M.value=n.clientX-25+"px",L.value=n.clientY-25+"px")}});function U(e,t){V.value="0.5s";let n=e.target;if(1==t&&((n.offsetLeft<=0||n.offsetLeft<=B/2-25)&&(A.value="10px"),(n.offsetLeft>=B||n.offsetLeft>=B/2-25)&&(A.value=B-60+"px"),n.offsetTop<=50&&(O.value="50px"),n.offsetTop>=T-100&&(O.value=T-60+"px")),2==t){let e=parseInt(M.value),t=parseInt(L.value);(e<=0||e<=B/2-25)&&(M.value="10px"),(e>=B||e>=B/2-25)&&(M.value=B-60+"px"),t<=50&&(L.value="50px"),t>=T-100&&(L.value=T-60+"px")}}return(t,V)=>{const B=w(e.resolveDynamicComponent("uni-search-bar"),za),T=w(e.resolveDynamicComponent("jx-load-more"),ya),A=w(e.resolveDynamicComponent("jx-empty"),Jn),O=w(e.resolveDynamicComponent("jx-icon"),Yn),M=w(e.resolveDynamicComponent("jx-ios-android"),Nr),L=w(e.resolveDynamicComponent("jx-login-empty"),Kn),F=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"status_bar"}),e.createElementVNode("image",{class:"icon-phone",src:"https://image.jxc4.com/image/dd78fd0b128be86e681f376e794f8309.png",mode:"scaleToFill",onClick:D,onTouchmove:V[0]||(V[0]=e.withModifiers(e=>j(e,1),["stop","prevent"])),onTouchstart:V[1]||(V[1]=e=>P()),onTouchend:V[2]||(V[2]=e=>U(e,1))},null,32),e.unref(S)?e.unref(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:1,class:"open-status-msg open-to-booking",onTouchmove:V[6]||(V[6]=e.withModifiers(e=>j(e,2),["prevent"])),onTouchstart:V[7]||(V[7]=e.withModifiers(e=>P(),["prevent"])),onTouchend:V[8]||(V[8]=e.withModifiers(e=>U(e,2),["prevent"]))},[e.createElementVNode("text",null,"接受"),e.createElementVNode("text",null,"预订单")],32)):(e.openBlock(),e.createElementBlock("view",{key:0,class:"open-status-msg",onTouchmove:V[3]||(V[3]=e.withModifiers(e=>j(e,2),["prevent"])),onTouchstart:V[4]||(V[4]=e.withModifiers(e=>P(),["prevent"])),onTouchend:V[5]||(V[5]=e.withModifiers(e=>U(e,2),["prevent"]))},[e.createElementVNode("text",null,"本店"),e.createElementVNode("text",null,"已休息")],32)),e.createElementVNode("view",{class:"jx-tabs-root"},[e.createVNode(_r,{ref_key:"tabInfo",ref:s,onJxTab:e.unref(n)},null,8,["onJxTab"]),6==e.unref(r)||7==e.unref(r)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"filter-root"},[e.createElementVNode("text",{class:"btn",onClick:V[9]||(V[9]=t=>e.unref(f).openRef())},"更多条件"),e.createVNode(B,{modelValue:e.unref(c),"onUpdate:modelValue":V[10]||(V[10]=t=>e.isRef(c)?c.value=t:null),onConfirm:V[11]||(V[11]=t=>e.unref(l)(e.unref(c))),onClear:e.unref(d),cancelButton:"none",clearButton:"auto",onInput:V[12]||(V[12]=t=>e.unref(u)(e.unref(c))),placeholder:6==e.unref(r)?"搜索售后单号、订单号、电话":"搜索订单、电话等"},null,8,["modelValue","onClear","placeholder"])])):e.createCommentVNode("",!0),3==e.unref(r)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"filter-order"},[e.createElementVNode("view",{class:e.normalizeClass({active:0==e.unref(p)}),onClick:V[13]||(V[13]=t=>e.unref(b)(0))},"全 部",2),e.createElementVNode("view",{class:e.normalizeClass({active:1==e.unref(p)}),onClick:V[14]||(V[14]=t=>e.unref(b)(1))},"未抢单",2),e.createElementVNode("view",{class:e.normalizeClass({active:2==e.unref(p)}),onClick:V[15]||(V[15]=t=>e.unref(b)(2))},"已抢单",2)])):e.createCommentVNode("",!0)]),e.createElementVNode("scroll-view",{class:"order-item-main","scroll-y":"",style:e.normalizeStyle({height:`calc(100vh - ${e.unref(m)} - ${e.unref(N)})`}),"refresher-enabled":"","refresher-triggered":e.unref(g),onRefresherrefresh:V[16]||(V[16]=(...t)=>e.unref(v)&&e.unref(v)(...t)),"refresher-background":"#efefef",onScrolltolower:V[17]||(V[17]=(...t)=>e.unref(y)&&e.unref(y)(...t))},[1==e.unref(r)&&0!=e.unref(a)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(o),t=>(e.openBlock(),e.createBlock(Tr,{key:t.id,item:t},null,8,["item"]))),128)):e.createCommentVNode("",!0),2==e.unref(r)&&0!=e.unref(a)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(o),t=>(e.openBlock(),e.createBlock(Pr,{key:t.id,item:t},null,8,["item"]))),128)):e.createCommentVNode("",!0),3==e.unref(r)&&0!=e.unref(a)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),t=>(e.openBlock(),e.createElementBlock("view",{key:t.id},[0===e.unref(p)||1===e.unref(p)&&t.waybillStatus<10||2===e.unref(p)&&t.waybillStatus>=10&&-5!==t.lockStatus?(e.openBlock(),e.createBlock(Ar,{key:0,item:t,type:1},null,8,["item"])):e.createCommentVNode("",!0)]))),128)),e.withDirectives(e.createVNode(T,{isLoad:e.unref(k),marginTop:"25rpx"},null,8,["isLoad"]),[[e.vShow,e.unref(a)>=2&&0===e.unref(p)]])],64)):e.createCommentVNode("",!0),4==e.unref(r)&&0!=e.unref(a)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(e.unref(o),t=>(e.openBlock(),e.createBlock(Ar,{key:t.id,item:t,type:0},null,8,["item"]))),128)):e.createCommentVNode("",!0),5==e.unref(r)&&0!=e.unref(a)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(e.unref(o),t=>(e.openBlock(),e.createElementBlock("view",{key:t.id},[-5===t.lockStatus||(17===t.status||18===t.status)&&-5!==t.lockStatus||22===t.status&&-5!==t.lockStatus?(e.openBlock(),e.createBlock(Ur,{key:0,item:t},null,8,["item"])):(e.openBlock(),e.createBlock(A,{key:1,title:"暂无订单信息"}))]))),128)):e.createCommentVNode("",!0),6==e.unref(r)&&0!=e.unref(a)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(e.unref(o),t=>(e.openBlock(),e.createBlock(Or,{key:t.id,item:t},null,8,["item"]))),128)):e.createCommentVNode("",!0),7==e.unref(r)&&0!=e.unref(a)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(e.unref(o),t=>(e.openBlock(),e.createBlock(Mr,{key:t.id,item:t},null,8,["item"]))),128)):e.createCommentVNode("",!0),e.withDirectives(e.createVNode(T,{isLoad:e.unref(k),marginTop:"25rpx"},null,8,["isLoad"]),[[e.vShow,e.unref(a)>=2&&3!=e.unref(r)&&5!=e.unref(r)]]),e.withDirectives(e.createVNode(A,{title:"暂无订单信息"},null,512),[[e.vShow,0==e.unref(a)]])],44,["refresher-triggered"]),e.createVNode(jr,{onFilterData:e.unref(h),ref_key:"orderFilterRef",ref:f,orderState:e.unref(r),orderStateInfo:e.unref(i)},null,8,["onFilterData","orderState","orderStateInfo"]),e.createVNode(M,{isShow:"android"},{default:e.withCtx(()=>[e.unref(C)||e.unref(_)||e.unref(E)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"warring-root",onClick:V[18]||(V[18]=(...t)=>e.unref(I)&&e.unref(I)(...t))},[e.createElementVNode("view",{class:"left"},[e.createElementVNode("text",{class:"w"},"!"),e.createElementVNode("text",{class:"text"},"异常提醒:来单不响异常")]),e.createElementVNode("view",{class:"right"},[e.createElementVNode("text",null,"去设置"),e.createVNode(O,{icon:"gengduo",color:"red"})])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(L,{title:"马上登录,查看订单"}),e.createVNode(F)],64)}}}),zr=Gn(Rr,[["__scopeId","data-v-392702af"]]),Hr={pages:[{path:"pages/merchant/index",style:{navigationBarTitleText:"商家中心",enablePullDownRefresh:!0,navigationStyle:"custom",navigationBarBackgroundColor:"#4eb331",navigationBarTextStyle:"white"}},{path:"pages/goods-manager/main",style:{navigationBarTitleText:"商品管理",navigationStyle:"custom",navigationBarBackgroundColor:"#4eb331",navigationBarTextStyle:"white"}},{path:"pages/order-manager/main",style:{navigationBarTitleText:"订单管理",navigationStyle:"custom"}},{path:"pages/message/index",style:{navigationBarTitleText:"客户消息",enablePullDownRefresh:!0}}],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"京西到家",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},subPackages:[{root:"subPages/login",pages:[{path:"addAuth/addAuth",style:{navigationBarTitleText:"绑定手机号"}},{path:"index",style:{navigationBarTitleText:"登录",navigationStyle:"custom",navigationBarTextStyle:"black",navigationBarBackgroundColor:"#fff"}},{path:"bindSNS/bindSNS",style:{navigationBarTitleText:"登录"}},{path:"wxLogin/wxLogin",style:{navigationBarTitleText:"登录",navigationStyle:"custom",navigationBarTextStyle:"black",navigationBarBackgroundColor:"#fff"}}]},{root:"subPages/agreement",pages:[{path:"jxcs",style:{navigationBarTitleText:"京西菜市"}},{path:"updateVersion",style:{navigationBarTitleText:"检查更新"}}]},{root:"subPages/switchStore",pages:[{path:"switchStore",style:{navigationBarTitleText:"选择门店",enablePullDownRefresh:!0,navigationBarBackgroundColor:"#4eb331",navigationBarTextStyle:"white"}}]},{root:"subPages/orderChild",pages:[{path:"getPhone/getPhone",style:{navigationBarTitleText:"联系平台"}},{path:"orderDetail/orderDetail",style:{navigationBarTitleText:"订单详情"}},{path:"deliverManager/deliverManager",style:{navigationBarTitleText:"配送管理",enablePullDownRefresh:!0}},{path:"afterSalesOrderDetail/afterSalesOrderDetail",style:{navigationBarTitleText:"售后详情"}},{path:"createAfterSales/createAfterSales",style:{navigationBarTitleText:"创建售后单"}},{path:"seeMap/seeMap",style:{navigationBarTitleText:"查看地图"}},{path:"complaint/complaint",style:{navigationBarTitleText:"投诉骑手"}}]},{root:"subPages/merchantChild",pages:[{path:"helpCenter/helpCenter",style:{navigationBarTitleText:"帮助中心"}},{path:"orderRealTime/orderRealTime",style:{navigationBarTitleText:"营业数据"}},{path:"orderRealTimeJxgy/orderRealTimeJxgy",style:{navigationBarTitleText:"营业数据"}},{path:"platformM/platformM",style:{navigationBarTitleText:"已开通店铺"}},{path:"modifyPrice/modifyPrice",style:{navigationBarTitleText:"调价包"}},{path:"bill/bill",style:{navigationBarTitleText:"我的账单"}},{path:"billDetaile/billDetaile",style:{navigationBarTitleText:"账单详情"}},{path:"evaluateM/evaluateM",style:{navigationBarTitleText:"评价管理"}},{path:"storeScore/storeScore",style:{navigationBarTitleText:"门店评分"}},{path:"storeScoreDetaile/storeScoreDetaile",style:{navigationBarTitleText:"评分详情"}},{path:"waitGoods/waitGoods",style:{navigationBarTitleText:"待配商品"}},{path:"waitGoodsDetaile/waitGoodsDetaile",style:{navigationBarTitleText:"商品详情",enablePullDownRefresh:!0}},{path:"shareStore/shareStore",style:{navigationBarTitleText:"扫码进店"}},{path:"enterGroupChat/enterGroupChat",style:{navigationBarTitleText:"进入群聊","mp-weixin":{usingComponents:{cell:"plugin://chatGroupPlugin/cell"}}}},{path:"message/message",style:{navigationBarTitleText:"消息列表"}},{path:"messageDetail/messageDetail",style:{navigationBarTitleText:"最新消息"}},{path:"activity/activity",style:{navigationBarTitleText:"活动信息"}},{path:"setUp/setUp",style:{navigationBarTitleText:"设置"}},{path:"printerSetUp/printerSetUp",style:{navigationBarTitleText:"蓝牙打印机设置"}},{path:"businessLicense/businessLicense",style:{navigationBarTitleText:"营业资质"}},{path:"backstageApp/backstageApp",style:{navigationBarTitleText:"来单通知"}},{path:"useInfo/useInfo",style:{navigationBarTitleText:"个人信息"}},{path:"payeeInfo/payeeInfo",style:{navigationBarTitleText:"收款信息"}},{path:"invoice/invoice",style:{navigationBarTitleText:"发票管理"}},{path:"accountBalance/accountBalance",style:{navigationBarTitleText:"配送余额"}},{path:"setNotice/setNotice",style:{navigationBarTitleText:"设置来单提示"}},{path:"setBusinessTime/setBusinessTime",style:{navigationBarTitleText:"修改营业时间"}},{path:"setBusinessStatus/setBusinessStatus",style:{navigationBarTitleText:"营业状态"}},{path:"setInvoiceEB/setInvoiceEB",style:{navigationBarTitleText:"发票设置"}},{path:"platformDetail/index",style:{navigationBarTitleText:"平台管理"}}]},{root:"subPages/shoppingChild",pages:[{path:"createGoods/createGoods",style:{navigationBarTitleText:"创建商品",navigationBarBackgroundColor:"#4eb331",navigationBarTextStyle:"white"}}]},{root:"subPages/messageChild",pages:[{path:"msgChat/msgChat",style:{navigationBarTitleText:"消息"}}]}],tabBar:{color:"#7A7E83",selectedColor:"#4eb331",borderStyle:"black",backgroundColor:"#ffffff",list:[{pagePath:"pages/order-manager/main",text:"订单管理",iconPath:"./static/image/tabBarIcon/order.png",selectedIconPath:"./static/image/tabBarIcon/order-active.png"},{pagePath:"pages/goods-manager/main",text:"商品管理",iconPath:"./static/image/tabBarIcon/shopping.png",selectedIconPath:"./static/image/tabBarIcon/shopping-active.png"},{pagePath:"pages/message/index",text:"消息",iconPath:"./static/image/tabBarIcon/msg.png",selectedIconPath:"./static/image/tabBarIcon/msg-active.png"},{pagePath:"pages/merchant/index",text:"商家中心",iconPath:"./static/image/tabBarIcon/merchant.png",selectedIconPath:"./static/image/tabBarIcon/merchant-active.png"}]}};function qr(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var Gr=qr(function(e,t){var n;e.exports=(n=n||function(e){var t=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),n={},o=n.lib={},a=o.Base={extend:function(e){var n=t(this);return e&&n.mixIn(e),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},r=o.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,o=this.sigBytes,a=e.sigBytes;if(this.clamp(),o%4)for(var r=0;r<a;r++){var i=n[r>>>2]>>>24-r%4*8&255;t[o+r>>>2]|=i<<24-(o+r)%4*8}else for(r=0;r<a;r+=4)t[o+r>>>2]=n[r>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,o=[],a=function(t){var n=987654321,o=4294967295;return function(){var a=((n=36969*(65535&n)+(n>>16)&o)<<16)+(t=18e3*(65535&t)+(t>>16)&o)&o;return a/=4294967296,(a+=.5)*(e.random()>.5?1:-1)}},i=0;i<t;i+=4){var s=a(4294967296*(n||e.random()));n=987654071*s(),o.push(4294967296*s()|0)}return new r.init(o,t)}}),i=n.enc={},s=i.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],a=0;a<n;a++){var r=t[a>>>2]>>>24-a%4*8&255;o.push((r>>>4).toString(16)),o.push((15&r).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o+=2)n[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new r.init(n,t/2)}},l=i.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],a=0;a<n;a++){var r=t[a>>>2]>>>24-a%4*8&255;o.push(String.fromCharCode(r))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new r.init(n,t)}},c=i.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},u=o.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,o=n.words,a=n.sigBytes,i=this.blockSize,s=a/(4*i),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,c=e.min(4*l,a);if(l){for(var u=0;u<l;u+=i)this._doProcessBlock(o,u);var d=o.splice(0,l);n.sigBytes-=c}return new r.init(d,c)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=u.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=n.algo={};return n}(Math),n)}),Wr=Gr,Jr=(qr(function(e,t){var n;e.exports=(n=Wr,function(e){var t=n,o=t.lib,a=o.WordArray,r=o.Hasher,i=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=i.MD5=r.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var o=t+n,a=e[o];e[o]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var r=this._hash.words,i=e[t+0],l=e[t+1],p=e[t+2],f=e[t+3],h=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],k=e[t+8],w=e[t+9],b=e[t+10],x=e[t+11],S=e[t+12],N=e[t+13],C=e[t+14],_=e[t+15],E=r[0],I=r[1],D=r[2],V=r[3];E=c(E,I,D,V,i,7,s[0]),V=c(V,E,I,D,l,12,s[1]),D=c(D,V,E,I,p,17,s[2]),I=c(I,D,V,E,f,22,s[3]),E=c(E,I,D,V,h,7,s[4]),V=c(V,E,I,D,v,12,s[5]),D=c(D,V,E,I,g,17,s[6]),I=c(I,D,V,E,y,22,s[7]),E=c(E,I,D,V,k,7,s[8]),V=c(V,E,I,D,w,12,s[9]),D=c(D,V,E,I,b,17,s[10]),I=c(I,D,V,E,x,22,s[11]),E=c(E,I,D,V,S,7,s[12]),V=c(V,E,I,D,N,12,s[13]),D=c(D,V,E,I,C,17,s[14]),E=u(E,I=c(I,D,V,E,_,22,s[15]),D,V,l,5,s[16]),V=u(V,E,I,D,g,9,s[17]),D=u(D,V,E,I,x,14,s[18]),I=u(I,D,V,E,i,20,s[19]),E=u(E,I,D,V,v,5,s[20]),V=u(V,E,I,D,b,9,s[21]),D=u(D,V,E,I,_,14,s[22]),I=u(I,D,V,E,h,20,s[23]),E=u(E,I,D,V,w,5,s[24]),V=u(V,E,I,D,C,9,s[25]),D=u(D,V,E,I,f,14,s[26]),I=u(I,D,V,E,k,20,s[27]),E=u(E,I,D,V,N,5,s[28]),V=u(V,E,I,D,p,9,s[29]),D=u(D,V,E,I,y,14,s[30]),E=d(E,I=u(I,D,V,E,S,20,s[31]),D,V,v,4,s[32]),V=d(V,E,I,D,k,11,s[33]),D=d(D,V,E,I,x,16,s[34]),I=d(I,D,V,E,C,23,s[35]),E=d(E,I,D,V,l,4,s[36]),V=d(V,E,I,D,h,11,s[37]),D=d(D,V,E,I,y,16,s[38]),I=d(I,D,V,E,b,23,s[39]),E=d(E,I,D,V,N,4,s[40]),V=d(V,E,I,D,i,11,s[41]),D=d(D,V,E,I,f,16,s[42]),I=d(I,D,V,E,g,23,s[43]),E=d(E,I,D,V,w,4,s[44]),V=d(V,E,I,D,S,11,s[45]),D=d(D,V,E,I,_,16,s[46]),E=m(E,I=d(I,D,V,E,p,23,s[47]),D,V,i,6,s[48]),V=m(V,E,I,D,y,10,s[49]),D=m(D,V,E,I,C,15,s[50]),I=m(I,D,V,E,v,21,s[51]),E=m(E,I,D,V,S,6,s[52]),V=m(V,E,I,D,f,10,s[53]),D=m(D,V,E,I,b,15,s[54]),I=m(I,D,V,E,l,21,s[55]),E=m(E,I,D,V,k,6,s[56]),V=m(V,E,I,D,_,10,s[57]),D=m(D,V,E,I,g,15,s[58]),I=m(I,D,V,E,N,21,s[59]),E=m(E,I,D,V,h,6,s[60]),V=m(V,E,I,D,x,10,s[61]),D=m(D,V,E,I,p,15,s[62]),I=m(I,D,V,E,w,21,s[63]),r[0]=r[0]+E|0,r[1]=r[1]+I|0,r[2]=r[2]+D|0,r[3]=r[3]+V|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,a=8*t.sigBytes;n[a>>>5]|=128<<24-a%32;var r=e.floor(o/4294967296),i=o;n[15+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(a+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,o,a,r,i){var s=e+(t&n|~t&o)+a+i;return(s<<r|s>>>32-r)+t}function u(e,t,n,o,a,r,i){var s=e+(t&o|n&~o)+a+i;return(s<<r|s>>>32-r)+t}function d(e,t,n,o,a,r,i){var s=e+(t^n^o)+a+i;return(s<<r|s>>>32-r)+t}function m(e,t,n,o,a,r,i){var s=e+(n^(t|~o))+a+i;return(s<<r|s>>>32-r)+t}t.MD5=r._createHelper(l),t.HmacMD5=r._createHmacHelper(l)}(Math),n.MD5)}),qr(function(e,t){var n,o,a;e.exports=(o=(n=Wr).lib.Base,a=n.enc.Utf8,void(n.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),s=r.words,l=i.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;r.sigBytes=i.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))}),qr(function(e,t){e.exports=Wr.HmacMD5})),Xr=qr(function(e,t){e.exports=Wr.enc.Utf8}),Kr=qr(function(e,t){var n,o,a;e.exports=(a=(o=n=Wr).lib.WordArray,o.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,o=this._map;e.clamp();for(var a=[],r=0;r<n;r+=3)for(var i=(t[r>>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s<n;s++)a.push(o.charAt(i>>>6*(3-s)&63));var l=o.charAt(64);if(l)for(;a.length%4;)a.push(l);return a.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var r=0;r<n.length;r++)o[n.charCodeAt(r)]=r}var i=n.charAt(64);if(i){var s=e.indexOf(i);-1!==s&&(t=s)}return function(e,t,n){for(var o=[],r=0,i=0;i<t;i++)if(i%4){var s=n[e.charCodeAt(i-1)]<<i%4*2,l=n[e.charCodeAt(i)]>>>6-i%4*2;o[r>>>2]|=(s|l)<<24-r%4*8,r++}return a.create(o,r)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)});const Yr="FUNCTION",Zr="pending",Qr="rejected";function ei(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function ti(e){return"object"===ei(e)}function ni(e){return"function"==typeof e}function oi(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}const ai="REJECTED",ri="NOT_PENDING";class ii{constructor({createPromise:e,retryRule:t=ai}={}){this.createPromise=e,this.status=null,this.promise=null,this.retryRule=t}get needRetry(){if(!this.status)return!0;switch(this.retryRule){case ai:return this.status===Qr;case ri:return this.status!==Zr}}exec(){return this.needRetry?(this.status=Zr,this.promise=this.createPromise().then(e=>(this.status="fulfilled",Promise.resolve(e)),e=>(this.status=Qr,Promise.reject(e))),this.promise):this.promise}}function si(e){return e&&"string"==typeof e?JSON.parse(e):e}const li=si([]),ci="app";si("");const ui=si("[]")||[];let di="";try{di="__UNI__F9A47D3"}catch(ts){}let mi,pi={};function fi(e,t={}){var n,o;return n=pi,o=e,Object.prototype.hasOwnProperty.call(n,o)||(pi[e]=t),pi[e]}pi=uni._globalUniCloudObj?uni._globalUniCloudObj:uni._globalUniCloudObj={};const hi=["invoke","success","fail","complete"],vi=fi("_globalUniCloudInterceptor");function gi(e,t){vi[e]||(vi[e]={}),ti(t)&&Object.keys(t).forEach(n=>{hi.indexOf(n)>-1&&function(e,t,n){let o=vi[e][t];o||(o=vi[e][t]=[]),-1===o.indexOf(n)&&ni(n)&&o.push(n)}(e,n,t[n])})}function yi(e,t){vi[e]||(vi[e]={}),ti(t)?Object.keys(t).forEach(n=>{hi.indexOf(n)>-1&&function(e,t,n){const o=vi[e][t];if(!o)return;const a=o.indexOf(n);a>-1&&o.splice(a,1)}(e,n,t[n])}):delete vi[e]}function ki(e,t){return e&&0!==e.length?e.reduce((e,n)=>e.then(()=>n(t)),Promise.resolve()):Promise.resolve()}function wi(e,t){return vi[e]&&vi[e][t]||[]}function bi(e){gi("callObject",e)}const xi=fi("_globalUniCloudListener"),Si="response",Ni="needLogin",Ci="refreshToken",_i="clientdb",Ei="cloudfunction",Ii="cloudobject";function Di(e){return xi[e]||(xi[e]=[]),xi[e]}function Vi(e,t){const n=Di(e);n.includes(t)||n.push(t)}function Bi(e,t){const n=Di(e),o=n.indexOf(t);-1!==o&&n.splice(o,1)}function Ti(e,t){const n=Di(e);for(let o=0;o<n.length;o++)(0,n[o])(t)}let Pi,Ai=!1;function Oi(){return Pi||(Pi=new Promise(e=>{Ai&&e(),function t(){if("function"==typeof getCurrentPages){const t=getCurrentPages();t&&t[0]&&(Ai=!0,e())}Ai||setTimeout(()=>{t()},30)}()}),Pi)}function Mi(e){const t={};for(const n in e){const o=e[n];ni(o)&&(t[n]=oi(o))}return t}class Li extends Error{constructor(e){super(e.message),this.errMsg=e.message||e.errMsg||"unknown system error",this.code=this.errCode=e.code||e.errCode||"SYSTEM_ERROR",this.errSubject=this.subject=e.subject||e.errSubject,this.cause=e.cause,this.requestId=e.requestId}toJson(e=0){if(!(e>=10))return e++,{errCode:this.errCode,errMsg:this.errMsg,errSubject:this.errSubject,cause:this.cause&&this.cause.toJson?this.cause.toJson(e):this.cause}}}var ji={request:e=>uni.request(e),uploadFile:e=>uni.uploadFile(e),setStorageSync:(e,t)=>uni.setStorageSync(e,t),getStorageSync:e=>uni.getStorageSync(e),removeStorageSync:e=>uni.removeStorageSync(e),clearStorageSync:()=>uni.clearStorageSync(),connectSocket:e=>uni.connectSocket(e)};function Fi(e){return e&&Fi(e.__v_raw)||e}function Ui(){return{token:ji.getStorageSync("uni_id_token")||ji.getStorageSync("uniIdToken"),tokenExpired:ji.getStorageSync("uni_id_token_expired")}}function $i({token:e,tokenExpired:t}={}){e&&ji.setStorageSync("uni_id_token",e),t&&ji.setStorageSync("uni_id_token_expired",t)}let Ri,zi;function Hi(){return Ri||(Ri=uni.getSystemInfoSync()),Ri}function qi(){let e,t;try{if(uni.getLaunchOptionsSync){if(uni.getLaunchOptionsSync.toString().indexOf("not yet implemented")>-1)return;const{scene:n,channel:o}=uni.getLaunchOptionsSync();e=o,t=n}}catch(n){}return{channel:e,scene:t}}let Gi={};function Wi(){const e=uni.getLocale&&uni.getLocale()||"en";if(zi)return{...Gi,...zi,locale:e,LOCALE:e};const t=Hi(),{deviceId:n,osName:o,uniPlatform:a,appId:r}=t,i=["appId","appLanguage","appName","appVersion","appVersionCode","appWgtVersion","browserName","browserVersion","deviceBrand","deviceId","deviceModel","deviceType","osName","osVersion","romName","romVersion","ua","hostName","hostVersion","uniPlatform","uniRuntimeVersion","uniRuntimeVersionCode","uniCompilerVersion","uniCompilerVersionCode"];for(const s in t)Object.hasOwnProperty.call(t,s)&&-1===i.indexOf(s)&&delete t[s];return zi={PLATFORM:a,OS:o,APPID:r,DEVICEID:n,...qi(),...t},{...Gi,...zi,locale:e,LOCALE:e}}var Ji=function(e,t){let n="";return Object.keys(e).sort().forEach(function(t){e[t]&&(n=n+"&"+t+"="+e[t])}),n=n.slice(1),Jr(n,t).toString()},Xi=function(e,t){return new Promise((n,o)=>{t(Object.assign(e,{complete(e){e||(e={});const t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400){const n=e.data&&e.data.error&&e.data.error.code||"SYS_ERR",a=e.data&&e.data.error&&e.data.error.message||e.errMsg||"request:fail";return o(new Li({code:n,message:a,requestId:t}))}const a=e.data;if(a.error)return o(new Li({code:a.error.code,message:a.error.message,requestId:t}));a.result=a.data,a.requestId=t,delete a.data,n(a)}}))})},Ki=function(e){return Kr.stringify(Xr.parse(e))},Yi=class{constructor(e){["spaceId","clientSecret"].forEach(t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)}),this.config=Object.assign({},{endpoint:0===e.spaceId.indexOf("mp-")?"https://api.next.bspapp.com":"https://api.bspapp.com"},e),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=ji,this._getAccessTokenPromiseHub=new ii({createPromise:()=>this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then(e=>{if(!e.result||!e.result.accessToken)throw new Li({code:"AUTH_FAILED",message:"获取accessToken失败"});this.setAccessToken(e.result.accessToken)}),retryRule:ri})}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){this.accessToken=e}requestWrapped(e){return Xi(e,this.adapter.request)}requestAuth(e){return this.requestWrapped(e)}request(e,t){return Promise.resolve().then(()=>this.hasAccessToken?t?this.requestWrapped(e):this.requestWrapped(e).catch(t=>new Promise((e,n)=>{!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()}).then(()=>this.getAccessToken()).then(()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})):this.getAccessToken().then(()=>{const t=this.rebuildRequest(e);return this.request(t,!0)}))}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=Ji(t.data,this.config.clientSecret),t}setupRequest(e,t){const n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),o={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,o["x-basement-token"]=this.accessToken),o["x-serverless-sign"]=Ji(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:o}}getAccessToken(){return this._getAccessTokenPromiseHub.exec()}async authorize(){await this.getAccessToken()}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request({...this.setupRequest(t),timeout:e.timeout})}getOSSUploadOptionsFromPath(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,name:n,filePath:o,fileType:a,onUploadProgress:r}){return new Promise((i,s)=>{const l=this.adapter.uploadFile({url:e,formData:t,name:n,filePath:o,fileType:a,header:{"X-OSS-server-side-encrpytion":"AES256"},success(e){e&&e.statusCode<400?i(e):s(new Li({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){s(new Li({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof r&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate(e=>{r({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})})})}reportOSSUpload(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}async uploadFile({filePath:e,cloudPath:t,fileType:n="image",cloudPathAsRealPath:o=!1,onUploadProgress:a,config:r}){if("string"!==ei(t))throw new Li({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new Li({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new Li({code:"INVALID_PARAM",message:"cloudPath不合法"});const i=r&&r.envType||this.config.envType;if(o&&("/"!==t[0]&&(t="/"+t),t.indexOf("\\")>-1))throw new Li({code:"INVALID_PARAM",message:"使用cloudPath作为路径时,cloudPath不可包含“\\”"});const s=(await this.getOSSUploadOptionsFromPath({env:i,filename:o?t.split("/").pop():t,fileId:o?t:void 0})).result,l="https://"+s.cdnDomain+"/"+s.ossPath,{securityToken:c,accessKeyId:u,signature:d,host:m,ossPath:p,id:f,policy:h,ossCallbackUrl:v}=s,g={"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:u,Signature:d,host:m,id:f,key:p,policy:h,success_action_status:200};if(c&&(g["x-oss-security-token"]=c),v){const e=JSON.stringify({callbackUrl:v,callbackBody:JSON.stringify({fileId:f,spaceId:this.config.spaceId}),callbackBodyType:"application/json"});g.callback=Ki(e)}const y={url:"https://"+s.host,formData:g,fileName:"file",name:"file",filePath:e,fileType:n};if(await this.uploadFileToOSS(Object.assign({},y,{onUploadProgress:a})),v)return{success:!0,filePath:e,fileID:l};if((await this.reportOSSUpload({id:f})).success)return{success:!0,filePath:e,fileID:l};throw new Li({code:"UPLOAD_FAILED",message:"文件上传失败"})}getTempFileURL({fileList:e}={}){return new Promise((t,n)=>{Array.isArray(e)&&0!==e.length||n(new Li({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),t({fileList:e.map(e=>({fileID:e,tempFileURL:e}))})})}async getFileInfo({fileList:e}={}){if(!Array.isArray(e)||0===e.length)throw new Li({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const t={method:"serverless.file.resource.info",params:JSON.stringify({id:e.map(e=>e.split("?")[0]).join(",")})};return{fileList:(await this.request(this.setupRequest(t))).result}}},Zi={init(e){const t=new Yi(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};const Qi="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";var es,ts;(ts=es||(es={})).local="local",ts.none="none",ts.session="session";var ns=function(){},os=qr(function(e,t){var n;e.exports=(n=Wr,function(e){var t=n,o=t.lib,a=o.WordArray,r=o.Hasher,i=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),o=2;o<=n;o++)if(!(t%o))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var o=2,a=0;a<64;)t(o)&&(a<8&&(s[a]=n(e.pow(o,.5))),l[a]=n(e.pow(o,1/3)),a++),o++}();var c=[],u=i.SHA256=r.extend({_doReset:function(){this._hash=new a.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],a=n[1],r=n[2],i=n[3],s=n[4],u=n[5],d=n[6],m=n[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var f=c[p-15],h=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,v=c[p-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[p]=h+c[p-7]+g+c[p-16]}var y=o&a^o&r^a&r,k=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=m+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&d)+l[p]+c[p];m=d,d=u,u=s,s=i+w|0,i=r,r=a,a=o,o=w+(k+y)|0}n[0]=n[0]+o|0,n[1]=n[1]+a|0,n[2]=n[2]+r|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+m|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,a=8*t.sigBytes;return n[a>>>5]|=128<<24-a%32,n[14+(a+64>>>9<<4)]=e.floor(o/4294967296),n[15+(a+64>>>9<<4)]=o,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=r._createHelper(u),t.HmacSHA256=r._createHmacHelper(u)}(Math),n.SHA256)}),as=os,rs=qr(function(e,t){e.exports=Wr.HmacSHA256});const is=()=>{let e;if(!Promise){e=()=>{},e.promise={};const t=()=>{throw new Li({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}const t=new Promise((t,n)=>{e=(e,o)=>e?n(e):t(o)});return e.promise=t,e};function ss(e){return void 0===e}function ls(e){return"[object Null]"===Object.prototype.toString.call(e)}function cs(e=""){return e.replace(/([\s\S]+)\s+(请前往云开发AI小助手查看问题:.*)/,"$1")}var us;!function(e){e.WEB="web",e.WX_MP="wx_mp"}(us||(us={}));const ds={adapter:null,runtime:void 0},ms=["anonymousUuidKey"];class ps extends ns{constructor(){super(),ds.adapter.root.tcbObject||(ds.adapter.root.tcbObject={})}setItem(e,t){ds.adapter.root.tcbObject[e]=t}getItem(e){return ds.adapter.root.tcbObject[e]}removeItem(e){delete ds.adapter.root.tcbObject[e]}clear(){delete ds.adapter.root.tcbObject}}function fs(e,t){switch(e){case"local":return t.localStorage||new ps;case"none":return new ps;default:return t.sessionStorage||new ps}}class hs{constructor(e){if(!this._storage){this._persistence=ds.adapter.primaryStorage||e.persistence,this._storage=fs(this._persistence,ds.adapter);const t=`access_token_${e.env}`,n=`access_token_expire_${e.env}`,o=`refresh_token_${e.env}`,a=`anonymous_uuid_${e.env}`,r=`login_type_${e.env}`,i=`user_info_${e.env}`;this.keys={accessTokenKey:t,accessTokenExpireKey:n,refreshTokenKey:o,anonymousUuidKey:a,loginTypeKey:r,userInfoKey:i}}}updatePersistence(e){if(e===this._persistence)return;const t="local"===this._persistence;this._persistence=e;const n=fs(e,ds.adapter);for(const o in this.keys){const e=this.keys[o];if(t&&ms.includes(o))continue;const a=this._storage.getItem(e);ss(a)||ls(a)||(n.setItem(e,a),this._storage.removeItem(e))}this._storage=n}setStore(e,t,n){if(!this._storage)return;const o={version:n||"localCachev1",content:t},a=JSON.stringify(o);try{this._storage.setItem(e,a)}catch(r){throw r}}getStore(e,t){try{if(!this._storage)return}catch(o){return""}t=t||"localCachev1";const n=this._storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}removeStore(e){this._storage.removeItem(e)}}const vs={},gs={};function ys(e){return vs[e]}class ks{constructor(e,t){this.data=t||null,this.name=e}}class ws extends ks{constructor(e,t){super("error",{error:e,data:t}),this.error=e}}const bs=new class{constructor(){this._listeners={}}on(e,t){return n=e,o=t,(a=this._listeners)[n]=a[n]||[],a[n].push(o),this;var n,o,a}off(e,t){return function(e,t,n){if(n&&n[e]){const o=n[e].indexOf(t);-1!==o&&n[e].splice(o,1)}}(e,t,this._listeners),this}fire(e,t){if(e instanceof ws)return console.error(e.error),this;const n="string"==typeof e?new ks(e,t||{}):e,o=n.name;if(this._listens(o)){n.target=this;const e=this._listeners[o]?[...this._listeners[o]]:[];for(const t of e)t.call(this,n)}return this}_listens(e){return this._listeners[e]&&this._listeners[e].length>0}};function xs(e,t){bs.on(e,t)}function Ss(e,t={}){bs.fire(e,t)}function Ns(e,t){bs.off(e,t)}const Cs="loginStateChanged",_s="loginStateExpire",Es="loginTypeChanged",Is="anonymousConverted",Ds="refreshAccessToken";var Vs;!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(Vs||(Vs={}));const Bs=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],Ts={"X-SDK-Version":"1.3.5"};function Ps(e,t,n){const o=e[t];e[t]=function(t){const a={},r={};n.forEach(n=>{const{data:o,headers:i}=n.call(e,t);Object.assign(a,o),Object.assign(r,i)});const i=t.data;return i&&(()=>{var e;if(e=i,"[object FormData]"!==Object.prototype.toString.call(e))t.data={...i,...a};else for(const t in a)i.append(t,a[t])})(),t.headers={...t.headers||{},...r},o.call(e,t)}}function As(){const e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:{...Ts,"x-seqid":e}}}class Os{constructor(e={}){var t;this.config=e,this._reqClass=new ds.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:`请求在${this.config.timeout/1e3}s内未完成,已中断`,restrictedMethods:["post"]}),this._cache=ys(this.config.env),this._localCache=(t=this.config.env,gs[t]),Ps(this._reqClass,"post",[As]),Ps(this._reqClass,"upload",[As]),Ps(this._reqClass,"download",[As])}async post(e){return await this._reqClass.post(e)}async upload(e){return await this._reqClass.upload(e)}async download(e){return await this._reqClass.download(e)}async refreshAccessToken(){let e,t;this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken());try{e=await this._refreshAccessTokenPromise}catch(n){t=n}if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,t)throw t;return e}async _refreshAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:n,loginTypeKey:o,anonymousUuidKey:a}=this._cache.keys;this._cache.removeStore(e),this._cache.removeStore(t);let r=this._cache.getStore(n);if(!r)throw new Li({message:"未登录CloudBase"});const i={refresh_token:r},s=await this.request("auth.fetchAccessTokenWithRefreshToken",i);if(s.data.code){const{code:e}=s.data;if("SIGN_PARAM_INVALID"===e||"REFRESH_TOKEN_EXPIRED"===e||"INVALID_REFRESH_TOKEN"===e){if(this._cache.getStore(o)===Vs.ANONYMOUS&&"INVALID_REFRESH_TOKEN"===e){const e=this._cache.getStore(a),t=this._cache.getStore(n),o=await this.send("auth.signInAnonymously",{anonymous_uuid:e,refresh_token:t});return this.setRefreshToken(o.refresh_token),this._refreshAccessToken()}Ss(_s),this._cache.removeStore(n)}throw new Li({code:s.data.code,message:`刷新access token失败:${s.data.code}`})}if(s.data.access_token)return Ss(Ds),this._cache.setStore(e,s.data.access_token),this._cache.setStore(t,s.data.access_token_expire+Date.now()),{accessToken:s.data.access_token,accessTokenExpire:s.data.access_token_expire};s.data.refresh_token&&(this._cache.removeStore(n),this._cache.setStore(n,s.data.refresh_token),this._refreshAccessToken())}async getAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:n}=this._cache.keys;if(!this._cache.getStore(n))throw new Li({message:"refresh token不存在,登录状态异常"});let o=this._cache.getStore(e),a=this._cache.getStore(t),r=!0;return this._shouldRefreshAccessTokenHook&&!(await this._shouldRefreshAccessTokenHook(o,a))&&(r=!1),(!o||!a||a<Date.now())&&r?this.refreshAccessToken():{accessToken:o,accessTokenExpire:a}}async request(e,t,n){const o=`x-tcb-trace_${this.config.env}`;let a="application/x-www-form-urlencoded";const r={action:e,env:this.config.env,dataVersion:"2019-08-16",...t};if(-1===Bs.indexOf(e)){const{refreshTokenKey:e}=this._cache.keys;this._cache.getStore(e)&&(r.access_token=(await this.getAccessToken()).accessToken)}let i;if("storage.uploadFile"===e){i=new FormData;for(let e in i)i.hasOwnProperty(e)&&void 0!==i[e]&&i.append(e,r[e]);a="multipart/form-data"}else{a="application/json",i={};for(let e in r)void 0!==r[e]&&(i[e]=r[e])}let s={headers:{"content-type":a}};n&&n.timeout&&(s.timeout=n.timeout),n&&n.onUploadProgress&&(s.onUploadProgress=n.onUploadProgress);const l=this._localCache.getStore(o);l&&(s.headers["X-TCB-Trace"]=l);const{parse:c,inQuery:u,search:d}=t;let m={env:this.config.env};c&&(m.parse=!0),u&&(m={...u,...m});let p=function(e,t,n={}){const o=/\?/.test(t);let a="";for(let r in n)""===a?!o&&(t+="?"):a+="&",a+=`${r}=${encodeURIComponent(n[r])}`;return/^http(s)?\:\/\//.test(t+=a)?t:`${e}${t}`}(Qi,"//tcb-api.tencentcloudapi.com/web",m);d&&(p+=d);const f=await this.post({url:p,data:i,...s}),h=f.header&&f.header["x-tcb-trace"];if(h&&this._localCache.setStore(o,h),200!==Number(f.status)&&200!==Number(f.statusCode)||!f.data)throw new Li({code:"NETWORK_ERROR",message:"network request error"});return f}async send(e,t={},n={}){const o=await this.request(e,t,{...n,onUploadProgress:t.onUploadProgress});if("ACCESS_TOKEN_EXPIRED"===o.data.code&&-1===Bs.indexOf(e)){await this.refreshAccessToken();const o=await this.request(e,t,{...n,onUploadProgress:t.onUploadProgress});if(o.data.code)throw new Li({code:o.data.code,message:cs(o.data.message)});return o.data}if(o.data.code)throw new Li({code:o.data.code,message:cs(o.data.message)});return o.data}setRefreshToken(e){const{accessTokenKey:t,accessTokenExpireKey:n,refreshTokenKey:o}=this._cache.keys;this._cache.removeStore(t),this._cache.removeStore(n),this._cache.setStore(o,e)}}const Ms={};function Ls(e){return Ms[e]}class js{constructor(e){this.config=e,this._cache=ys(e.env),this._request=Ls(e.env)}setRefreshToken(e){const{accessTokenKey:t,accessTokenExpireKey:n,refreshTokenKey:o}=this._cache.keys;this._cache.removeStore(t),this._cache.removeStore(n),this._cache.setStore(o,e)}setAccessToken(e,t){const{accessTokenKey:n,accessTokenExpireKey:o}=this._cache.keys;this._cache.setStore(n,e),this._cache.setStore(o,t)}async refreshUserInfo(){const{data:e}=await this._request.send("auth.getUserInfo",{});return this.setLocalUserInfo(e),e}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e)}}class Fs{constructor(e){if(!e)throw new Li({code:"PARAM_ERROR",message:"envId is not defined"});this._envId=e,this._cache=ys(this._envId),this._request=Ls(this._envId),this.setUserInfo()}linkWithTicket(e){if("string"!=typeof e)throw new Li({code:"PARAM_ERROR",message:"ticket must be string"});return this._request.send("auth.linkWithTicket",{ticket:e})}linkWithRedirect(e){e.signInWithRedirect()}updatePassword(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}updateEmail(e){return this._request.send("auth.updateEmail",{newEmail:e})}updateUsername(e){if("string"!=typeof e)throw new Li({code:"PARAM_ERROR",message:"username must be a string"});return this._request.send("auth.updateUsername",{username:e})}async getLinkedUidList(){const{data:e}=await this._request.send("auth.getLinkedUidList",{});let t=!1;const{users:n}=e;return n.forEach(e=>{e.wxOpenId&&e.wxPublicId&&(t=!0)}),{users:n,hasPrimaryUid:t}}setPrimaryUid(e){return this._request.send("auth.setPrimaryUid",{uid:e})}unlink(e){return this._request.send("auth.unlink",{platform:e})}async update(e){const{nickName:t,gender:n,avatarUrl:o,province:a,country:r,city:i}=e,{data:s}=await this._request.send("auth.updateUserInfo",{nickName:t,gender:n,avatarUrl:o,province:a,country:r,city:i});this.setLocalUserInfo(s)}async refresh(){const{data:e}=await this._request.send("auth.getUserInfo",{});return this.setLocalUserInfo(e),e}setUserInfo(){const{userInfoKey:e}=this._cache.keys,t=this._cache.getStore(e);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach(e=>{this[e]=t[e]}),this.location={country:t.country,province:t.province,city:t.city}}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e),this.setUserInfo()}}class Us{constructor(e){if(!e)throw new Li({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=ys(e);const{refreshTokenKey:t,accessTokenKey:n,accessTokenExpireKey:o}=this._cache.keys,a=this._cache.getStore(t),r=this._cache.getStore(n),i=this._cache.getStore(o);this.credential={refreshToken:a,accessToken:r,accessTokenExpire:i},this.user=new Fs(e)}get isAnonymousAuth(){return this.loginType===Vs.ANONYMOUS}get isCustomAuth(){return this.loginType===Vs.CUSTOM}get isWeixinAuth(){return this.loginType===Vs.WECHAT||this.loginType===Vs.WECHAT_OPEN||this.loginType===Vs.WECHAT_PUBLIC}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}class $s extends js{async signIn(){this._cache.updatePersistence("local");const{anonymousUuidKey:e,refreshTokenKey:t}=this._cache.keys,n=this._cache.getStore(e)||void 0,o=this._cache.getStore(t)||void 0,a=await this._request.send("auth.signInAnonymously",{anonymous_uuid:n,refresh_token:o});if(a.uuid&&a.refresh_token){this._setAnonymousUUID(a.uuid),this.setRefreshToken(a.refresh_token),await this._request.refreshAccessToken(),Ss(Cs),Ss(Es,{env:this.config.env,loginType:Vs.ANONYMOUS,persistence:"local"});const e=new Us(this.config.env);return await e.user.refresh(),e}throw new Li({message:"匿名登录失败"})}async linkAndRetrieveDataWithTicket(e){const{anonymousUuidKey:t,refreshTokenKey:n}=this._cache.keys,o=this._cache.getStore(t),a=this._cache.getStore(n),r=await this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:o,refresh_token:a,ticket:e});if(r.refresh_token)return this._clearAnonymousUUID(),this.setRefreshToken(r.refresh_token),await this._request.refreshAccessToken(),Ss(Is,{env:this.config.env}),Ss(Es,{loginType:Vs.CUSTOM,persistence:"local"}),{credential:{refreshToken:r.refresh_token}};throw new Li({message:"匿名转化失败"})}_setAnonymousUUID(e){const{anonymousUuidKey:t,loginTypeKey:n}=this._cache.keys;this._cache.removeStore(t),this._cache.setStore(t,e),this._cache.setStore(n,Vs.ANONYMOUS)}_clearAnonymousUUID(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}class Rs extends js{async signIn(e){if("string"!=typeof e)throw new Li({code:"PARAM_ERROR",message:"ticket must be a string"});const{refreshTokenKey:t}=this._cache.keys,n=await this._request.send("auth.signInWithTicket",{ticket:e,refresh_token:this._cache.getStore(t)||""});if(n.refresh_token)return this.setRefreshToken(n.refresh_token),await this._request.refreshAccessToken(),Ss(Cs),Ss(Es,{env:this.config.env,loginType:Vs.CUSTOM,persistence:this.config.persistence}),await this.refreshUserInfo(),new Us(this.config.env);throw new Li({message:"自定义登录失败"})}}class zs extends js{async signIn(e,t){if("string"!=typeof e)throw new Li({code:"PARAM_ERROR",message:"email must be a string"});const{refreshTokenKey:n}=this._cache.keys,o=await this._request.send("auth.signIn",{loginType:"EMAIL",email:e,password:t,refresh_token:this._cache.getStore(n)||""}),{refresh_token:a,access_token:r,access_token_expire:i}=o;if(a)return this.setRefreshToken(a),r&&i?this.setAccessToken(r,i):await this._request.refreshAccessToken(),await this.refreshUserInfo(),Ss(Cs),Ss(Es,{env:this.config.env,loginType:Vs.EMAIL,persistence:this.config.persistence}),new Us(this.config.env);throw o.code?new Li({code:o.code,message:`邮箱登录失败: ${o.message}`}):new Li({message:"邮箱登录失败"})}async activate(e){return this._request.send("auth.activateEndUserMail",{token:e})}async resetPasswordWithToken(e,t){return this._request.send("auth.resetPasswordWithToken",{token:e,newPassword:t})}}class Hs extends js{async signIn(e,t){if("string"!=typeof e)throw new Li({code:"PARAM_ERROR",message:"username must be a string"});"string"!=typeof t&&(t="",console.warn("password is empty"));const{refreshTokenKey:n}=this._cache.keys,o=await this._request.send("auth.signIn",{loginType:Vs.USERNAME,username:e,password:t,refresh_token:this._cache.getStore(n)||""}),{refresh_token:a,access_token_expire:r,access_token:i}=o;if(a)return this.setRefreshToken(a),i&&r?this.setAccessToken(i,r):await this._request.refreshAccessToken(),await this.refreshUserInfo(),Ss(Cs),Ss(Es,{env:this.config.env,loginType:Vs.USERNAME,persistence:this.config.persistence}),new Us(this.config.env);throw o.code?new Li({code:o.code,message:`用户名密码登录失败: ${o.message}`}):new Li({message:"用户名密码登录失败"})}}class qs{constructor(e){this.config=e,this._cache=ys(e.env),this._request=Ls(e.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),xs(Es,this._onLoginTypeChanged)}get currentUser(){const e=this.hasLoginState();return e&&e.user||null}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}anonymousAuthProvider(){return new $s(this.config)}customAuthProvider(){return new Rs(this.config)}emailAuthProvider(){return new zs(this.config)}usernameAuthProvider(){return new Hs(this.config)}async signInAnonymously(){return new $s(this.config).signIn()}async signInWithEmailAndPassword(e,t){return new zs(this.config).signIn(e,t)}signInWithUsernameAndPassword(e,t){return new Hs(this.config).signIn(e,t)}async linkAndRetrieveDataWithTicket(e){return this._anonymousAuthProvider||(this._anonymousAuthProvider=new $s(this.config)),xs(Is,this._onAnonymousConverted),await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e)}async signOut(){if(this.loginType===Vs.ANONYMOUS)throw new Li({message:"匿名用户不支持登出操作"});const{refreshTokenKey:e,accessTokenKey:t,accessTokenExpireKey:n}=this._cache.keys,o=this._cache.getStore(e);if(!o)return;const a=await this._request.send("auth.logout",{refresh_token:o});return this._cache.removeStore(e),this._cache.removeStore(t),this._cache.removeStore(n),Ss(Cs),Ss(Es,{env:this.config.env,loginType:Vs.NULL,persistence:this.config.persistence}),a}async signUpWithEmailAndPassword(e,t){return this._request.send("auth.signUpWithEmailAndPassword",{email:e,password:t})}async sendPasswordResetEmail(e){return this._request.send("auth.sendPasswordResetEmail",{email:e})}onLoginStateChanged(e){xs(Cs,()=>{const t=this.hasLoginState();e.call(this,t)});const t=this.hasLoginState();e.call(this,t)}onLoginStateExpired(e){xs(_s,e.bind(this))}onAccessTokenRefreshed(e){xs(Ds,e.bind(this))}onAnonymousConverted(e){xs(Is,e.bind(this))}onLoginTypeChanged(e){xs(Es,()=>{const t=this.hasLoginState();e.call(this,t)})}async getAccessToken(){return{accessToken:(await this._request.getAccessToken()).accessToken,env:this.config.env}}hasLoginState(){const{refreshTokenKey:e}=this._cache.keys;return this._cache.getStore(e)?new Us(this.config.env):null}async isUsernameRegistered(e){if("string"!=typeof e)throw new Li({code:"PARAM_ERROR",message:"username must be a string"});const{data:t}=await this._request.send("auth.isUsernameRegistered",{username:e});return t&&t.isRegistered}getLoginState(){return Promise.resolve(this.hasLoginState())}async signInWithTicket(e){return new Rs(this.config).signIn(e)}shouldRefreshAccessToken(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}getUserInfo(){return this._request.send("auth.getUserInfo",{}).then(e=>e.code?e:{...e.data,requestId:e.seqId})}getAuthHeader(){const{refreshTokenKey:e,accessTokenKey:t}=this._cache.keys,n=this._cache.getStore(e);return{"x-cloudbase-credentials":this._cache.getStore(t)+"/@@/"+n}}_onAnonymousConverted(e){const{env:t}=e.data;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}_onLoginTypeChanged(e){const{loginType:t,persistence:n,env:o}=e.data;o===this.config.env&&(this._cache.updatePersistence(n),this._cache.setStore(this._cache.keys.loginTypeKey,t))}}const Gs=function(e,t){t=t||is();const n=Ls(this.config.env),{cloudPath:o,filePath:a,onUploadProgress:r,fileType:i="image"}=e;return n.send("storage.getUploadMetadata",{path:o}).then(e=>{const{data:{url:s,authorization:l,token:c,fileId:u,cosFileId:d},requestId:m}=e,p={key:o,signature:l,"x-cos-meta-fileid":d,success_action_status:"201","x-cos-security-token":c};n.upload({url:s,data:p,file:a,name:o,fileType:i,onUploadProgress:r}).then(e=>{201===e.statusCode?t(null,{fileID:u,requestId:m}):t(new Li({code:"STORAGE_REQUEST_FAIL",message:`STORAGE_REQUEST_FAIL: ${e.data}`}))}).catch(e=>{t(e)})}).catch(e=>{t(e)}),t.promise},Ws=function(e,t){t=t||is();const n=Ls(this.config.env),{cloudPath:o}=e;return n.send("storage.getUploadMetadata",{path:o}).then(e=>{t(null,e)}).catch(e=>{t(e)}),t.promise},Js=function({fileList:e},t){if(t=t||is(),!e||!Array.isArray(e))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};for(let o of e)if(!o||"string"!=typeof o)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"};const n={fileid_list:e};return Ls(this.config.env).send("storage.batchDeleteFile",n).then(e=>{e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})}).catch(e=>{t(e)}),t.promise},Xs=function({fileList:e},t){t=t||is(),e&&Array.isArray(e)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});let n=[];for(let a of e)"object"==typeof a?(a.hasOwnProperty("fileID")&&a.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),n.push({fileid:a.fileID,max_age:a.maxAge})):"string"==typeof a?n.push({fileid:a}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"});const o={file_list:n};return Ls(this.config.env).send("storage.batchGetDownloadUrl",o).then(e=>{e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})}).catch(e=>{t(e)}),t.promise},Ks=async function({fileID:e},t){const n=(await Xs.call(this,{fileList:[{fileID:e,maxAge:600}]})).fileList[0];if("SUCCESS"!==n.code)return t?t(n):new Promise(e=>{e(n)});const o=Ls(this.config.env);let a=n.download_url;if(a=encodeURI(a),!t)return o.download({url:a});t(await o.download({url:a}))},Ys=function({name:e,data:t,query:n,parse:o,search:a,timeout:r},i){const s=i||is();let l;try{l=t?JSON.stringify(t):""}catch(u){return Promise.reject(u)}if(!e)return Promise.reject(new Li({code:"PARAM_ERROR",message:"函数名不能为空"}));const c={inQuery:n,parse:o,search:a,function_name:e,request_data:l};return Ls(this.config.env).send("functions.invokeFunction",c,{timeout:r}).then(e=>{if(e.code)s(null,e);else{let n=e.data.response_data;if(o)s(null,{result:n,requestId:e.requestId});else try{n=JSON.parse(e.data.response_data),s(null,{result:n,requestId:e.requestId})}catch(t){s(new Li({message:"response data must be json"}))}}return s.promise}).catch(e=>{s(e)}),s.promise},Zs={timeout:15e3,persistence:"session"},Qs={};class el{constructor(e){this.config=e||this.config,this.authObj=void 0}init(e){switch(ds.adapter||(this.requestClient=new ds.adapter.reqClass({timeout:e.timeout||5e3,timeoutMsg:`请求在${(e.timeout||5e3)/1e3}s内未完成,已中断`})),this.config={...Zs,...e},!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new el(this.config)}auth({persistence:e}={}){if(this.authObj)return this.authObj;const t=e||ds.adapter.primaryStorage||Zs.persistence;var n;return t!==this.config.persistence&&(this.config.persistence=t),function(e){const{env:t}=e;vs[t]=new hs(e),gs[t]=new hs({...e,persistence:"local"})}(this.config),n=this.config,Ms[n.env]=new Os(n),this.authObj=new qs(this.config),this.authObj}on(e,t){return xs.apply(this,[e,t])}off(e,t){return Ns.apply(this,[e,t])}callFunction(e,t){return Ys.apply(this,[e,t])}deleteFile(e,t){return Js.apply(this,[e,t])}getTempFileURL(e,t){return Xs.apply(this,[e,t])}downloadFile(e,t){return Ks.apply(this,[e,t])}uploadFile(e,t){return Gs.apply(this,[e,t])}getUploadMetadata(e,t){return Ws.apply(this,[e,t])}registerExtension(e){Qs[e.name]=e}async invokeExtension(e,t){const n=Qs[e];if(!n)throw new Li({message:`扩展${e} 必须先注册`});return await n.invoke(t,this)}useAdapters(e){const{adapter:t,runtime:n}=function(e){const t=(n=e,"[object Array]"===Object.prototype.toString.call(n)?e:[e]);var n;for(const o of t){const{isMatch:e,genAdapter:t,runtime:n}=o;if(e())return{adapter:t(),runtime:n}}}(e)||{};t&&(ds.adapter=t),n&&(ds.runtime=n)}}var tl=new el;function nl(e,t,n){void 0===n&&(n={});var o=/\?/.test(t),a="";for(var r in n)""===a?!o&&(t+="?"):a+="&",a+=r+"="+encodeURIComponent(n[r]);return/^http(s)?:\/\//.test(t+=a)?t:""+e+t}class ol{post(e){const{url:t,data:n,headers:o,timeout:a}=e;return new Promise((e,r)=>{ji.request({url:nl("https:",t),data:n,method:"POST",header:o,timeout:a,success(t){e(t)},fail(e){r(e)}})})}upload(e){return new Promise((t,n)=>{const{url:o,file:a,data:r,headers:i,fileType:s}=e,l=ji.uploadFile({url:nl("https:",o),name:"file",formData:Object.assign({},r),filePath:a,fileType:s,header:i,success(e){const n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&r.success_action_status&&(n.statusCode=parseInt(r.success_action_status,10)),t(n)},fail(e){n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate(t=>{e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})})})}}const al={setItem(e,t){ji.setStorageSync(e,t)},getItem:e=>ji.getStorageSync(e),removeItem(e){ji.removeStorageSync(e)},clear(){ji.clearStorageSync()}};var rl={genAdapter:function(){return{root:{},reqClass:ol,localStorage:al,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};tl.useAdapters(rl);const il=tl,sl=il.init;il.init=function(e){e.env=e.spaceId;const t=sl.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;const n=t.auth;return t.auth=function(e){const t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach(e=>{var n;t[e]=(n=t[e],function(e){e=e||{};const{success:t,fail:o,complete:a}=Mi(e);if(!(t||o||a))return n.call(this,e);n.call(this,e).then(e=>{t&&t(e),a&&a(e)},e=>{o&&o(e),a&&a(e)})}).bind(t)}),t},t.customAuth=t.auth,t};var ll=il;async function cl(e,t){const n=`http://${e}:${t}/system/ping`;try{const e=await(o={url:n,timeout:500},new Promise((e,t)=>{ji.request({...o,success(t){e(t)},fail(e){t(e)}})}));return!(!e.data||0!==e.data.code)}catch(a){return!1}var o}const ul={"serverless.file.resource.generateProximalSign":"storage/generate-proximal-sign","serverless.file.resource.report":"storage/report","serverless.file.resource.delete":"storage/delete","serverless.file.resource.getTempFileURL":"storage/get-temp-file-url"};var dl=class{constructor(e){if(["spaceId","clientSecret"].forEach(t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)}),!e.endpoint)throw new Error("集群空间未配置ApiEndpoint,配置后需要重新关联服务空间后生效");this.config=Object.assign({},e),this.config.provider="dcloud",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.adapter=ji}async request(e,t=!0){return e=this.setupRequest(e),Promise.resolve().then(()=>Xi(e,this.adapter.request))}requestLocal(e){return new Promise((t,n)=>{this.adapter.request(Object.assign(e,{complete(e){if(e||(e={}),!e.statusCode||e.statusCode>=400){const t=e.data&&e.data.code||"SYS_ERR",o=e.data&&e.data.message||"request:fail";return n(new Li({code:t,message:o}))}t({success:!0,result:e.data})}}))})}setupRequest(e){const t=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};n["x-serverless-sign"]=Ji(t,this.config.clientSecret);const o=Wi();n["x-client-info"]=encodeURIComponent(JSON.stringify(o));const{token:a}=Ui();return n["x-client-token"]=a,{url:this.config.requestUrl,method:"POST",data:t,dataType:"json",header:JSON.parse(JSON.stringify(n))}}async setupLocalRequest(e){const t=Wi(),{token:n}=Ui(),o=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now(),clientInfo:t,token:n}),{address:a,servePort:r}=this.__dev__&&this.__dev__.debugInfo||{},{address:i}=await async function(e,t){let n;for(let o=0;o<e.length;o++){const a=e[o];if(await cl(a,t)){n=a;break}}return{address:n,port:t}}(a,r);return{url:`http://${i}:${r}/${ul[e.method]}`,method:"POST",data:o,dataType:"json",header:JSON.parse(JSON.stringify({"Content-Type":"application/json"}))}}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(t,!1)}getUploadFileOptions(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(t)}reportUploadFile(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(t)}uploadFile({filePath:e,cloudPath:t,fileType:n="image",onUploadProgress:o}){if(!t)throw new Li({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});let a;return this.getUploadFileOptions({cloudPath:t}).then(t=>{const{url:r,formData:i,name:s}=t.result;return a=t.result.fileUrl,new Promise((t,a)=>{const l=this.adapter.uploadFile({url:r,formData:i,name:s,filePath:e,fileType:n,success(e){e&&e.statusCode<400?t(e):a(new Li({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){a(new Li({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof o&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate(e=>{o({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})})})}).then(()=>this.reportUploadFile({cloudPath:t})).then(t=>new Promise((n,o)=>{t.success?n({success:!0,filePath:e,fileID:a}):o(new Li({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}deleteFile({fileList:e}){const t={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:e})};return this.request(t).then(e=>{if(e.success)return e.result;throw new Li({code:"DELETE_FILE_FAILED",message:"删除文件失败"})})}getTempFileURL({fileList:e,maxAge:t}={}){if(!Array.isArray(e)||0===e.length)throw new Li({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:e,maxAge:t})};return this.request(n).then(e=>{if(e.success)return{fileList:e.result.fileList.map(e=>({fileID:e.fileID,tempFileURL:e.tempFileURL}))};throw new Li({code:"GET_TEMP_FILE_URL_FAILED",message:"获取临时文件链接失败"})})}},ml={init(e){const t=new dl(e),n={signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},pl=qr(function(e,t){e.exports=Wr.enc.Hex});function fl(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function hl(e="",t={}){const{data:n,functionName:o,method:a,headers:r,signHeaderKeys:i=[],config:s}=t,l=Date.now(),c=fl(),u=Object.assign({},r,{"x-from-app-id":s.spaceAppId,"x-from-env-id":s.spaceId,"x-to-env-id":s.spaceId,"x-from-instance-id":l,"x-from-function-name":o,"x-client-timestamp":l,"x-alipay-source":"client","x-request-id":c,"x-alipay-callid":c,"x-trace-id":c}),d=["x-from-app-id","x-from-env-id","x-to-env-id","x-from-instance-id","x-from-function-name","x-client-timestamp"].concat(i),[m="",p=""]=e.split("?")||[],f=function(e){const t=e.signedHeaders.join(";"),n=e.signedHeaders.map(t=>`${t.toLowerCase()}:${e.headers[t]}\n`).join(""),o=as(e.body).toString(pl),a=`${e.method.toUpperCase()}\n${e.path}\n${e.query}\n${n}\n${t}\n${o}\n`,r=as(a).toString(pl),i=`HMAC-SHA256\n${e.timestamp}\n${r}\n`,s=rs(i,e.secretKey).toString(pl);return`HMAC-SHA256 Credential=${e.secretId}, SignedHeaders=${t}, Signature=${s}`}({path:m,query:p,method:a,headers:u,timestamp:l,body:JSON.stringify(n),secretId:s.accessKey,secretKey:s.secretKey,signedHeaders:d.sort()});return{url:`${s.endpoint}${e}`,headers:Object.assign({},u,{Authorization:f})}}function vl({url:e,data:t,method:n="POST",headers:o={},timeout:a}){return new Promise((r,i)=>{ji.request({url:e,method:n,data:"object"==typeof t?JSON.stringify(t):t,header:o,dataType:"json",timeout:a,complete:(e={})=>{const t=o["x-trace-id"]||"";if(!e.statusCode||e.statusCode>=400){const{message:n,errMsg:o,trace_id:a}=e.data||{};return i(new Li({code:"SYS_ERR",message:n||o||"request:fail",requestId:a||t}))}r({status:e.statusCode,data:e.data,headers:e.header,requestId:t})}})})}function gl(e,t){const{path:n,data:o,method:a="GET"}=e,{url:r,headers:i}=hl(n,{functionName:"",data:o,method:a,headers:{"x-alipay-cloud-mode":"oss","x-data-api-type":"oss","x-expire-timestamp":Date.now()+6e4},signHeaderKeys:["x-data-api-type","x-expire-timestamp"],config:t});return vl({url:r,data:o,method:a,headers:i}).then(e=>{const t=e.data||{};if(!t.success)throw new Li({code:e.errCode,message:e.errMsg,requestId:e.requestId});return t.data||{}}).catch(e=>{throw new Li({code:e.errCode,message:e.errMsg,requestId:e.requestId})})}function yl(e=""){const t=e.trim().replace(/^cloud:\/\//,""),n=t.indexOf("/");if(n<=0)throw new Li({code:"INVALID_PARAM",message:"fileID不合法"});const o=t.substring(0,n),a=t.substring(n+1);return o!==this.config.spaceId&&console.warn("file ".concat(e," does not belong to env ").concat(this.config.spaceId)),a}function kl(e=""){return"cloud://".concat(this.config.spaceId,"/").concat(e.replace(/^\/+/,""))}class wl{constructor(e){this.config=e}signedURL(e,t={}){const n=`/ws/function/${e}`,o=this.config.wsEndpoint.replace(/^ws(s)?:\/\//,""),a=Object.assign({},t,{accessKeyId:this.config.accessKey,signatureNonce:fl(),timestamp:""+Date.now()}),r=[n,["accessKeyId","authorization","signatureNonce","timestamp"].sort().map(function(e){return a[e]?"".concat(e,"=").concat(a[e]):null}).filter(Boolean).join("&"),`host:${o}`].join("\n"),i=["HMAC-SHA256",as(r).toString(pl)].join("\n"),s=rs(i,this.config.secretKey).toString(pl),l=Object.keys(a).map(e=>`${e}=${encodeURIComponent(a[e])}`).join("&");return`${this.config.wsEndpoint}${n}?${l}&signature=${s}`}}var bl=class{constructor(e){if(["spaceId","spaceAppId","accessKey","secretKey"].forEach(t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)}),e.endpoint){if("string"!=typeof e.endpoint)throw new Error("endpoint must be string");if(!/^https:\/\//.test(e.endpoint))throw new Error("endpoint must start with https://");e.endpoint=e.endpoint.replace(/\/$/,"")}this.config=Object.assign({},e,{endpoint:e.endpoint||`https://${e.spaceId}.api-hz.cloudbasefunction.cn`,wsEndpoint:e.wsEndpoint||`wss://${e.spaceId}.api-hz.cloudbasefunction.cn`}),this._websocket=new wl(this.config)}callFunction(e){return function(e,t){const{name:n,data:o,async:a=!1,timeout:r}=e,i="POST",s={"x-to-function-name":n};a&&(s["x-function-invoke-type"]="async");const{url:l,headers:c}=hl("/functions/invokeFunction",{functionName:n,data:o,method:i,headers:s,signHeaderKeys:["x-to-function-name"],config:t});return vl({url:l,data:o,method:i,headers:c,timeout:r}).then(e=>{let t=0;if(a){const n=e.data||{};t="200"===n.errCode?0:n.errCode,e.data=n.data||{},e.errMsg=n.errMsg}if(0!==t)throw new Li({code:t,message:e.errMsg,requestId:e.requestId});return{errCode:t,success:0===t,requestId:e.requestId,result:e.data}}).catch(e=>{throw new Li({code:e.errCode,message:e.errMsg,requestId:e.requestId})})}(e,this.config)}uploadFileToOSS({url:e,filePath:t,fileType:n,formData:o,onUploadProgress:a}){return new Promise((r,i)=>{const s=ji.uploadFile({url:e,filePath:t,fileType:n,formData:o,name:"file",success(e){e&&e.statusCode<400?r(e):i(new Li({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){i(new Li({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof a&&s&&"function"==typeof s.onProgressUpdate&&s.onProgressUpdate(e=>{a({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})})})}async uploadFile({filePath:e,cloudPath:t="",fileType:n="image",onUploadProgress:o}){if("string"!==ei(t))throw new Li({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new Li({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new Li({code:"INVALID_PARAM",message:"cloudPath不合法"});const a=await gl({path:"/".concat(t.replace(/^\//,""),"?post_url")},this.config),{file_id:r,upload_url:i,form_data:s}=a,l=s&&s.reduce((e,t)=>(e[t.key]=t.value,e),{});return this.uploadFileToOSS({url:i,filePath:e,fileType:n,formData:l,onUploadProgress:o}).then(()=>({fileID:r}))}async getTempFileURL({fileList:e}){return new Promise((t,n)=>{(!e||e.length<0)&&t({code:"INVALID_PARAM",message:"fileList不能为空数组"}),e.length>50&&t({code:"INVALID_PARAM",message:"fileList数组长度不能超过50"});const o=[];for(const r of e){let e;"string"!==ei(r)&&t({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});try{e=yl.call(this,r)}catch(a){console.warn(a.errCode,a.errMsg),e=r}o.push({file_id:e,expire:600})}gl({path:"/?download_url",data:{file_list:o},method:"POST"},this.config).then(e=>{const{file_list:n=[]}=e;t({fileList:n.map(e=>({fileID:kl.call(this,e.file_id),tempFileURL:e.download_url}))})}).catch(e=>n(e))})}async connectWebSocket(e){const{name:t,query:n}=e;return ji.connectSocket({url:this._websocket.signedURL(t,n),complete:()=>{}})}},xl={init:e=>{e.provider="alipay";const t=new bl(e);return t.auth=function(){return{signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!0)}}},t}};function Sl({data:e}){let t;t=Wi();const n=JSON.parse(JSON.stringify(e||{}));if(Object.assign(n,{clientInfo:t}),!n.uniIdToken){const{token:e}=Ui();e&&(n.uniIdToken=e)}return n}const Nl=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}];var Cl=/[\\^$.*+?()[\]{}|]/g,_l=RegExp(Cl.source);function El(e,t,n){return e.replace(new RegExp((o=t)&&_l.test(o)?o.replace(Cl,"\\$&"):o,"g"),n);var o}const Il=2e4,Dl={code:20101,message:"Invalid client"};function Vl(e){const{errSubject:t,subject:n,errCode:o,errMsg:a,code:r,message:i,cause:s}=e||{};return new Li({subject:t||n||"uni-secure-network",code:o||r||Il,message:a||i,cause:s})}let Bl;function Tl({secretType:e}={}){return"request"===e||"response"===e||"both"===e}function Pl({name:e,data:t={}}={}){return"DCloud-clientDB"===e&&"encryption"===t.redirectTo&&"getAppClientKey"===t.action}function Al({functionName:e,result:t,logPvd:n}){}function Ol(e){const t=e.callFunction,n=function(n){const o=n.name;n.data=Sl.call(e,{data:n.data});const a={aliyun:"aliyun",tencent:"tcb",tcb:"tcb",alipay:"alipay",dcloud:"dcloud"}[this.config.provider],r=Tl(n),i=Pl(n),s=r||i;return t.call(this,n).then(e=>(e.errCode=0,!s&&Al.call(this,{functionName:o,result:e,logPvd:a}),Promise.resolve(e)),e=>(!s&&Al.call(this,{functionName:o,result:e,logPvd:a}),e&&e.message&&(e.message=function({message:e="",extraInfo:t={},formatter:n=[]}={}){for(let o=0;o<n.length;o++){const{rule:a,content:r,mode:i}=n[o],s=e.match(a);if(!s)continue;let l=r;for(let e=1;e<s.length;e++)l=El(l,`{$${e}}`,s[e]);for(const e in t)l=El(l,`{${e}}`,t[e]);return"replace"===i?l:e+l}return e}({message:`[${n.name}]: ${e.message}`,formatter:Nl,extraInfo:{functionName:o}})),Promise.reject(e)))};e.callFunction=function(t){const{provider:o,spaceId:a}=e.config,r=t.name;let i,s;return t.data=t.data||{},i=n,i=i.bind(e),s=Pl(t)?n.call(e,t):Tl(t)?new Bl({secretType:t.secretType,uniCloudIns:e}).wrapEncryptDataCallFunction(n.bind(e))(t):function({provider:e,spaceId:t,functionName:n}={}){const{appId:o,uniPlatform:a,osName:r}=Hi();let i=a;"app"===a&&(i=r);const s=function({provider:e,spaceId:t}={}){const n=li;if(!n)return{};e=function(e){return"tencent"===e?"tcb":e}(e);const o=n.find(n=>n.provider===e&&n.spaceId===t);return o&&o.config}({provider:e,spaceId:t});if(!s||!s.accessControl||!s.accessControl.enable)return!1;const l=s.accessControl.function||{},c=Object.keys(l);if(0===c.length)return!0;const u=function(e,t){let n,o,a;for(let r=0;r<e.length;r++){const i=e[r];i!==t?"*"!==i?i.split(",").map(e=>e.trim()).indexOf(t)>-1&&(o=i):a=i:n=i}return n||o||a}(c,n);if(!u)return!1;if((l[u]||[]).find((e={})=>e.appId===o&&(e.platform||"").toLowerCase()===i.toLowerCase()))return!0;throw console.error(`此应用[appId: ${o}, platform: ${i}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`),Vl(Dl)}({provider:o,spaceId:a,functionName:r})?new Bl({secretType:t.secretType,uniCloudIns:e}).wrapVerifyClientCallFunction(n.bind(e))(t):i(t),Object.defineProperty(s,"result",{get:()=>(console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"),{})}),s.then(e=>("undefined"!=typeof UTSJSONObject&&(e.result=new UTSJSONObject(e.result)),e))}}Bl=class{constructor(){throw Vl({message:`Platform ${ci} is not enabled, please check whether secure network module is enabled in your manifest.json`})}};const Ml=Symbol("CLIENT_DB_INTERNAL");function Ll(e,t){return e.then="DoNotReturnProxyWithAFunctionNamedThen",e._internalType=Ml,e.inspect=null,e.__v_raw=void 0,new Proxy(e,{get(e,n,o){if("_uniClient"===n)return null;if("symbol"==typeof n)return e[n];if(n in e||"string"!=typeof n){const t=e[n];return"function"==typeof t?t.bind(e):t}return t.get(e,n,o)}})}function jl(e){return{on:(t,n)=>{e[t]=e[t]||[],e[t].indexOf(n)>-1||e[t].push(n)},off:(t,n)=>{e[t]=e[t]||[];const o=e[t].indexOf(n);-1!==o&&e[t].splice(o,1)}}}const Fl=["db.Geo","db.command","command.aggregate"];function Ul(e,t){return Fl.indexOf(`${e}.${t}`)>-1}function $l(e){switch(ei(e=Fi(e))){case"array":return e.map(e=>$l(e));case"object":return e._internalType===Ml||Object.keys(e).forEach(t=>{e[t]=$l(e[t])}),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function Rl(e){return e&&e.content&&e.content.$method}class zl{constructor(e,t,n){this.content=e,this.prevStage=t||null,this.udb=null,this._database=n}toJSON(){let e=this;const t=[e.content];for(;e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map(e=>({$method:e.$method,$param:$l(e.$param)}))}}toString(){return JSON.stringify(this.toJSON())}getAction(){const e=this.toJSON().$db.find(e=>"action"===e.$method);return e&&e.$param&&e.$param[0]}getCommand(){return{$db:this.toJSON().$db.filter(e=>"action"!==e.$method)}}get isAggregate(){let e=this;for(;e;){const t=Rl(e),n=Rl(e.prevStage);if("aggregate"===t&&"collection"===n||"pipeline"===t)return!0;e=e.prevStage}return!1}get isCommand(){let e=this;for(;e;){if("command"===Rl(e))return!0;e=e.prevStage}return!1}get isAggregateCommand(){let e=this;for(;e;){const t=Rl(e),n=Rl(e.prevStage);if("aggregate"===t&&"command"===n)return!0;e=e.prevStage}return!1}getNextStageFn(e){const t=this;return function(){return Hl({$method:e,$param:$l(Array.from(arguments))},t,t._database)}}get count(){return this.isAggregate?this.getNextStageFn("count"):function(){return this._send("count",Array.from(arguments))}}get remove(){return this.isCommand?this.getNextStageFn("remove"):function(){return this._send("remove",Array.from(arguments))}}get(){return this._send("get",Array.from(arguments))}get add(){return this.isCommand?this.getNextStageFn("add"):function(){return this._send("add",Array.from(arguments))}}update(){return this._send("update",Array.from(arguments))}end(){return this._send("end",Array.from(arguments))}get set(){return this.isCommand?this.getNextStageFn("set"):function(){throw new Error("JQL禁止使用set方法")}}_send(e,t){const n=this.getAction(),o=this.getCommand();return o.$db.push({$method:e,$param:$l(t)}),this._database._callCloudFunction({action:n,command:o})}}function Hl(e,t,n){return Ll(new zl(e,t,n),{get(e,t){let o="db";return e&&e.content&&(o=e.content.$method),Ul(o,t)?Hl({$method:t},e,n):function(){return Hl({$method:t,$param:$l(Array.from(arguments))},e,n)}}})}function ql({path:e,method:t}){return class{constructor(){this.param=Array.from(arguments)}toJSON(){return{$newDb:[...e.map(e=>({$method:e})),{$method:t,$param:this.param}]}}toString(){return JSON.stringify(this.toJSON())}}}function Gl(e,t={}){return Ll(new e(t),{get:(e,t)=>Ul("db",t)?Hl({$method:t},null,e):function(){return Hl({$method:t,$param:$l(Array.from(arguments))},null,e)}})}class Wl extends class{constructor({uniClient:e={},isJQL:t=!1}={}){this._uniClient=e,this._authCallBacks={},this._dbCallBacks={},e._isDefault&&(this._dbCallBacks=fi("_globalUniCloudDatabaseCallback")),t||(this.auth=jl(this._authCallBacks)),this._isJQL=t,Object.assign(this,jl(this._dbCallBacks)),this.env=Ll({},{get:(e,t)=>({$env:t})}),this.Geo=Ll({},{get:(e,t)=>ql({path:["Geo"],method:t})}),this.serverDate=ql({path:[],method:"serverDate"}),this.RegExp=ql({path:[],method:"RegExp"})}getCloudEnv(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}_callback(e,t){const n=this._dbCallBacks;n[e]&&n[e].forEach(e=>{e(...t)})}_callbackAuth(e,t){const n=this._authCallBacks;n[e]&&n[e].forEach(e=>{e(...t)})}multiSend(){const e=Array.from(arguments),t=e.map(e=>{const t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}});return this._callCloudFunction({multiCommand:t,queryList:e})}}{_parseResult(e){return this._isJQL?e.result:e}_callCloudFunction({action:e,command:t,multiCommand:n,queryList:o}){function a(e,t){if(n&&o)for(let n=0;n<o.length;n++){const a=o[n];a.udb&&"function"==typeof a.udb.setResult&&(t?a.udb.setResult(t):a.udb.setResult(e.result.dataList[n]))}}const r=this,i=this._isJQL?"databaseForJQL":"database";function s(e){return r._callback("error",[e]),ki(wi(i,"fail"),e).then(()=>ki(wi(i,"complete"),e)).then(()=>(a(null,e),Ti(Si,{type:_i,content:e}),Promise.reject(e)))}const l=ki(wi(i,"invoke")),c=this._uniClient;return l.then(()=>c.callFunction({name:"DCloud-clientDB",type:"CLIENT_DB",data:{action:e,command:t,multiCommand:n}})).then(e=>{const{code:t,message:n,token:o,tokenExpired:l,systemInfo:c=[]}=e.result;if(c)for(let a=0;a<c.length;a++){const{level:e,message:t,detail:n}=c[a];let o="[System Info]"+t;n&&(o=`${o}\n详细信息:${n}`),(console["warn"===e?"error":e]||console.log)(o)}if(t)return s(new Li({code:t,message:n,requestId:e.requestId}));e.result.errCode=e.result.errCode||e.result.code,e.result.errMsg=e.result.errMsg||e.result.message,o&&l&&($i({token:o,tokenExpired:l}),this._callbackAuth("refreshToken",[{token:o,tokenExpired:l}]),this._callback("refreshToken",[{token:o,tokenExpired:l}]),Ti(Ci,{token:o,tokenExpired:l}));const u=[{prop:"affectedDocs",tips:"affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"},{prop:"code",tips:"code不再推荐使用,请使用errCode替代"},{prop:"message",tips:"message不再推荐使用,请使用errMsg替代"}];for(let a=0;a<u.length;a++){const{prop:t,tips:n}=u[a];if(t in e.result){const o=e.result[t];Object.defineProperty(e.result,t,{get:()=>(console.warn(n),o)})}}return d=e,ki(wi(i,"success"),d).then(()=>ki(wi(i,"complete"),d)).then(()=>{a(d,null);const e=r._parseResult(d);return Ti(Si,{type:_i,content:e}),Promise.resolve(e)});var d},e=>(/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),s(new Li({code:e.code||"SYSTEM_ERROR",message:e.message,requestId:e.requestId}))))}}const Jl="token无效,跳转登录页面",Xl="token过期,跳转登录页面",Kl={TOKEN_INVALID_TOKEN_EXPIRED:Xl,TOKEN_INVALID_INVALID_CLIENTID:Jl,TOKEN_INVALID:Jl,TOKEN_INVALID_WRONG_TOKEN:Jl,TOKEN_INVALID_ANONYMOUS_USER:Jl},Yl={"uni-id-token-expired":Xl,"uni-id-check-token-failed":Jl,"uni-id-token-not-exist":Jl,"uni-id-check-device-feature-failed":Jl};function Zl(e,t){let n="";return n=e?`${e}/${t}`:t,n.replace(/^\//,"")}function Ql(e=[],t=""){const n=[],o=[];return e.forEach(e=>{!0===e.needLogin?n.push(Zl(t,e.path)):!1===e.needLogin&&o.push(Zl(t,e.path))}),{needLoginPage:n,notNeedLoginPage:o}}function ec(e){return e.split("?")[0].replace(/^\//,"")}function tc(){return function(e){let t=e&&e.$page&&e.$page.fullPath||"";return t?("/"!==t.charAt(0)&&(t="/"+t),t):t}(function(){const e=getCurrentPages();return e[e.length-1]}())}function nc(){return ec(tc())}function oc(e="",t={}){if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;const n=t.list,o=ec(e);return n.some(e=>e.pagePath===o)}const ac=!!Hr.uniIdRouter,{loginPage:rc,routerNeedLogin:ic,resToLogin:sc,needLoginPage:lc,notNeedLoginPage:cc,loginPageInTabBar:uc}=function({pages:e=[],subPackages:t=[],uniIdRouter:n={},tabBar:o={}}=Hr){const{loginPage:a,needLogin:r=[],resToLogin:i=!0}=n,{needLoginPage:s,notNeedLoginPage:l}=Ql(e),{needLoginPage:c,notNeedLoginPage:u}=function(e=[]){const t=[],n=[];return e.forEach(e=>{const{root:o,pages:a=[]}=e,{needLoginPage:r,notNeedLoginPage:i}=Ql(a,o);t.push(...r),n.push(...i)}),{needLoginPage:t,notNeedLoginPage:n}}(t);return{loginPage:a,routerNeedLogin:r,resToLogin:i,needLoginPage:[...s,...c],notNeedLoginPage:[...l,...u],loginPageInTabBar:oc(a,o)}}();if(lc.indexOf(rc)>-1)throw new Error(`Login page [${rc}] should not be "needLogin", please check your pages.json`);function dc(e){const t=nc();if("/"===e.charAt(0))return e;const[n,o]=e.split("?"),a=n.replace(/^\//,"").split("/"),r=t.split("/");r.pop();for(let i=0;i<a.length;i++){const e=a[i];".."===e?r.pop():"."!==e&&r.push(e)}return""===r[0]&&r.shift(),"/"+r.join("/")+(o?"?"+o:"")}function mc({redirect:e}){const t=ec(e),n=ec(rc);return nc()!==n&&t!==n}function pc({api:e,redirect:t}={}){if(!t||!mc({redirect:t}))return;const n=(a=t,"/"!==(o=rc).charAt(0)&&(o="/"+o),a?o.indexOf("?")>-1?o+`&uniIdRedirectUrl=${encodeURIComponent(a)}`:o+`?uniIdRedirectUrl=${encodeURIComponent(a)}`:o);var o,a;uc?"navigateTo"!==e&&"redirectTo"!==e||(e="switchTab"):"switchTab"===e&&(e="navigateTo");const r={navigateTo:uni.navigateTo,redirectTo:uni.redirectTo,switchTab:uni.switchTab,reLaunch:uni.reLaunch};setTimeout(()=>{r[e]({url:n})},0)}function fc({url:e}={}){const t={abortLoginPageJump:!1,autoToLoginPage:!1},n=function(){const{token:e,tokenExpired:t}=Ui();let n;if(e){if(t<Date.now()){const e="uni-id-token-expired";n={errCode:e,errMsg:Yl[e]}}}else{const e="uni-id-check-token-failed";n={errCode:e,errMsg:Yl[e]}}return n}();if(function(e){const t=ec(dc(e));return!(cc.indexOf(t)>-1)&&(lc.indexOf(t)>-1||ic.some(t=>{return n=e,new RegExp(t).test(n);var n}))}(e)&&n){if(n.uniIdRedirectUrl=e,Di(Ni).length>0)return setTimeout(()=>{Ti(Ni,n)},0),t.abortLoginPageJump=!0,t;t.autoToLoginPage=!0}return t}function hc(){!function(){const e=tc(),{abortLoginPageJump:t,autoToLoginPage:n}=fc({url:e});t||n&&pc({api:"redirectTo",redirect:e})}();const e=["navigateTo","redirectTo","reLaunch","switchTab"];for(let t=0;t<e.length;t++){const n=e[t];uni.addInterceptor(n,{invoke(e){const{abortLoginPageJump:t,autoToLoginPage:o}=fc({url:e.url});return t?e:o?(pc({api:n,redirect:dc(e.url)}),!1):e}})}}function vc(){this.onResponse(e=>{const{type:t,content:n}=e;let o=!1;switch(t){case"cloudobject":o=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in Yl}(n);break;case"clientdb":o=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in Kl}(n)}o&&function(e={}){const t=Di(Ni);Oi().then(()=>{const n=tc();if(n&&mc({redirect:n}))return t.length>0?Ti(Ni,Object.assign({uniIdRedirectUrl:n},e)):void(rc&&pc({api:"navigateTo",redirect:n}))})}(n)})}function gc(e){var t;(t=e).onResponse=function(e){Vi(Si,e)},t.offResponse=function(e){Bi(Si,e)},function(e){e.onNeedLogin=function(e){Vi(Ni,e)},e.offNeedLogin=function(e){Bi(Ni,e)},ac&&(fi("_globalUniCloudStatus").needLoginInit||(fi("_globalUniCloudStatus").needLoginInit=!0,Oi().then(()=>{hc.call(e)}),sc&&vc.call(e)))}(e),function(e){e.onRefreshToken=function(e){Vi(Ci,e)},e.offRefreshToken=function(e){Bi(Ci,e)}}(e)}let yc;const kc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",wc=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function bc(){const e=Ui().token||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse((o=t[1],decodeURIComponent(yc(o).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))))}catch(a){throw new Error("获取当前用户信息出错,详细错误信息为:"+a.message)}var o;return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}yc="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!wc.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,o,a="",r=0;r<e.length;)t=kc.indexOf(e.charAt(r++))<<18|kc.indexOf(e.charAt(r++))<<12|(n=kc.indexOf(e.charAt(r++)))<<6|(o=kc.indexOf(e.charAt(r++))),a+=64===n?String.fromCharCode(t>>16&255):64===o?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return a}:atob;var xc=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(qr(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n="chooseAndUploadFile:ok",o="chooseAndUploadFile:fail";function a(e,t){return e.tempFiles.forEach((e,n)=>{e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))}),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map(e=>e.path)),e}function r(e,t,{onChooseFile:o,onUploadProgress:a}){return t.then(e=>{if(o){const t=o(e);if(void 0!==t)return Promise.resolve(t).then(t=>void 0===t?e:t)}return e}).then(t=>!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t,o=5,a){(t=Object.assign({},t)).errMsg=n;const r=t.tempFiles,i=r.length;let s=0;return new Promise(n=>{for(;s<o;)l();function l(){const o=s++;if(o>=i)return void(!r.find(e=>!e.url&&!e.errMsg)&&n(t));const c=r[o];e.uploadFile({provider:c.provider,filePath:c.path,cloudPath:c.cloudPath,fileType:c.fileType,cloudPathAsRealPath:c.cloudPathAsRealPath,onUploadProgress(e){e.index=o,e.tempFile=c,e.tempFilePath=c.path,a&&a(e)}}).then(e=>{c.url=e.fileID,o<i&&l()}).catch(e=>{c.errMsg=e.errMsg||e.message,o<i&&l()})}})}(e,t,5,a))}t.initChooseAndUploadFile=function(e){return function(t={type:"all"}){return"image"===t.type?r(e,function(e){const{count:t,sizeType:n,sourceType:r=["album","camera"],extension:i}=e;return new Promise((e,s)=>{uni.chooseImage({count:t,sizeType:n,sourceType:r,extension:i,success(t){e(a(t,"image"))},fail(e){s({errMsg:e.errMsg.replace("chooseImage:fail",o)})}})})}(t),t):"video"===t.type?r(e,function(e){const{camera:t,compressed:n,maxDuration:r,sourceType:i=["album","camera"],extension:s}=e;return new Promise((e,l)=>{uni.chooseVideo({camera:t,compressed:n,maxDuration:r,sourceType:i,extension:s,success(t){const{tempFilePath:n,duration:o,size:r,height:i,width:s}=t;e(a({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:r,type:t.tempFile&&t.tempFile.type||"",width:s,height:i,duration:o,fileType:"video",cloudPath:""}]},"video"))},fail(e){l({errMsg:e.errMsg.replace("chooseVideo:fail",o)})}})})}(t),t):r(e,function(e){const{count:t,extension:n}=e;return new Promise((e,r)=>{let i=uni.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(i=wx.chooseMessageFile),"function"!=typeof i)return r({errMsg:o+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});i({type:"all",count:t,extension:n,success(t){e(a(t))},fail(e){r({errMsg:e.errMsg.replace("chooseFile:fail",o)})}})})}(t),t)}}}));function Sc(e){return{props:{localdata:{type:Array,default:()=>[]},options:{type:[Object,Array],default:()=>({})},spaceInfo:{type:Object,default:()=>({})},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:()=>({mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{},mixinDatacomError:null}),created(){this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch(()=>{var e=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach(t=>{e.push(this[t])}),e},(e,t)=>{if("manual"===this.loadtime)return;let n=!1;const o=[];for(let a=2;a<e.length;a++)e[a]!==t[a]&&(o.push(e[a]),n=!0);e[0]!==t[0]&&(this.mixinDatacomPage.current=this.pageCurrent),this.mixinDatacomPage.size=this.pageSize,this.onMixinDatacomPropsChange(n,o)})},methods:{onMixinDatacomPropsChange(e,t){},mixinDatacomEasyGet({getone:e=!1,success:t,fail:n}={}){this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomError=null,this.mixinDatacomGet().then(n=>{this.mixinDatacomLoading=!1;const{data:o,count:a}=n.result;this.getcount&&(this.mixinDatacomPage.count=a),this.mixinDatacomHasMore=o.length<this.pageSize;const r=e?o.length?o[0]:void 0:o;this.mixinDatacomResData=r,t&&t(r)}).catch(e=>{this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=e,this.mixinDatacomError=e,n&&n(e)}))},mixinDatacomGet(t={}){let n;t=t||{},n="undefined"!=typeof __uniX&&__uniX?e.databaseForJQL(this.spaceInfo):e.database(this.spaceInfo);const o=t.action||this.action;o&&(n=n.action(o));const a=t.collection||this.collection;n=Array.isArray(a)?n.collection(...a):n.collection(a);const r=t.where||this.where;r&&Object.keys(r).length&&(n=n.where(r));const i=t.field||this.field;i&&(n=n.field(i));const s=t.foreignKey||this.foreignKey;s&&(n=n.foreignKey(s));const l=t.groupby||this.groupby;l&&(n=n.groupBy(l));const c=t.groupField||this.groupField;c&&(n=n.groupField(c)),!0===(void 0!==t.distinct?t.distinct:this.distinct)&&(n=n.distinct());const u=t.orderby||this.orderby;u&&(n=n.orderBy(u));const d=void 0!==t.pageCurrent?t.pageCurrent:this.mixinDatacomPage.current,m=void 0!==t.pageSize?t.pageSize:this.mixinDatacomPage.size,p=void 0!==t.getcount?t.getcount:this.getcount,f=void 0!==t.gettree?t.gettree:this.gettree,h=void 0!==t.gettreepath?t.gettreepath:this.gettreepath,v={getCount:p},g={limitLevel:void 0!==t.limitlevel?t.limitlevel:this.limitlevel,startWith:void 0!==t.startwith?t.startwith:this.startwith};return f&&(v.getTree=g),h&&(v.getTreePath=g),n=n.skip(m*(d-1)).limit(m).get(v),n}}}}function Nc(e){return fi("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}",e.config.spaceId))}async function Cc({openid:e,callLoginByWeixin:t=!1}={}){throw Nc(this),new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${ci}\``)}async function _c(e){const t=Nc(this);return t.initPromise||(t.initPromise=Cc.call(this,e).then(e=>e).catch(e=>{throw delete t.initPromise,e})),t.initPromise}function Ec(e){Gi=e}function Ic(e){const t={getSystemInfo:uni.getSystemInfo,getPushClientId:uni.getPushClientId};return function(n){return new Promise((o,a)=>{t[e]({...n,success(e){o(e)},fail(e){a(e)}})})}}class Dc extends class{constructor(){this._callback={}}addListener(e,t){this._callback[e]||(this._callback[e]=[]),this._callback[e].push(t)}on(e,t){return this.addListener(e,t)}removeListener(e,t){if(!t)throw new Error('The "listener" argument must be of type function. Received undefined');const n=this._callback[e];if(!n)return;const o=function(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]===t)return n;return-1}(n,t);n.splice(o,1)}off(e,t){return this.removeListener(e,t)}removeAllListener(e){delete this._callback[e]}emit(e,...t){const n=this._callback[e];if(n)for(let o=0;o<n.length;o++)n[o](...t)}}{constructor(){super(),this._uniPushMessageCallback=this._receivePushMessage.bind(this),this._currentMessageId=-1,this._payloadQueue=[]}init(){return Promise.all([Ic("getSystemInfo")(),Ic("getPushClientId")()]).then(([{appId:e}={},{cid:t}={}]=[])=>{if(!e)throw new Error("Invalid appId, please check the manifest.json file");if(!t)throw new Error("Invalid push client id");this._appId=e,this._pushClientId=t,this._seqId=Date.now()+"-"+Math.floor(9e5*Math.random()+1e5),this.emit("open"),this._initMessageListener()},e=>{throw this.emit("error",e),this.close(),e})}async open(){return this.init()}_isUniCloudSSE(e){if("receive"!==e.type)return!1;const t=e&&e.data&&e.data.payload;return!(!t||"UNI_CLOUD_SSE"!==t.channel||t.seqId!==this._seqId)}_receivePushMessage(e){if(!this._isUniCloudSSE(e))return;const t=e&&e.data&&e.data.payload,{action:n,messageId:o,message:a}=t;this._payloadQueue.push({action:n,messageId:o,message:a}),this._consumMessage()}_consumMessage(){for(;;){const e=this._payloadQueue.find(e=>e.messageId===this._currentMessageId+1);if(!e)break;this._currentMessageId++,this._parseMessagePayload(e)}}_parseMessagePayload(e){const{action:t,messageId:n,message:o}=e;"end"===t?this._end({messageId:n,message:o}):"message"===t&&this._appendMessage({messageId:n,message:o})}_appendMessage({messageId:e,message:t}={}){this.emit("message",t)}_end({messageId:e,message:t}={}){this.emit("end",t),this.close()}_initMessageListener(){uni.onPushMessage(this._uniPushMessageCallback)}_destroy(){uni.offPushMessage(this._uniPushMessageCallback)}toJSON(){return{appId:this._appId,pushClientId:this._pushClientId,seqId:this._seqId}}close(){this._destroy(),this.emit("close")}}const Vc={tcb:ll,tencent:ll,aliyun:Zi,private:ml,dcloud:ml,alipay:xl};let Bc=new class{init(e){let t={};const n=Vc[e.provider];if(!n)throw new Error("未提供正确的provider参数");var o;return t=n.init(e),function(e){e._initPromiseHub||(e._initPromiseHub=new ii({createPromise:function(){let t=Promise.resolve();t=new Promise(e=>{setTimeout(()=>{e()},1)});const n=e.auth();return t.then(()=>n.getLoginState()).then(e=>e?Promise.resolve():n.signInAnonymously())}}))}(t),Ol(t),function(e){const t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),(o=t).database=function(e){if(e&&Object.keys(e).length>0)return o.init(e).database();if(this._database)return this._database;const t=Gl(Wl,{uniClient:o});return this._database=t,t},o.databaseForJQL=function(e){if(e&&Object.keys(e).length>0)return o.init(e).databaseForJQL();if(this._databaseForJQL)return this._databaseForJQL;const t=Gl(Wl,{uniClient:o,isJQL:!0});return this._databaseForJQL=t,t},function(e){e.getCurrentUserInfo=bc,e.chooseAndUploadFile=xc.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Sc(e)}}),e.SSEChannel=Dc,e.initSecureNetworkByWeixin=function(e){return function({openid:t,callLoginByWeixin:n=!1}={}){return _c.call(e,{openid:t,callLoginByWeixin:n})}}(e),e.setCustomClientInfo=Ec,e.importObject=function(t){return function(n,o={}){o=function(e,t={}){return e.customUI=t.customUI||e.customUI,e.parseSystemError=t.parseSystemError||e.parseSystemError,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),"object"==typeof t.secretMethods&&(e.secretMethods=t.secretMethods),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},o);const{customUI:a,loadingOptions:r,errorOptions:i,parseSystemError:s}=o,l=!a;return new Proxy({},{get(a,c){switch(c){case"toString":return"[object UniCloudObject]";case"toJSON":return{}}return function({fn:e,interceptorName:t,getCallbackArgs:n}={}){return async function(...o){const a=n?n({params:o}):{};let r,i;try{return await ki(wi(t,"invoke"),{...a}),r=await e(...o),await ki(wi(t,"success"),{...a,result:r}),r}catch(s){throw i=s,await ki(wi(t,"fail"),{...a,error:i}),i}finally{await ki(wi(t,"complete"),i?{...a,error:i}:{...a,result:r})}}}({fn:async function a(...u){let d;l&&uni.showLoading({title:r.title,mask:r.mask});const m={name:n,type:"OBJECT",data:{method:c,params:u}};"object"==typeof o.secretMethods&&function(e,t){const n=t.data.method,o=e.secretMethods||{},a=o[n]||o["*"];a&&(t.secretType=a)}(o,m);let p=!1;try{d=await t.callFunction(m)}catch(e){p=!0,d={result:new Li(e)}}const{errSubject:f,errCode:h,errMsg:v,newToken:g}=d.result||{};if(l&&uni.hideLoading(),g&&g.token&&g.tokenExpired&&($i(g),Ti(Ci,{...g})),h){let e=v;if(p&&s&&(e=(await s({objectName:n,methodName:c,params:u,errSubject:f,errCode:h,errMsg:v})).errMsg||v),l)if("toast"===i.type)uni.showToast({title:e,icon:"none"});else{if("modal"!==i.type)throw new Error(`Invalid errorOptions.type: ${i.type}`);{const{confirm:t}=await async function({title:e,content:t,showCancel:n,cancelText:o,confirmText:a}={}){return new Promise((r,i)=>{uni.showModal({title:e,content:t,showCancel:n,cancelText:o,confirmText:a,success(e){r(e)},fail(){r({confirm:!1,cancel:!0})}})})}({title:"提示",content:e,showCancel:i.retry,cancelText:"取消",confirmText:i.retry?"重试":"确定"});if(i.retry&&t)return a(...u)}}const t=new Li({subject:f,code:h,message:v,requestId:d.requestId});throw t.detail=d.result,Ti(Si,{type:Ii,content:t}),t}return Ti(Si,{type:Ii,content:d.result}),d.result},interceptorName:"callObject",getCallbackArgs:function({params:e}={}){return{objectName:n,methodName:c,params:e}}})}})}}(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach(e=>{if(!t[e])return;const n=t[e];t[e]=function(){return n.apply(t,Array.from(arguments))},t[e]=function(e,t){return function(n){let o=!1;if("callFunction"===t){const e=n&&n.type||Yr;o=e!==Yr}const a="callFunction"===t&&!o,r=this._initPromiseHub.exec();n=n||{};const{success:i,fail:s,complete:l}=Mi(n),c=r.then(()=>o?Promise.resolve():ki(wi(t,"invoke"),n)).then(()=>e.call(this,n)).then(e=>o?Promise.resolve(e):ki(wi(t,"success"),e).then(()=>ki(wi(t,"complete"),e)).then(()=>(a&&Ti(Si,{type:Ei,content:e}),Promise.resolve(e))),e=>o?Promise.reject(e):ki(wi(t,"fail"),e).then(()=>ki(wi(t,"complete"),e)).then(()=>(Ti(Si,{type:Ei,content:e}),Promise.reject(e))));if(!(i||s||l))return c;c.then(e=>{i&&i(e),l&&l(e),a&&Ti(Si,{type:Ei,content:e})},e=>{s&&s(e),l&&l(e),a&&Ti(Si,{type:Ei,content:e})})}}(t[e],e).bind(t)}),t.init=this.init,t}};(()=>{const e=ui;let t={};if(e&&1===e.length)t=e[0],Bc=Bc.init(t),Bc._isDefault=!0;else{const t=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];let n;n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":"应用未关联服务空间,请在uniCloud目录右键关联服务空间",t.forEach(e=>{Bc[e]=function(){return console.error(n),Promise.reject(new Li({code:"SYS_ERR",message:n}))}})}Object.assign(Bc,{get mixinDatacom(){return Sc(Bc)}}),gc(Bc),Bc.addInterceptor=gi,Bc.removeInterceptor=yi,Bc.interceptObject=bi,uni.__uniCloud=Bc;{const e=mi||(mi=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;function e(){return this}return void 0!==e()?e():new Function("return this")()}(),mi);e.uniCloud=Bc,e.UniCloudError=Li}})();var Tc=Bc;const Pc=Gn({name:"UniListChat",emits:["click"],props:{title:{type:String,default:""},note:{type:String,default:""},clickable:{type:Boolean,default:!1},link:{type:[Boolean,String],default:!1},to:{type:String,default:""},badgeText:{type:[String,Number],default:""},badgePositon:{type:String,default:"right"},time:{type:String,default:""},avatarCircle:{type:Boolean,default:!1},avatar:{type:String,default:""},avatarList:{type:Array,default:()=>[]}},computed:{isDraft(){return"[uni-im-draft]"==this.note.slice(0,14)},isSingle(){if("dot"===this.badgeText)return"uni-badge--dot";return this.badgeText.toString().length>1?"uni-badge--complex":"uni-badge--single"},computedAvatar(){return this.avatarList.length>4?(this.imageWidth=13.95,"avatarItem--3"):this.avatarList.length>1?(this.imageWidth=21.15,"avatarItem--2"):(this.imageWidth=45,"avatarItem--1")}},watch:{avatar:{handler(e){"cloud://"==e.substr(0,8)?Tc.getTempFileURL({fileList:[e]}).then(e=>{let t=e.fileList||e.result.fileList;this.avatarUrl=t[0].tempFileURL}):this.avatarUrl=e},immediate:!0}},data:()=>({isFirstChild:!1,border:!0,imageWidth:50,avatarUrl:""}),mounted(){this.list=this.getForm(),this.list&&(this.list.firstChildAppend||(this.list.firstChildAppend=!0,this.isFirstChild=!0),this.border=this.list.border)},methods:{getForm(e="uniList"){let t=this.$parent,n=t.$options.name;for(;n!==e;){if(t=t.$parent,!t)return!1;n=t.$options.name}return t},onClick(){""===this.to?(this.clickable||this.link)&&this.$emit("click",{data:{}}):this.openPage()},openPage(){-1!==["navigateTo","redirectTo","reLaunch","switchTab"].indexOf(this.link)?this.pageApi(this.link):this.pageApi("navigateTo")},pageApi(e){let t={url:this.to,success:e=>{this.$emit("click",{data:e})},fail:e=>{this.$emit("click",{data:e})}};switch(e){case"navigateTo":default:uni.navigateTo(t);break;case"redirectTo":uni.redirectTo(t);break;case"reLaunch":uni.reLaunch(t);break;case"switchTab":uni.switchTab(t)}}}},[["render",function(t,n,o,a,r,i){const s=e.resolveComponent("cell");return e.openBlock(),e.createBlock(s,null,{default:e.withCtx(()=>[e.createElementVNode("view",{"hover-class":o.clickable||o.link?"uni-list-chat--hover":"",class:"uni-list-chat",onClick:n[0]||(n[0]=e.withModifiers((...e)=>i.onClick&&i.onClick(...e),["stop"]))},[e.createElementVNode("view",{class:e.normalizeClass({"uni-list--border":r.border,"uni-list-chat--first":r.isFirstChild})},null,2),e.createElementVNode("view",{class:"uni-list-chat__container"},[e.createElementVNode("view",{class:"uni-list-chat__header-warp"},[o.avatarCircle||0===o.avatarList.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uni-list-chat__header",{"header--circle":o.avatarCircle}])},[e.createElementVNode("image",{class:e.normalizeClass(["uni-list-chat__header-image",{"header--circle":o.avatarCircle}]),src:r.avatarUrl,mode:"aspectFill"},null,10,["src"])],2)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-list-chat__header"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.avatarList,(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,class:e.normalizeClass(["uni-list-chat__header-box",i.computedAvatar]),style:e.normalizeStyle({width:r.imageWidth+"px",height:r.imageWidth+"px"})},[e.createElementVNode("image",{class:"uni-list-chat__header-image",style:e.normalizeStyle({width:r.imageWidth+"px",height:r.imageWidth+"px"}),src:t.url,mode:"aspectFill"},null,12,["src"])],6))),128))]))]),e.renderSlot(t.$slots,"header",{},void 0,!0),o.badgeText&&"left"===o.badgePositon?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uni-list-chat__badge uni-list-chat__badge-pos",[i.isSingle]])},[e.createElementVNode("text",{class:"uni-list-chat__badge-text"},e.toDisplayString("dot"===o.badgeText?"":o.badgeText),1)],2)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"uni-list-chat__content"},[e.createElementVNode("view",{class:"uni-list-chat__content-main"},[e.createElementVNode("text",{class:"uni-list-chat__content-title uni-ellipsis"},e.toDisplayString(o.title),1),e.createElementVNode("view",{style:{"flex-direction":"row"}},[i.isDraft?(e.openBlock(),e.createElementBlock("text",{key:0,class:"draft"},"[草稿]")):e.createCommentVNode("",!0),e.createElementVNode("text",{class:"uni-list-chat__content-note uni-ellipsis"},e.toDisplayString(i.isDraft?o.note.slice(14):o.note),1)])]),e.createElementVNode("view",{class:"uni-list-chat__content-extra"},[e.renderSlot(t.$slots,"default",{},()=>[e.createElementVNode("text",{class:"uni-list-chat__content-extra-text"},e.toDisplayString(o.time),1),o.badgeText&&"right"===o.badgePositon?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uni-list-chat__badge",[i.isSingle,"right"===o.badgePositon?"uni-list-chat--right":""]])},[e.createElementVNode("text",{class:"uni-list-chat__badge-text"},e.toDisplayString("dot"===o.badgeText?"":o.badgeText),1)],2)):e.createCommentVNode("",!0)],!0)])])])],8,["hover-class"])]),_:3})}],["__scopeId","data-v-2ccffa3f"]]),Ac={name:"uniList","mp-weixin":{options:{multipleSlots:!1}},props:{stackFromEnd:{type:Boolean,default:!1},enableBackToTop:{type:[Boolean,String],default:!1},scrollY:{type:[Boolean,String],default:!1},border:{type:Boolean,default:!0},renderReverse:{type:Boolean,default:!1}},created(){this.firstChildAppend=!1},methods:{loadMore(e){this.$emit("scrolltolower")},scroll(e){this.$emit("scroll",e)}}};const Oc=Gn(Ac,[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-list uni-border-top-bottom"},[o.border?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-list--border-top"})):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),o.border?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-list--border-bottom"})):e.createCommentVNode("",!0)])}],["__scopeId","data-v-585a3604"]]),Mc=async e=>sn.api("/v2/im/GetIMUserList","GET",e),Lc=async e=>sn.api("/v2/im/GetElmMedia","GET",e),jc=async e=>sn.api("/v2/im/GetImChatDetail","GET",e),Fc=async e=>sn.api("/v2/im/SetImMsgRead","POST",e),Uc=async e=>sn.api("/v2/im/SendToVendorV2","POST",e),$c=function(){const{getMtStoreIMStatus:t}=tn(),n=e.ref([]);let o=null;E(()=>{clearTimeout(o),o=setTimeout(async()=>{t(),r(),clearTimeout(o)},500)}),x(async()=>{f("storeMessge")&&(qn.state.storeInfo.allStoreInfo.id!==f("storeID")&&await qn.dispatch("storeInfo/getOneStore",f("storeID")),await t(),await r(),v("storeMessge")),uni.hideTabBarRedDot({index:2}),a.value||(n.value=[],r())});const a=e.computed(()=>qn.state.serveInfo.isFirstLogin);async function r(){let e=await async function(){let e=[],t=qn.getters["storeInfo/platformInfo"];if(t&&t.length>0){let n=t.find(e=>1===e.vendorID),o=t.find(e=>3===e.vendorID);n&&e.push({vendorStoreID:n.vendorStoreID,vendorID:"1",appID:n.vendorOrgCode}),o&&e.push({vendorStoreID:o.vendorStoreID,vendorID:"3",appID:o.vendorOrgCode})}return e}();if(!(e&&e.length>0))return;let t={payLoad:JSON.stringify(e)},o=e.find(e=>"1"===e.vendorID),a=e.find(e=>"3"===e.vendorID),r=await Mc(t);if(0==r.code){if("{}"===JSON.stringify(r.data))return;let e=o.appID,t=[],s=o&&r.data[`${o.appID}:${o.vendorStoreID}:1`]||[],l=a&&"{}"!==JSON.stringify(a)&&r.data[`${a.appID}:${a.vendorStoreID}:3`]||[],c=s.reverse(),u=l.reverse();c.map(n=>{let o=JSON.parse(n),a="";try{JSON.parse(Tt(o.latestMsg,e)),a="number"==typeof JSON.parse(Tt(o.latestMsg,e))?Tt(o.latestMsg,e):"【订单】"}catch(s){let t=Tt(o.latestMsg,e);a=""==t?"【商品】":t.includes("https")||t.includes("http")?-1==t.indexOf(".amr")?"【图片】":"【语音】":t}let r={...o,latestMsg:a,latestTime:Ct(+new Date(1e3*o.latestTime)),orderInfo:{},orderDesc:""};t.push(r),r.orderID&&i(r.orderID,t.length-1)}),u&&u.length>0&&u.map((e,n)=>{let o=JSON.parse(e),a=JSON.parse(o.latestMsg).text?JSON.parse(o.latestMsg).text:JSON.parse(o.latestMsg).duration?"【语音】":"【图片】";if(JSON.parse(o.latestMsg).elements&&JSON.parse(o.latestMsg).elements.length>0){let e=JSON.parse(o.latestMsg).elements.filter(e=>1===e.elementType);a=e&&e.length>0?JSON.parse(e[0].elementContent).text.replace("@商家",""):a}if((new Date).getTime()-1e3*o.latestTime<=432e5){let e={...o,latestMsg:a,latestTime:Ct(+new Date(1e3*o.latestTime)),orderInfo:{},orderDesc:""};t.push(e),e.orderID&&i(e.orderID,t.length-1)}}),n.value=t}else V("获取信息异常"),n.value.length}async function i(e,t){let o=await ho({vendorOrderID:e});"0"===o.code&&(n.value[t].orderInfo=o.data.data[0],n.value[t].orderDesc=` #${o.data.data[0].orderSeq}`)}return{charItem:function(e){e.latestMsg="",uni.navigateTo({url:`/subPages/messageChild/msgChat/msgChat?data=${JSON.stringify(e)}`})},userListData:n,jumpToSetUp:function(){uni.navigateTo({url:"/subPages/merchantChild/setUp/setUp"})},store:qn}},Rc=Gn(e.defineComponent({__name:"index",setup(t){const{charItem:n,userListData:o,jumpToSetUp:a,store:r}=$c();return(t,i)=>{const s=w(e.resolveDynamicComponent("jx-icon"),Yn),l=w(e.resolveDynamicComponent("uni-list-chat"),Pc),c=w(e.resolveDynamicComponent("uni-list"),Oc),u=w(e.resolveDynamicComponent("jx-empty"),Jn),d=w(e.resolveDynamicComponent("jx-login-empty"),Kn),m=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r).getters["storeInfo/imStatus"]?(e.openBlock(),e.createElementBlock("view",{key:0,style:{position:"absolute",bottom:"0",width:"100%"}},[e.createElementVNode("view",{class:"notice",onClick:i[0]||(i[0]=(...t)=>e.unref(a)&&e.unref(a)(...t))},[e.createElementVNode("text",null,e.toDisplayString(e.unref(r).getters["storeInfo/imStatus"])+"IM单聊状态已经关闭",1),e.createVNode(s,{icon:"gengduo",color:"red"})])])):e.createCommentVNode("",!0),e.unref(o).length>0?(e.openBlock(),e.createBlock(c,{key:1,border:!1},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),t=>(e.openBlock(),e.createElementBlock("view",{class:"chat-border",key:t.userID},[e.createVNode(l,{clickable:!0,onClick:o=>e.unref(n)(t),"avatar-circle":!0,title:1==t.vendorID?`【美团${t.orderDesc}】${"0"===t.userID?"群发消息":t.userID}`:`【饿了么】${t.userID}`,avatar:1==t.vendorID?"https://image.jxc4.com/image/75654ab606494a0efdb0cf7d7ad060d9.png":"https://image.jxc4.com/image/6c2f1dfd95890df8ef5e27bde15c4e7f.png",note:t.latestMsg,time:t.latestTime,"badge-positon":"left","badge-text":t.NewMessageNum},null,8,["onClick","title","avatar","note","time","badge-text"])]))),128))]),_:1})):(e.openBlock(),e.createBlock(u,{key:2,title:"暂无消息"})),e.createVNode(d,{title:"马上登录,查看消息"}),e.createVNode(m)],64)}}}),[["__scopeId","data-v-1242fe89"]]);const zc=Gn({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("view",{class:"jx-input"},[e.createElementVNode("view",{class:"left"},[e.renderSlot(t.$slots,"left",{},void 0,!0)]),e.renderSlot(t.$slots,"middle",{},void 0,!0),e.createElementVNode("view",{class:"left"},[e.renderSlot(t.$slots,"right",{},void 0,!0)])])}],["__scopeId","data-v-286355af"]]),Hc=e.defineComponent({__name:"addAuth",setup(t){const{setUserInfo:n,appWxLogin:o}=tn(),a=e.ref(!1);function r(){/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(d.value)?a.value=!0:a.value=!1}const i=e.ref(!1);function s(e){e.detail.value.length?(i.value=!0,qn.commit("serveInfo/setIsAgreement",!0),qn.commit("serveInfo/setIsAgreementIf",!1)):(qn.commit("serveInfo/setIsAgreement",!1),i.value=!1)}function l(){uni.navigateTo({url:"/subPages/agreement/jxcs?url=https://www.jxc4.com/managerApp/service.html"})}function c(){uni.navigateTo({url:"/subPages/agreement/jxcs?url=https://www.jxc4.com/managerApp/privacy.html"})}let u="";C(e=>{V("未绑定手机号,请先绑定手机号"),u=null==e?void 0:e.authToken});const d=e.ref("");async function m(){if(!qn.state.serveInfo.isAgreement){let e=null;return qn.commit("serveInfo/setIsAgreementIf",!1),clearTimeout(e),e=setTimeout(()=>{qn.commit("serveInfo/setIsAgreementIf",!0)},200),!1}if(!a.value)return;let e={authToken:u,mobile:d.value};0==(await Jt(e)).code?(h("token",u),async function(){o({success:e=>{qn.commit("storeInfo/jxLoadingFn",!0),clearTimeout(p),p=setTimeout(()=>{qn.commit("storeInfo/jxLoadingFn",!1),n(e)},500)},bangding:()=>{V("该用户不存在",2)}})}()):V("该用户不存在",2)}let p=null;return e.onBeforeUnmount(()=>{qn.commit("serveInfo/setIsAgreement",!1),clearTimeout(p)}),(t,n)=>{const o=w(e.resolveDynamicComponent("jx-input"),zc),u=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"addauth-root"},[e.createElementVNode("image",{src:"https://image.jxc4.com/image/bb397e02027c92f5ecec1935d050ac16.png",mode:"scaleToFill"}),e.createVNode(o,{class:"ipt"},{left:e.withCtx(()=>[e.createElementVNode("text",{class:"blod"},"+86")]),middle:e.withCtx(()=>[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=e=>d.value=e),onInput:r,placeholder:"请输入手机号"},null,544),[[e.vModelText,d.value]])]),_:1}),e.createElementVNode("button",{class:e.normalizeClass({active:a.value}),disabled:!a.value,onClick:m}," 绑定 ",10,["disabled"]),e.createElementVNode("view",{class:"copyright-root"},[e.createElementVNode("view",{class:e.normalizeClass(["center",{"center-active":e.unref(qn).state.serveInfo.isAgreementIf}])},[e.createElementVNode("label",null,[e.createElementVNode("checkbox-group",{onChange:s},[e.createElementVNode("checkbox",{checked:i.value,value:"cb",color:"#2dd091",style:{transform:"scale(0.7)","border-radius":"50%"}},null,8,["checked"]),e.createTextVNode("我已阅读并同意 ")],32)]),e.createElementVNode("text",{class:"text",onClick:l},"《用户协议》"),e.createElementVNode("text",{class:"text",onClick:c},"《隐私协议》"),e.createElementVNode("view",{class:e.normalizeClass(["lab",{"lab-active":e.unref(qn).state.serveInfo.isAgreementIf}])},"请勾选同意后在进行绑定",2)],2)])]),e.createElementVNode("view",{class:"copyright"},[e.createElementVNode("text",null,"成都若溪科技有限公司"),e.createElementVNode("text",null,"www.jxc4.com")]),e.createVNode(u)],64)}}}),qc=Gn(Hc,[["__scopeId","data-v-cb929f75"]]);const Gc=e=>"number"==typeof e?e+"px":e;const Wc=Gn({name:"UniNavBar",components:{statusBar:Gn({name:"UniStatusBar",data:()=>({statusBarHeight:uni.getSystemInfoSync().statusBarHeight+"px"})},[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("view",{style:e.normalizeStyle({height:r.statusBarHeight}),class:"uni-status-bar"},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}],["__scopeId","data-v-c99428a6"]])},emits:["clickLeft","clickRight","clickTitle"],props:{dark:{type:Boolean,default:!1},title:{type:String,default:""},leftText:{type:String,default:""},rightText:{type:String,default:""},leftIcon:{type:String,default:""},rightIcon:{type:String,default:""},fixed:{type:[Boolean,String],default:!1},color:{type:String,default:""},backgroundColor:{type:String,default:""},statusBar:{type:[Boolean,String],default:!1},shadow:{type:[Boolean,String],default:!1},border:{type:[Boolean,String],default:!0},height:{type:[Number,String],default:44},leftWidth:{type:[Number,String],default:60},rightWidth:{type:[Number,String],default:60},showMenuButtonWidth:{type:Boolean,default:!1},stat:{type:[Boolean,String],default:""}},data:()=>({navWidth:"auto"}),computed:{themeBgColor(){return this.dark?this.backgroundColor?this.backgroundColor:this.dark?"#333":"#FFF":this.backgroundColor||"#FFF"},themeColor(){return this.dark?this.color?this.color:this.dark?"#fff":"#333":this.color||"#333"},navbarHeight(){return this.fixed&&0===this.height?Gc(44):Gc(this.height)},leftIconWidth(){return Gc(this.leftWidth)},rightIconWidth(){return Gc(this.rightWidth)}},created(){},mounted(){uni.report&&this.stat&&""!==this.title&&uni.report("title",this.title)},methods:{onClickLeft(){this.$emit("clickLeft")},onClickRight(){this.$emit("clickRight")},onClickTitle(){this.$emit("clickTitle")}}},[["render",function(t,n,o,a,r,i){const s=e.resolveComponent("status-bar"),l=w(e.resolveDynamicComponent("uni-icons"),Ia);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uni-navbar",{"uni-dark":o.dark,"uni-nvue-fixed":o.fixed}])},[e.createElementVNode("view",{class:e.normalizeClass(["uni-navbar__content",{"uni-navbar--fixed":o.fixed,"uni-navbar--shadow":o.shadow,"uni-navbar--border":o.border}]),style:e.normalizeStyle({"background-color":i.themeBgColor})},[o.statusBar?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),e.createElementVNode("view",{style:e.normalizeStyle({color:i.themeColor,backgroundColor:i.themeBgColor,height:i.navbarHeight,width:o.showMenuButtonWidth?r.navWidth+"px":"100%"}),class:"uni-navbar__header"},[e.createElementVNode("view",{onClick:n[0]||(n[0]=(...e)=>i.onClickLeft&&i.onClickLeft(...e)),class:"uni-navbar__header-btns uni-navbar__header-btns-left",style:e.normalizeStyle({width:i.leftIconWidth})},[e.renderSlot(t.$slots,"left",{},()=>[o.leftIcon.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-navbar__content_view"},[e.createVNode(l,{color:i.themeColor,type:o.leftIcon,size:"20"},null,8,["color","type"])])):e.createCommentVNode("",!0),o.leftText.length?(e.openBlock(),e.createElementBlock("view",{key:1,class:e.normalizeClass([{"uni-navbar-btn-icon-left":!o.leftIcon.length>0},"uni-navbar-btn-text"])},[e.createElementVNode("text",{style:e.normalizeStyle({color:i.themeColor,fontSize:"12px"})},e.toDisplayString(o.leftText),5)],2)):e.createCommentVNode("",!0)],!0)],4),e.createElementVNode("view",{class:"uni-navbar__header-container",onClick:n[1]||(n[1]=(...e)=>i.onClickTitle&&i.onClickTitle(...e))},[e.renderSlot(t.$slots,"default",{},()=>[o.title.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-navbar__header-container-inner"},[e.createElementVNode("text",{class:"uni-nav-bar-text uni-ellipsis-1",style:e.normalizeStyle({color:i.themeColor})},e.toDisplayString(o.title),5)])):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("view",{onClick:n[2]||(n[2]=(...e)=>i.onClickRight&&i.onClickRight(...e)),class:"uni-navbar__header-btns uni-navbar__header-btns-right",style:e.normalizeStyle({width:i.rightIconWidth})},[e.renderSlot(t.$slots,"right",{},()=>[o.rightIcon.length?(e.openBlock(),e.createElementBlock("view",{key:0},[e.createVNode(l,{color:i.themeColor,type:o.rightIcon,size:"22"},null,8,["color","type"])])):e.createCommentVNode("",!0),o.rightText.length&&!o.rightIcon.length?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-navbar-btn-text"},[e.createElementVNode("text",{class:"uni-nav-bar-right-text",style:e.normalizeStyle({color:i.themeColor})},e.toDisplayString(o.rightText),5)])):e.createCommentVNode("",!0)],!0)],4)],4)],6),o.fixed?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-navbar__placeholder"},[o.statusBar?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"uni-navbar__placeholder-view",style:e.normalizeStyle({height:i.navbarHeight})},null,4)])):e.createCommentVNode("",!0)],2)}],["__scopeId","data-v-74976f08"]]);function Jc(e){let t="";for(let n in e){t+=`${n}:${e[n]};`}return t}const Xc=Gn({name:"uni-easyinput",emits:["click","iconClick","update:modelValue","input","focus","blur","confirm","clear","eyes","change","keyboardheightchange"],model:{prop:"modelValue",event:"update:modelValue"},options:{virtualHost:!0},inject:{form:{from:"uniForm",default:null},formItem:{from:"uniFormItem",default:null}},props:{name:String,value:[Number,String],modelValue:[Number,String],type:{type:String,default:"text"},clearable:{type:Boolean,default:!0},autoHeight:{type:Boolean,default:!1},placeholder:{type:String,default:" "},placeholderStyle:String,focus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},clearSize:{type:[Number,String],default:24},inputBorder:{type:Boolean,default:!0},prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},trim:{type:[Boolean,String],default:!1},cursorSpacing:{type:Number,default:0},passwordIcon:{type:Boolean,default:!0},adjustPosition:{type:Boolean,default:!0},primaryColor:{type:String,default:"#2979ff"},styles:{type:Object,default:()=>({color:"#333",backgroundColor:"#fff",disableColor:"#F7F6F6",borderColor:"#e5e5e5"})},errorMessage:{type:[String,Boolean],default:""}},data:()=>({focused:!1,val:"",showMsg:"",border:!1,isFirstBorder:!1,showClearIcon:!1,showPassword:!1,focusShow:!1,localMsg:"",isEnter:!1}),computed:{isVal(){const e=this.val;return!(!e&&0!==e)},msg(){return this.localMsg||this.errorMessage},inputMaxlength(){return Number(this.maxlength)},boxStyle(){return`color:${this.inputBorder&&this.msg?"#e43d33":this.styles.color};`},inputContentClass(){return function(e){let t="";for(let n in e)e[n]&&(t+=`${n} `);return t}({"is-input-border":this.inputBorder,"is-input-error-border":this.inputBorder&&this.msg,"is-textarea":"textarea"===this.type,"is-disabled":this.disabled,"is-focused":this.focusShow})},inputContentStyle(){const e=this.focusShow?this.primaryColor:this.styles.borderColor;return Jc({"border-color":(this.inputBorder&&this.msg?"#dd524d":e)||"#e5e5e5","background-color":this.disabled?this.styles.disableColor:this.styles.backgroundColor})},inputStyle(){return Jc({"padding-right":"password"===this.type||this.clearable||this.prefixIcon?"":"10px","padding-left":this.prefixIcon?"":"10px"})}},watch:{value(e){this.val=null!==e?e:""},modelValue(e){this.val=null!==e?e:""},focus(e){this.$nextTick(()=>{this.focused=this.focus,this.focusShow=this.focus})}},created(){this.init(),this.form&&this.formItem&&this.$watch("formItem.errMsg",e=>{this.localMsg=e})},mounted(){this.$nextTick(()=>{this.focused=this.focus,this.focusShow=this.focus})},methods:{init(){this.value||0===this.value?this.val=this.value:this.modelValue||0===this.modelValue||""===this.modelValue?this.val=this.modelValue:this.val=""},onClickIcon(e){this.$emit("iconClick",e)},onEyes(){this.showPassword=!this.showPassword,this.$emit("eyes",this.showPassword)},onInput(e){let t=e.detail.value;this.trim&&("boolean"==typeof this.trim&&this.trim&&(t=this.trimStr(t)),"string"==typeof this.trim&&(t=this.trimStr(t,this.trim))),this.errMsg&&(this.errMsg=""),this.val=t,this.$emit("update:modelValue",t),this.$emit("input",t)},onFocus(){this.$nextTick(()=>{this.focused=!0}),this.$emit("focus",null)},_Focus(e){this.focusShow=!0,this.$emit("focus",e)},onBlur(){this.focused=!1,this.$emit("blur",null)},_Blur(e){if(e.detail.value,this.focusShow=!1,this.$emit("blur",e),!1===this.isEnter&&this.$emit("change",this.val),this.form&&this.formItem){const{validateTrigger:e}=this.form;"blur"===e&&this.formItem.onFieldChange()}},onConfirm(e){this.$emit("confirm",this.val),this.isEnter=!0,this.$emit("change",this.val),this.$nextTick(()=>{this.isEnter=!1})},onClear(e){this.val="",this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("clear")},onkeyboardheightchange(e){this.$emit("keyboardheightchange",e)},trimStr:(e,t="both")=>"both"===t?e.trim():"left"===t?e.trimLeft():"right"===t?e.trimRight():"start"===t?e.trimStart():"end"===t?e.trimEnd():"all"===t?e.replace(/\s+/g,""):e}},[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("uni-icons"),Ia);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uni-easyinput",{"uni-easyinput-error":i.msg}]),style:e.normalizeStyle(i.boxStyle)},[e.createElementVNode("view",{class:e.normalizeClass(["uni-easyinput__content",i.inputContentClass]),style:e.normalizeStyle(i.inputContentStyle)},[o.prefixIcon?(e.openBlock(),e.createBlock(s,{key:0,class:"content-clear-icon",type:o.prefixIcon,color:"#c0c4cc",onClick:n[0]||(n[0]=e=>i.onClickIcon("prefix")),size:"22"},null,8,["type"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"left",{},void 0,!0),"textarea"===o.type?(e.openBlock(),e.createElementBlock("textarea",{key:1,class:e.normalizeClass(["uni-easyinput__content-textarea",{"input-padding":o.inputBorder}]),name:o.name,value:r.val,placeholder:o.placeholder,placeholderStyle:o.placeholderStyle,disabled:o.disabled,"placeholder-class":"uni-easyinput__placeholder-class",maxlength:i.inputMaxlength,focus:r.focused,autoHeight:o.autoHeight,"cursor-spacing":o.cursorSpacing,"adjust-position":o.adjustPosition,onInput:n[1]||(n[1]=(...e)=>i.onInput&&i.onInput(...e)),onBlur:n[2]||(n[2]=(...e)=>i._Blur&&i._Blur(...e)),onFocus:n[3]||(n[3]=(...e)=>i._Focus&&i._Focus(...e)),onConfirm:n[4]||(n[4]=(...e)=>i.onConfirm&&i.onConfirm(...e)),onKeyboardheightchange:n[5]||(n[5]=(...e)=>i.onkeyboardheightchange&&i.onkeyboardheightchange(...e))},null,42,["name","value","placeholder","placeholderStyle","disabled","maxlength","focus","autoHeight","cursor-spacing","adjust-position"])):(e.openBlock(),e.createElementBlock("input",{key:2,type:"password"===o.type?"text":o.type,class:"uni-easyinput__content-input",style:e.normalizeStyle(i.inputStyle),name:o.name,value:r.val,password:!r.showPassword&&"password"===o.type,placeholder:o.placeholder,placeholderStyle:o.placeholderStyle,"placeholder-class":"uni-easyinput__placeholder-class",disabled:o.disabled,maxlength:i.inputMaxlength,focus:r.focused,confirmType:o.confirmType,"cursor-spacing":o.cursorSpacing,"adjust-position":o.adjustPosition,onFocus:n[6]||(n[6]=(...e)=>i._Focus&&i._Focus(...e)),onBlur:n[7]||(n[7]=(...e)=>i._Blur&&i._Blur(...e)),onInput:n[8]||(n[8]=(...e)=>i.onInput&&i.onInput(...e)),onConfirm:n[9]||(n[9]=(...e)=>i.onConfirm&&i.onConfirm(...e)),onKeyboardheightchange:n[10]||(n[10]=(...e)=>i.onkeyboardheightchange&&i.onkeyboardheightchange(...e))},null,44,["type","name","value","password","placeholder","placeholderStyle","disabled","maxlength","focus","confirmType","cursor-spacing","adjust-position"])),"password"===o.type&&o.passwordIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[i.isVal?(e.openBlock(),e.createBlock(s,{key:0,class:e.normalizeClass(["content-clear-icon",{"is-textarea-icon":"textarea"===o.type}]),type:r.showPassword?"eye-slash-filled":"eye-filled",size:22,color:r.focusShow?o.primaryColor:"#c0c4cc",onClick:i.onEyes},null,8,["class","type","color","onClick"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.suffixIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[o.suffixIcon?(e.openBlock(),e.createBlock(s,{key:0,class:"content-clear-icon",type:o.suffixIcon,color:"#c0c4cc",onClick:n[11]||(n[11]=e=>i.onClickIcon("suffix")),size:"22"},null,8,["type"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[o.clearable&&i.isVal&&!o.disabled&&"textarea"!==o.type?(e.openBlock(),e.createBlock(s,{key:0,class:e.normalizeClass(["content-clear-icon",{"is-textarea-icon":"textarea"===o.type}]),type:"clear",size:o.clearSize,color:i.msg?"#dd524d":r.focusShow?o.primaryColor:"#c0c4cc",onClick:i.onClear},null,8,["class","size","color","onClick"])):e.createCommentVNode("",!0)],64)),e.renderSlot(t.$slots,"right",{},void 0,!0)],6)],6)}],["__scopeId","data-v-6b6616b6"]]),Kc=Gn(e.defineComponent({__name:"codeLogin",emits:["codeLogin"],setup(t,{emit:n}){const o=e.ref(""),a=e.ref(""),r=n;async function i(){if(!qn.state.serveInfo.isAgreement){let e=null;return qn.commit("serveInfo/setIsAgreementIf",!1),clearTimeout(e),e=setTimeout(()=>{qn.commit("serveInfo/setIsAgreementIf",!0)},200),!1}if(!/^(?:(?:\+|00)86)?1\d{10}$/.test(o.value)&&"91112345678"!=o.value)return V("手机号不规范");if(a.value.length<6)return V("验证码不规范");let e={authSecret:a.value,authType:"mobile",authID:o.value},t=await Wt(e);0==t.code?r("codeLogin",t.data):(k("log","at subPages/login/codeLogin/codeLogin.vue:86","ZSW-res",t),-1==t.desc.indexOf("row")?uni.jxAlert({title:"提示",content:`登录失败:${t.desc||t.data}`}):uni.jxAlert({title:"提示",content:"登录失败:对不起该账号未绑定门店,请联系官方客服进行绑定!"}))}const s=e.ref("发送验证码");function l(){if(!/^(?:(?:\+|00)86)?1\d{10}$/.test(o.value)&&"91112345678"!=o.value)return V("手机号不规范");u()}let c=null;const u=Bt({time:6e4,success:async()=>{const e={authToken:"85e60d6a-f1f8-4837-9c7d-d7072b0ba1c6",authID:o.value};if(0==(await Xt(e)).code){V("验证码发送成功");let e=60;c=setInterval(()=>{s.value=e--+"秒后重发",e<=0&&(s.value="重新发送",e=60,clearInterval(c))},1e3)}else V("发送失败",2)}});return(t,n)=>{const r=w(e.resolveDynamicComponent("uni-easyinput"),Xc);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"code-from-root"},[e.createVNode(zc,null,{left:e.withCtx(()=>[e.createVNode(Yn,{icon:"shoujihao",color:"#aaa",size:36})]),middle:e.withCtx(()=>[e.createVNode(r,{primaryColor:"#aaa",class:"input",inputBorder:!1,type:"number",modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),placeholder:"请输入手机号"},null,8,["modelValue"])]),_:1})]),e.createElementVNode("view",{class:"code-from-root"},[e.createVNode(zc,null,{left:e.withCtx(()=>[e.createVNode(Yn,{icon:"yanzhengma2",color:"#aaa"})]),middle:e.withCtx(()=>[e.createVNode(r,{primaryColor:"#aaa",class:"input",inputBorder:!1,maxlength:"6",type:"number",modelValue:a.value,"onUpdate:modelValue":n[1]||(n[1]=e=>a.value=e),placeholder:"请输入验证码"},null,8,["modelValue"])]),right:e.withCtx(()=>[e.createElementVNode("text",{class:"send-code",onClick:l},e.toDisplayString(s.value),1)]),_:1})]),e.createElementVNode("view",{class:"code-login-btn",onClick:i},"登录")],64)}}}),[["__scopeId","data-v-63143ef7"]]);var Yc={exports:{}};
|
||
/**
|
||
* [js-md5]{@link https://github.com/emn178/js-md5}
|
||
*
|
||
* @namespace md5
|
||
* @version 0.8.3
|
||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||
* @copyright Chen, Yi-Cyuan 2014-2023
|
||
* @license MIT
|
||
*/!function(e){!function(){var t="input is invalid type",n="object"==typeof window,o=n?window:{};o.JS_MD5_NO_WINDOW&&(n=!1);var a=!n&&"object"==typeof self,r=!o.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;r?o=B:a&&(o=self);var i,s=!o.JS_MD5_NO_COMMON_JS&&e.exports,l=!o.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,c="0123456789abcdef".split(""),u=[128,32768,8388608,-2147483648],d=[0,8,16,24],m=["hex","array","digest","buffer","arrayBuffer","base64"],p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),f=[];if(l){var h=new ArrayBuffer(68);i=new Uint8Array(h),f=new Uint32Array(h)}var v=Array.isArray;!o.JS_MD5_NO_NODE_JS&&v||(v=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var g=ArrayBuffer.isView;!l||!o.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&g||(g=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e){var n=typeof e;if("string"===n)return[e,!0];if("object"!==n||null===e)throw new Error(t);if(l&&e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(!v(e)&&!g(e))throw new Error(t);return[e,!1]},k=function(e){return function(t){return new x(!0).update(t)[e]()}},w=function(e){var n,a=j,r=j.Buffer;n=r.from&&!o.JS_MD5_NO_BUFFER_FROM?r.from:function(e){return new r(e)};return function(o){if("string"==typeof o)return a.createHash("md5").update(o,"utf8").digest("hex");if(null==o)throw new Error(t);return o.constructor===ArrayBuffer&&(o=new Uint8Array(o)),v(o)||g(o)||o.constructor===r?a.createHash("md5").update(n(o)).digest("hex"):e(o)}},b=function(e){return function(t,n){return new S(t,!0).update(n)[e]()}};function x(e){if(e)f[0]=f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0,this.blocks=f,this.buffer8=i;else if(l){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function S(e,t){var n,o=y(e);if(e=o[0],o[1]){var a,r=[],i=e.length,s=0;for(n=0;n<i;++n)(a=e.charCodeAt(n))<128?r[s++]=a:a<2048?(r[s++]=192|a>>>6,r[s++]=128|63&a):a<55296||a>=57344?(r[s++]=224|a>>>12,r[s++]=128|a>>>6&63,r[s++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++n)),r[s++]=240|a>>>18,r[s++]=128|a>>>12&63,r[s++]=128|a>>>6&63,r[s++]=128|63&a);e=r}e.length>64&&(e=new x(!0).update(e).array());var l=[],c=[];for(n=0;n<64;++n){var u=e[n]||0;l[n]=92^u,c[n]=54^u}x.call(this,t),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=t}x.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t=y(e);e=t[0];for(var n,o,a=t[1],r=0,i=e.length,s=this.blocks,c=this.buffer8;r<i;){if(this.hashed&&(this.hashed=!1,s[0]=s[16],s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),a)if(l)for(o=this.start;r<i&&o<64;++r)(n=e.charCodeAt(r))<128?c[o++]=n:n<2048?(c[o++]=192|n>>>6,c[o++]=128|63&n):n<55296||n>=57344?(c[o++]=224|n>>>12,c[o++]=128|n>>>6&63,c[o++]=128|63&n):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++r)),c[o++]=240|n>>>18,c[o++]=128|n>>>12&63,c[o++]=128|n>>>6&63,c[o++]=128|63&n);else for(o=this.start;r<i&&o<64;++r)(n=e.charCodeAt(r))<128?s[o>>>2]|=n<<d[3&o++]:n<2048?(s[o>>>2]|=(192|n>>>6)<<d[3&o++],s[o>>>2]|=(128|63&n)<<d[3&o++]):n<55296||n>=57344?(s[o>>>2]|=(224|n>>>12)<<d[3&o++],s[o>>>2]|=(128|n>>>6&63)<<d[3&o++],s[o>>>2]|=(128|63&n)<<d[3&o++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++r)),s[o>>>2]|=(240|n>>>18)<<d[3&o++],s[o>>>2]|=(128|n>>>12&63)<<d[3&o++],s[o>>>2]|=(128|n>>>6&63)<<d[3&o++],s[o>>>2]|=(128|63&n)<<d[3&o++]);else if(l)for(o=this.start;r<i&&o<64;++r)c[o++]=e[r];else for(o=this.start;r<i&&o<64;++r)s[o>>>2]|=e[r]<<d[3&o++];this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>>2]|=u[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},x.prototype.hash=function(){var e,t,n,o,a,r,i=this.blocks;this.first?t=((t=((e=((e=i[0]-680876937)<<7|e>>>25)-271733879|0)^(n=((n=(-271733879^(o=((o=(-1732584194^2004318071&e)+i[1]-117830708)<<12|o>>>20)+e|0)&(-271733879^e))+i[2]-1126478375)<<17|n>>>15)+o|0)&(o^e))+i[3]-1316259209)<<22|t>>>10)+n|0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((o=this.h3)^t&(n^o))+i[0]-680876936)<<7|e>>>25)+t|0)^(n=((n+=(t^(o=((o+=(n^e&(t^n))+i[1]-389564586)<<12|o>>>20)+e|0)&(e^t))+i[2]+606105819)<<17|n>>>15)+o|0)&(o^e))+i[3]-1044525330)<<22|t>>>10)+n|0),t=((t+=((e=((e+=(o^t&(n^o))+i[4]-176418897)<<7|e>>>25)+t|0)^(n=((n+=(t^(o=((o+=(n^e&(t^n))+i[5]+1200080426)<<12|o>>>20)+e|0)&(e^t))+i[6]-1473231341)<<17|n>>>15)+o|0)&(o^e))+i[7]-45705983)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(o^t&(n^o))+i[8]+1770035416)<<7|e>>>25)+t|0)^(n=((n+=(t^(o=((o+=(n^e&(t^n))+i[9]-1958414417)<<12|o>>>20)+e|0)&(e^t))+i[10]-42063)<<17|n>>>15)+o|0)&(o^e))+i[11]-1990404162)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(o^t&(n^o))+i[12]+1804603682)<<7|e>>>25)+t|0)^(n=((n+=(t^(o=((o+=(n^e&(t^n))+i[13]-40341101)<<12|o>>>20)+e|0)&(e^t))+i[14]-1502002290)<<17|n>>>15)+o|0)&(o^e))+i[15]+1236535329)<<22|t>>>10)+n|0,t=((t+=((o=((o+=(t^n&((e=((e+=(n^o&(t^n))+i[1]-165796510)<<5|e>>>27)+t|0)^t))+i[6]-1069501632)<<9|o>>>23)+e|0)^e&((n=((n+=(e^t&(o^e))+i[11]+643717713)<<14|n>>>18)+o|0)^o))+i[0]-373897302)<<20|t>>>12)+n|0,t=((t+=((o=((o+=(t^n&((e=((e+=(n^o&(t^n))+i[5]-701558691)<<5|e>>>27)+t|0)^t))+i[10]+38016083)<<9|o>>>23)+e|0)^e&((n=((n+=(e^t&(o^e))+i[15]-660478335)<<14|n>>>18)+o|0)^o))+i[4]-405537848)<<20|t>>>12)+n|0,t=((t+=((o=((o+=(t^n&((e=((e+=(n^o&(t^n))+i[9]+568446438)<<5|e>>>27)+t|0)^t))+i[14]-1019803690)<<9|o>>>23)+e|0)^e&((n=((n+=(e^t&(o^e))+i[3]-187363961)<<14|n>>>18)+o|0)^o))+i[8]+1163531501)<<20|t>>>12)+n|0,t=((t+=((o=((o+=(t^n&((e=((e+=(n^o&(t^n))+i[13]-1444681467)<<5|e>>>27)+t|0)^t))+i[2]-51403784)<<9|o>>>23)+e|0)^e&((n=((n+=(e^t&(o^e))+i[7]+1735328473)<<14|n>>>18)+o|0)^o))+i[12]-1926607734)<<20|t>>>12)+n|0,t=((t+=((r=(o=((o+=((a=t^n)^(e=((e+=(a^o)+i[5]-378558)<<4|e>>>28)+t|0))+i[8]-2022574463)<<11|o>>>21)+e|0)^e)^(n=((n+=(r^t)+i[11]+1839030562)<<16|n>>>16)+o|0))+i[14]-35309556)<<23|t>>>9)+n|0,t=((t+=((r=(o=((o+=((a=t^n)^(e=((e+=(a^o)+i[1]-1530992060)<<4|e>>>28)+t|0))+i[4]+1272893353)<<11|o>>>21)+e|0)^e)^(n=((n+=(r^t)+i[7]-155497632)<<16|n>>>16)+o|0))+i[10]-1094730640)<<23|t>>>9)+n|0,t=((t+=((r=(o=((o+=((a=t^n)^(e=((e+=(a^o)+i[13]+681279174)<<4|e>>>28)+t|0))+i[0]-358537222)<<11|o>>>21)+e|0)^e)^(n=((n+=(r^t)+i[3]-722521979)<<16|n>>>16)+o|0))+i[6]+76029189)<<23|t>>>9)+n|0,t=((t+=((r=(o=((o+=((a=t^n)^(e=((e+=(a^o)+i[9]-640364487)<<4|e>>>28)+t|0))+i[12]-421815835)<<11|o>>>21)+e|0)^e)^(n=((n+=(r^t)+i[15]+530742520)<<16|n>>>16)+o|0))+i[2]-995338651)<<23|t>>>9)+n|0,t=((t+=((o=((o+=(t^((e=((e+=(n^(t|~o))+i[0]-198630844)<<6|e>>>26)+t|0)|~n))+i[7]+1126891415)<<10|o>>>22)+e|0)^((n=((n+=(e^(o|~t))+i[14]-1416354905)<<15|n>>>17)+o|0)|~e))+i[5]-57434055)<<21|t>>>11)+n|0,t=((t+=((o=((o+=(t^((e=((e+=(n^(t|~o))+i[12]+1700485571)<<6|e>>>26)+t|0)|~n))+i[3]-1894986606)<<10|o>>>22)+e|0)^((n=((n+=(e^(o|~t))+i[10]-1051523)<<15|n>>>17)+o|0)|~e))+i[1]-2054922799)<<21|t>>>11)+n|0,t=((t+=((o=((o+=(t^((e=((e+=(n^(t|~o))+i[8]+1873313359)<<6|e>>>26)+t|0)|~n))+i[15]-30611744)<<10|o>>>22)+e|0)^((n=((n+=(e^(o|~t))+i[6]-1560198380)<<15|n>>>17)+o|0)|~e))+i[13]+1309151649)<<21|t>>>11)+n|0,t=((t+=((o=((o+=(t^((e=((e+=(n^(t|~o))+i[4]-145523070)<<6|e>>>26)+t|0)|~n))+i[11]-1120210379)<<10|o>>>22)+e|0)^((n=((n+=(e^(o|~t))+i[2]+718787259)<<15|n>>>17)+o|0)|~e))+i[9]-343485551)<<21|t>>>11)+n|0,this.first?(this.h0=e+1732584193|0,this.h1=t-271733879|0,this.h2=n-1732584194|0,this.h3=o+271733878|0,this.first=!1):(this.h0=this.h0+e|0,this.h1=this.h1+t|0,this.h2=this.h2+n|0,this.h3=this.h3+o|0)},x.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,o=this.h3;return c[e>>>4&15]+c[15&e]+c[e>>>12&15]+c[e>>>8&15]+c[e>>>20&15]+c[e>>>16&15]+c[e>>>28&15]+c[e>>>24&15]+c[t>>>4&15]+c[15&t]+c[t>>>12&15]+c[t>>>8&15]+c[t>>>20&15]+c[t>>>16&15]+c[t>>>28&15]+c[t>>>24&15]+c[n>>>4&15]+c[15&n]+c[n>>>12&15]+c[n>>>8&15]+c[n>>>20&15]+c[n>>>16&15]+c[n>>>28&15]+c[n>>>24&15]+c[o>>>4&15]+c[15&o]+c[o>>>12&15]+c[o>>>8&15]+c[o>>>20&15]+c[o>>>16&15]+c[o>>>28&15]+c[o>>>24&15]},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,o=this.h3;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&n,n>>>8&255,n>>>16&255,n>>>24&255,255&o,o>>>8&255,o>>>16&255,o>>>24&255]},x.prototype.array=x.prototype.digest,x.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.base64=function(){for(var e,t,n,o="",a=this.array(),r=0;r<15;)e=a[r++],t=a[r++],n=a[r++],o+=p[e>>>2]+p[63&(e<<4|t>>>4)]+p[63&(t<<2|n>>>6)]+p[63&n];return e=a[r],o+=p[e>>>2]+p[e<<4&63]+"=="},S.prototype=new x,S.prototype.finalize=function(){if(x.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();x.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(e),x.prototype.finalize.call(this)}};var N=function(){var e=k("hex");r&&(e=w(e)),e.create=function(){return new x},e.update=function(t){return e.create().update(t)};for(var t=0;t<m.length;++t){var n=m[t];e[n]=k(n)}return e}();N.md5=N,N.md5.hmac=function(){var e=b("hex");e.create=function(e){return new S(e)},e.update=function(t,n){return e.create(t).update(n)};for(var t=0;t<m.length;++t){var n=m[t];e[n]=b(n)}return e}(),s?e.exports=N:o.md5=N}()}(Yc);const Zc=T(Yc.exports),Qc=Gn(e.defineComponent({__name:"paswordLogin",emits:["pwdLogin"],setup(t,{emit:n}){const o=e.ref(""),a=e.ref(""),r=n;async function i(){if(!qn.state.serveInfo.isAgreement){let e=null;return qn.commit("serveInfo/setIsAgreementIf",!1),clearTimeout(e),e=setTimeout(()=>{qn.commit("serveInfo/setIsAgreementIf",!0)},200),!1}if(""==o.value)return V("用户名不规范");if(a.value.length<4)return V("密码不规范");let e={authType:"localpass",authIDType:"userID2",authID:o.value,authSecret:Zc(a.value)},t=await Wt(e);0==t.code?r("pwdLogin",t.data):V(t.desc)}return(t,n)=>{const r=w(e.resolveDynamicComponent("uni-easyinput"),Xc);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"pwd-from-root"},[e.createVNode(zc,null,{left:e.withCtx(()=>[e.createVNode(Yn,{icon:"shoujihao",color:"#aaa",size:36})]),middle:e.withCtx(()=>[e.createVNode(r,{primaryColor:"#aaa",inputBorder:!1,class:"input",type:"text",modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),placeholder:"请输入用户名"},null,8,["modelValue"])]),_:1})]),e.createElementVNode("view",{class:"pwd-from-root"},[e.createVNode(zc,null,{left:e.withCtx(()=>[e.createVNode(Yn,{icon:"mima",color:"#aaa"})]),middle:e.withCtx(()=>[e.createVNode(r,{primaryColor:"#aaa",inputBorder:!1,class:"input",type:"password",modelValue:a.value,"onUpdate:modelValue":n[1]||(n[1]=e=>a.value=e),placeholder:"请输入密码"},null,8,["modelValue"])]),_:1})]),e.createElementVNode("view",{class:"pwd-login-btn",onClick:i},"登录")],64)}}}),[["__scopeId","data-v-aae3edc0"]]);const eu=e.defineComponent({__name:"index",setup(t){const{loginTypeList:n,activeItem:o,codeLogin:a,pwdLogin:r,user:i,privacy:s,change:l,log:c,switchTerrace:u,navTitle:d,agreement:m,isAgreement:p}=function(){const t=e.ref("https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png"),n=e.ref("京西菜市商家");x(()=>{k("log","at subPages/login/weixin.ts:20","系统类型",f("terrace")),"jxcs"==f("terrace")?(t.value="https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png",n.value="京西菜市商家"):"jxgy"==f("terrace")?(t.value="https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg",n.value="京西果园商家"):(t.value="https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg",n.value="京西到家商家"),plus.push.getClientInfoAsync(e=>{let t=e.clientid;h("cid",t)},()=>{})});const{setUserInfo:o}=tn(),a=e.ref([{title:"验证码登录"},{title:"密码登录"}]),r=e.ref(0);async function i(){let e=await Zt();0==e.code?h("userType",e.data.type):h("userType",0)}let s=null;const l=e.ref(!1);return e.onBeforeUnmount(()=>{qn.commit("serveInfo/setIsAgreement",!1)}),{loginTypeList:a,activeItem:r,codeLogin:function(e){o(e),i()},pwdLogin:function(e){o(e),i()},user:function(){uni.navigateTo({url:"/subPages/agreement/jxcs?url=https://www.jxc4.com/managerApp/service.html"})},privacy:function(){uni.navigateTo({url:"/subPages/agreement/jxcs?url=https://www.jxc4.com/managerApp/privacy.html"})},change:function(e){r.value=e.detail.current},log:t,switchTerrace:function(){uni.showActionSheet({title:"请选择使用平台",itemColor:"#5ab83e",itemList:["京西菜市商家","京西果园商家","京西到家商家"],popover:{width:5e3},success:function(e){uni.showLoading({title:"正在切换系统"}),s=setTimeout(()=>{0==e.tapIndex&&(h("terrace","jxcs"),t.value="https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png",n.value="京西菜市商家"),1==e.tapIndex&&(h("terrace","jxgy"),t.value="https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg",n.value="京西果园商家"),2==e.tapIndex&&(h("terrace","gblm"),t.value="https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg",n.value="京西到家商家"),uni.hideLoading(),V("切换成功",1),clearTimeout(s)},500)},fail:()=>{k("log","at subPages/login/weixin.ts:148","取消切换系统")}})},navTitle:n,agreement:function(e){e.detail.value.length?(l.value=!0,qn.commit("serveInfo/setIsAgreement",!0),qn.commit("serveInfo/setIsAgreementIf",!1)):(qn.commit("serveInfo/setIsAgreement",!1),l.value=!1)},isAgreement:l}}();return(t,f)=>{const h=w(e.resolveDynamicComponent("uni-nav-bar"),Wc),v=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"status_bar"}),e.createVNode(h,{border:!1,title:e.unref(d),rightWidth:"200rpx"},{right:e.withCtx(()=>[e.createElementVNode("view",{onClick:f[0]||(f[0]=(...t)=>e.unref(u)&&e.unref(u)(...t)),class:"switchTerrace"},[e.createVNode(Yn,{icon:"qiehuan",color:"#2dd091"}),e.createElementVNode("text",{style:{color:"#2dd091"}}," 切换平台")])]),_:1},8,["title"]),e.createElementVNode("view",{class:"phone-login-root"},[e.createElementVNode("view",{class:"top-mask"}),e.createElementVNode("view",{class:"img"},[e.createElementVNode("image",{onClick:f[1]||(f[1]=(...t)=>e.unref(u)&&e.unref(u)(...t)),src:e.unref(c),mode:"scaleToFill"},null,8,["src"])]),e.createElementVNode("view",{class:"center-root"},[e.createElementVNode("view",{class:"tab-root"},[e.createElementVNode("text",{class:"icon"},"|"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),(t,n)=>(e.openBlock(),e.createElementBlock("text",{class:e.normalizeClass(["tab-item",{active:n==e.unref(o)}]),key:n,onClick:e=>o.value=n},e.toDisplayString(t.title),11,["onClick"]))),128))]),e.createElementVNode("swiper",{duration:200,class:"swiper",onChange:f[2]||(f[2]=(...t)=>e.unref(l)&&e.unref(l)(...t)),current:e.unref(o)},[e.createElementVNode("swiper-item",null,[e.createElementVNode("view",{class:"form-root"},[e.createVNode(Kc,{onCodeLogin:e.unref(a)},null,8,["onCodeLogin"])])]),e.createElementVNode("swiper-item",null,[e.createElementVNode("view",{class:"form-root"},[e.createVNode(Qc,{onPwdLogin:e.unref(r)},null,8,["onPwdLogin"])])])],40,["current"]),e.createElementVNode("view",{class:"copyright-root"},[e.createElementVNode("view",{class:e.normalizeClass(["center",{"center-active":e.unref(qn).state.serveInfo.isAgreementIf}])},[e.createElementVNode("label",null,[e.createElementVNode("checkbox-group",{onChange:f[3]||(f[3]=(...t)=>e.unref(m)&&e.unref(m)(...t))},[e.createElementVNode("checkbox",{checked:e.unref(p),value:"cb",color:"#2dd091",style:{transform:"scale(0.7)","border-radius":"50%"}},null,8,["checked"]),e.createTextVNode("我已阅读并同意 ")],32)]),e.createElementVNode("text",{class:"text",onClick:f[4]||(f[4]=(...t)=>e.unref(i)&&e.unref(i)(...t))},"《用户协议》"),e.createElementVNode("text",{class:"text",onClick:f[5]||(f[5]=(...t)=>e.unref(s)&&e.unref(s)(...t))},"《隐私协议》"),e.createElementVNode("view",{class:e.normalizeClass(["lab",{"lab-active":e.unref(qn).state.serveInfo.isAgreementIf}])},"请勾选同意后在进行登录",2)],2)])]),e.createElementVNode("view",{class:"info"},"欢迎进入京西菜市")]),e.createVNode(v)],64)}}}),tu=Gn(eu,[["__scopeId","data-v-679494c5"]]),nu={data:()=>({getOpenIDUrl:""}),onLoad(e){let t,{mobile:n}=e,o="https://wx.jxc4.com",a=`${o}/v2/auth2/WeixinMPOAuth2`,r=`${o}/authorize`;t=n?encodeURI(a+"?block="+r+"?mobile="+n):encodeURI(a+"?block="+r),this.getOpenIDUrl=`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2bb99eb5d2c9b82c&redirect_uri=${t}&response_type=code&scope=snsapi_userinfo#wechat_redirect`}};const ou=Gn(nu,[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("web-view",{src:r.getOpenIDUrl},null,8,["src"])])}]]),{setUserInfo:au,appWxLogin:ru}=tn();const iu=Gn({setup(){const t=e.ref("https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png"),n=e.ref("京西菜市商家");x(()=>{uni.getProvider({service:"share",success:function(e){o.value="weixin"==e.provider[0]}}),"jxcs"==f("terrace")?(t.value="https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png",n.value="京西菜市商家"):"jxgy"==f("terrace")?(t.value="https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg",n.value="京西果园商家"):(t.value="https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg",n.value="京西到家商家"),plus.push.getClientInfoAsync(e=>{let t=e.clientid;h("cid",t)},()=>{})});const o=e.ref(!1);const a=e.ref(null);let r=null;return{phoneLogin:function(){uni.navigateTo({url:"/subPages/login/index"})},user:function(){uni.navigateTo({url:"/subPages/agreement/jxcs?url=https://www.jxc4.com/managerApp/service.html"})},privacy:function(){uni.navigateTo({url:"/subPages/agreement/jxcs?url=https://www.jxc4.com/managerApp/privacy.html"})},wxPopup:a,appWxLoginFn:function(){ru({bangding:e=>{qn.commit("storeInfo/jxLoadingFn",!0),uni.navigateTo({url:`/subPages/login/addAuth/addAuth?authToken=${e}`})},success:e=>{au(e),async function(){let e=await Zt();h("userType",0==e.code?e.data.type:0)}()}}),a.value.close()},switchTerrace:function(){uni.showActionSheet({title:"请选择使用平台",itemColor:"#5ab83e",itemList:["京西菜市商家","京西果园商家","京西到家商家"],popover:{width:5e3},success:function(e){uni.showLoading({title:"正在切换系统"}),r=setTimeout(()=>{0==e.tapIndex&&(h("terrace","jxcs"),t.value="https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png",n.value="京西菜市商家"),1==e.tapIndex&&(h("terrace","jxgy"),t.value="https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg",n.value="京西果园商家"),2==e.tapIndex&&(h("terrace","gblm"),t.value="https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg",n.value="京西到家商家"),uni.hideLoading(),V("切换成功",1),clearTimeout(r)},500)},fail:()=>{k("log","at subPages/login/wxLogin/wxLogin.ts:145","ZSW-取消")}})},log:t,navTitle:n,isWx:o,getStorage:f}}},[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("jx-icon"),Yn),l=w(e.resolveDynamicComponent("uni-nav-bar"),Wc),c=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"status_bar"}),e.createVNode(l,{border:!1,title:t.navTitle,rightWidth:"200rpx",style:{padding:"10rpx 0"}},{right:e.withCtx(()=>[e.createElementVNode("view",{onClick:n[0]||(n[0]=(...e)=>t.switchTerrace&&t.switchTerrace(...e)),class:"switchTerrace"},[e.createVNode(s,{icon:"qiehuan",color:"#2dd091"}),e.createElementVNode("text",{style:{color:"#2dd091","font-size":"4vw"}}," 切换平台")])]),_:1},8,["title"]),e.createElementVNode("view",{class:"logo"},[e.createElementVNode("image",{onClick:n[1]||(n[1]=(...e)=>t.switchTerrace&&t.switchTerrace(...e)),src:t.log,mode:"scaleToFill"},null,8,["src"])]),e.createElementVNode("view",{class:"login"},[t.isWx&&"jxcs"==t.getStorage("terrace")?(e.openBlock(),e.createElementBlock("view",{key:0,class:"btn",onClick:n[2]||(n[2]=e=>t.wxPopup.open())},[e.createVNode(s,{icon:"weixin",color:"#fff",size:50}),e.createElementVNode("text",null,"微信登录"),e.createElementVNode("image",{src:"https://image.jxc4.com/image/64ff764213150d4c8929c4d554fbaccf.png",mode:"widthFix"})])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"btn phone",onClick:n[3]||(n[3]=(...e)=>t.phoneLogin&&t.phoneLogin(...e))},[e.createVNode(s,{icon:"shoujihao",color:"#fff",size:50}),e.createElementVNode("text",null,"账号登录"),"jxgy"==t.getStorage("terrace")?(e.openBlock(),e.createElementBlock("image",{key:0,src:"https://image.jxc4.com/image/64ff764213150d4c8929c4d554fbaccf.png",mode:"widthFix"})):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"info"},"欢迎进入京西菜市"),e.createVNode(c,{ref:"wxPopup",type:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"wxPopup-root"},[e.createElementVNode("view",{class:"text"},[e.createElementVNode("view",{class:"agreement-title"},"用户协议及隐私协议"),e.createElementVNode("view",{class:"content"}," 本协议系您与成都若溪科技有限公司就京西菜市帐号的注册和使用而订立的。成都若溪科技有限公司(如下简称“京西菜市”)在此特别提醒您认真阅读、充分理解本协议各条款,特别是涉及服务费用条款,免除或者限制京西菜市责任的条款,对您的权利限制条款,争议解决和法律适用条款等,此类条款将以加粗的形式提示您注意。请您审慎阅读并选择接受或不接受本协议(限制民事行为能力人应在监护人或法定代理人陪同下阅读)。除非您接受本协议所有条款,否则您无权注册、使用京西菜市帐号。您的注册和使用京西菜市帐号行为将视为您已充分理解本协议(即本协议及后续更新版本或开通或使用某项服务的单项协议),并同意接受本协议各项条款的约束。 "),e.createElementVNode("view",{class:"agreement"},[e.createTextVNode(" 点击同意即代表您已阅读并同意 "),e.createElementVNode("text",{class:"text",onClick:n[4]||(n[4]=(...e)=>t.user&&t.user(...e))},"《用户协议》"),e.createElementVNode("text",{class:"text",onClick:n[5]||(n[5]=(...e)=>t.privacy&&t.privacy(...e))},"《隐私协议》")])]),e.createElementVNode("view",{class:"btn"},[e.createElementVNode("view",{class:"reject",onClick:n[6]||(n[6]=e=>t.wxPopup.close())},"拒绝"),e.createElementVNode("button",{class:"resolve",onClick:n[7]||(n[7]=(...e)=>t.appWxLoginFn&&t.appWxLoginFn(...e))},"同意")])])]),_:1},512)],64)}],["__scopeId","data-v-b74c7ef9"]]),su=e.defineComponent({__name:"jxcs",setup(t){const n=e.ref("");return C(e=>{n.value=e.url}),(t,o)=>(e.openBlock(),e.createElementBlock("web-view",{src:n.value},null,8,["src"]))}}),lu=Gn(e.defineComponent({__name:"updateVersion",setup(t){x(()=>{s(2)});const{watchVersion:n}=tn(),o=e.ref(uni.getSystemInfoSync().appVersion),a=e.computed(()=>{let e=uni.getSystemInfoSync().brand;return"huawei"!=e&&"honor"!=e}),r=e.ref(!1),i=e.ref({});function s(e){n((t,n)=>{i.value=n,t?1==e?uni.globalAlert({data:{type:3}}):r.value=!0:(r.value=!1,1==e&&V("已经是最新版"))})}function l(){uni.navigateTo({url:"/subPages/agreement/jxcs?url=https://www.jxc4.com/managerApp/about.html"})}const c=e.ref(null),u=e.ref(0),d=e.ref(null),m=e.ref(!1),{copyInfo:p}=aa();function h(){u.value++,5===u.value?(k("log","at subPages/agreement/updateVersion.vue:120","连续点击了5次!"),m.value=!0,u.value=0,clearTimeout(d.value)):d.value=setTimeout(()=>{u.value=0,clearTimeout(d.value)},3e3)}return(t,n)=>{const u=w(e.resolveDynamicComponent("jx-icon"),Yn),d=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"update-version-root"},[e.createElementVNode("image",{class:"img",src:"https://image.jxc4.com/image/70143fcf48aefe74537533f35a0a8153.jpg",mode:"scaleToFill"}),e.createElementVNode("view",{class:"name"},"京西菜市门店管理"),e.withDirectives(e.createElementVNode("view",{class:"cid-number",onClick:n[0]||(n[0]=e.withModifiers(t=>e.unref(p)(e.unref(f)("cid"),"CID复制成功"),["stop"]))},[e.createElementVNode("text",{class:"cid"},"cid:"+e.toDisplayString(e.unref(f)("cid")),1),e.createElementVNode("text",{class:"copy"},"复制")],512),[[e.vShow,m.value]]),e.createElementVNode("view",{class:"center-root"},[e.createElementVNode("view",{class:"version-text",onClick:l},[e.createElementVNode("text",null,"关于京西"),e.createVNode(u,{icon:"gengduo",color:"rgb(220, 220, 220)"})]),e.createElementVNode("view",{class:"version",onClick:h},[e.createElementVNode("text",null,"当前版本"),e.createElementVNode("text",{class:"version-num"},"𝑽 "+e.toDisplayString(o.value),1)]),e.createElementVNode("view",{class:"version-text",onClick:n[1]||(n[1]=e=>c.value.open())},[e.createElementVNode("text",null,"版本说明"),e.createVNode(u,{icon:"gengduo",color:"rgb(220, 220, 220)"})]),a.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"version-text",onClick:n[2]||(n[2]=e=>s(1))},[e.createElementVNode("text",null,"检查更新"),e.createElementVNode("view",null,[e.createVNode(u,{icon:"gengduo",color:"rgb(220, 220, 220)"}),r.value?(e.openBlock(),e.createElementBlock("text",{key:0,class:"newVarsion"},"新")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])]),e.createVNode(d,{type:"center",ref_key:"popup",ref:c},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"version-info-root"},[e.createElementVNode("view",{class:"title"},"版本说明V"+e.toDisplayString(o.value),1),e.createElementVNode("text",{class:"text"},e.toDisplayString(i.value.description),1),e.createElementVNode("view",{class:"btn",onClick:n[3]||(n[3]=e=>c.value.close())},"确定")])]),_:1},512)],64)}}}),[["__scopeId","data-v-dec638f9"]]),cu=Nt;function uu(){const{logOutFn:t}=tn();C(async()=>{await function(){l.value.push("全部");for(let e in cu.storeStatus)l.value.push(cu.storeStatus[e])}(),await a()});let n=null;E(()=>{clearTimeout(n),n=setTimeout(async()=>{uni.stopPullDownRefresh(),await a()},1e3)});const o=e.ref();async function a(){let e=await Kt({version:"1.3.5"});if(0==e.code){let n=e.data||[];n.length>0?(o.value=n,s.value=n):uni.jxAlert({title:"提示",content:"您还没有绑定门店,请联系运营!",success:()=>{t(),uni.reLaunch({url:"/subPages/login/wxLogin/wxLogin"})}})}else o.value=[],V("获取门店信息失败"),uni.jxAlert({title:"警告",content:"获取门店信息失败,重新登录试试!",success:()=>{t(),uni.reLaunch({url:"/subPages/login/wxLogin/wxLogin"})}})}const r=e.ref("0");const i=e.ref(""),s=e.ref();const l=e.ref([]);return e.onBeforeUnmount(()=>{clearTimeout(n)}),{filterStoreDataList:s,switchStore:function(e,t){uni.jxConfirm({title:"提示",content:`是否进入【${t}】`,success:()=>{h("storeID",e),h("storeName",t),uni.switchTab({url:"/pages/merchant/index"})}})},status:r,changeStatus:function(e){var t,n,s,l;i.value="",r.value=e.detail.value,0==e.detail.value&&a(),1==e.detail.value&&(o.value=null==(t=o.value)?void 0:t.filter(e=>"0"==e.status)),2==e.detail.value&&(a(),o.value=null==(n=o.value)?void 0:n.filter(e=>"1"==e.status)),3==e.detail.value&&(o.value=null==(s=o.value)?void 0:s.filter(e=>"-1"==e.status)),4==e.detail.value&&(o.value=null==(l=o.value)?void 0:l.filter(e=>"-2"==e.status))},keyword:i,searchStore:function(e){var t;if(""==e)return r.value="0",a();s.value=null==(t=o.value)?void 0:t.filter(t=>{if(JSON.stringify(t).indexOf(e)>-1)return!0})},clearInput:function(){i.value="",r.value="0",a()},pickerDataList:l}}const du=Gn(e.defineComponent({__name:"switchStore",setup(t){const{filterStoreDataList:n,switchStore:o,status:a,changeStatus:r,keyword:i,searchStore:s,clearInput:l,pickerDataList:c}=uu();return(t,u)=>{var d;const m=w(e.resolveDynamicComponent("uni-search-bar"),za),p=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock("view",{style:{"background-color":"#fff"}},[e.createElementVNode("view",{class:"fillert-search-root"},[e.createElementVNode("picker",{onChange:u[0]||(u[0]=(...t)=>e.unref(r)&&e.unref(r)(...t)),value:e.unref(a),range:e.unref(c)},[e.createElementVNode("view",{class:"fillter-btn"},e.toDisplayString(e.unref(c)[+e.unref(a)]),1)],40,["value","range"]),e.createElementVNode("view",{class:"search-root"},[e.createVNode(m,{modelValue:e.unref(i),"onUpdate:modelValue":u[1]||(u[1]=t=>e.isRef(i)?i.value=t:null),onConfirm:u[2]||(u[2]=t=>e.unref(s)(e.unref(i))),onClear:e.unref(l),cancelButton:"none",clearButton:"auto",placeholder:"请输入关键字"},null,8,["modelValue","onClear"])])]),e.createElementVNode("view",{class:"store-item-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:n,onClick:n=>e.unref(o)(t.id,t.name)},[e.createElementVNode("view",{class:"city-name"},[e.createElementVNode("text",{class:"city"},e.toDisplayString(t.cityName),1),e.createElementVNode("text",{class:"name"},e.toDisplayString(t.name),1)]),e.createElementVNode("text",{class:e.normalizeClass(["status",{"status-waring":1!=t.status}])},e.toDisplayString(e.unref(Nt).storeStatus[t.status]),3)],8,["onClick"]))),128)),0===(null==(d=e.unref(n))?void 0:d.length)?(e.openBlock(),e.createBlock(Jn,{key:0,title:"暂无门店信息"})):e.createCommentVNode("",!0)]),e.createVNode(p)])}}}),[["__scopeId","data-v-8a4692f4"]]),mu=Gn(e.defineComponent({__name:"getPhone",setup(t){const{phoneCall:n}=tn(),o=qn.state.storeInfo.allStoreInfo,a=e.ref([{icon:"https://image.jxc4.com/image/dac33b5d4033369aa2149df98371c985.png",company:"京东运营",name:o.operatorName||"暂无",mobild:o.operatorPhone},{icon:"https://image.jxc4.com/image/1dd799ad5f08f5d2a162ea5da147a277.png",company:"美团运营",name:o.operatorName2||"暂无",mobild:o.operatorPhone2},{icon:"https://image.jxc4.com/image/8ac4b05dfef6b18639489d32cd421551.png",company:"饿佰运营",name:o.operatorName3||"暂无",mobild:o.operatorPhone3},{icon:"https://image.jxc4.com/image/92fb99855bc1f68afdac8b0257228b99.png",company:"京西运营",name:"",mobild:o.marketManPhone}]);return(t,o)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"phone-item",key:o},[e.createElementVNode("view",{class:"iocn-company-name"},[e.createElementVNode("image",{src:t.icon,mode:"scaleToFill"},null,8,["src"]),e.createElementVNode("text",{class:"company"},e.toDisplayString(t.company||"暂无")+":",1),e.createElementVNode("text",{class:"name"},e.toDisplayString(t.name),1)]),e.createElementVNode("text",{class:"mobild",onClick:o=>e.unref(n)(t.mobild)},e.toDisplayString(t.mobild),9,["onClick"])]))),128))}}),[["__scopeId","data-v-39466d89"]]);function pu(){const{phoneCall:t,afterSalesDetaile:n}=aa(),o=e.ref(0),a=e.ref(0);C(async e=>{o.value=e.vendorID,a.value=e.vendorOrderID,await async function(e){let t=await ho({vendorOrderID:e});if(0==t.code&&t.data.totalCount){let n=t.data.data[0];f("storeID")!=n.jxStoreID&&(h("storeID",+n.jxStoreID),await qn.dispatch("storeInfo/getOneStore",+n.jxStoreID)),r.value=n.invoiceTitle,i.value=n.invoiceTaxerID,s.value=n,async function(e,t){let n={vendorOrderID:t,vendorID:e.vendorID,refresh:!1},o=await Eo(n);0==o.code?(l.value=o.data,9==o.data.vendorID&&async function(e){let t=await Bo({vendorOrderID:e});0==t.code&&(u.value=t.data)}(o.data.vendorOrderID)):uni.jxAlert({title:"提示",content:"获取订单号信息失败",success:()=>{uni.navigateBack()}})}(n,e)}else uni.jxAlert({title:"提示",content:"获取订单号信息失败",success:()=>{uni.navigateBack()}})}(e.vendorOrderID),await async function(){let e={width:600,height:200,codetype:"bar",srcData:a.value},t=await Vo(e);0==t.code&&(c.value=t.data)}(),await async function(e){let t={vendorOrderID:a.value,vendorID:o.value,orderType:e},n=await To(t);0==n.code&&null!=n.data&&(E.value=n.data)}(2),await async function(){let e={vendorOrderID:a.value},t=await xo(e);0==t.code&&(D.value=t.data.data||[])}(),await P(),await async function(){const e=await Ao({vendorOrderID:s.value.vendorOrderID});0==e.code&&null!=e.data?L.value=!0:L.value=!1}()}),x(()=>{f("reLoadOrderDetail")&&P()});const r=e.ref(""),i=e.ref(""),s=e.ref({vendorID:-99});const l=e.ref({vendorID:-99});const c=e.ref("https://image.jxc4.com/image/34e6c3b22b914d7102c99bebfc95f9dd.png");const u=e.ref(!1);const d=Nt.serveInfo,m=e.computed(()=>""!=s.value.status?d.orderStatus[s.value.status]:"未知");const p=e.ref(0),v=e.ref(!1);const g=e.computed(()=>s.value.vendorOrderID2?s.value.vendorOrderID2.slice(0,s.value.vendorOrderID2.length-4):""),y=e.computed(()=>s.value.vendorOrderID2?s.value.vendorOrderID2.slice(s.value.vendorOrderID2.length-4):""),k=e.computed(()=>s.value.expectedDeliveredTime&&-1===s.value.expectedDeliveredTime.indexOf("1970")?_t(s.value.expectedDeliveredTime):_t()),w=e.computed(()=>!(s.value.buyerComment&&s.value.buyerComment.includes("支付方式"))),b=e.computed(()=>qn.getters["storeInfo/isPointStore"]),S=e.computed(()=>{const{payPercentage:e}=N.value,{totalShopMoney:t,desiredFee:n,shopPrice:o,distanceFreightMoney:a,waybillTipMoney:r}=s.value;let i=0;return i=b.value?t*e/200/100:(t-n-o-a-r)/100,(i<-10||t<0)&&-1==s.value.buyerComment.indexOf("【JD】")}),N=e.computed(()=>qn.state.storeInfo.allStoreInfo),_=e.computed(()=>{const e=l.value.avgPrice||0;return e<=2e3?"超低":e>2e3&&e<=4e3?"较低":e>4e3&&e<=1e4?"中等":e>1e4&&e<=2e4?"较高":e>2e4?"超高":void 0}),E=e.ref([]),I=e.computed(()=>{let e=Nt.serveInfo.waybillStatus,t=[];return E.value.forEach(n=>{if(n.vendorOrderID==s.value.vendorWaybillID){let o={...n,status:e[n.status],statusTime:Ct(n.statusTime)};t.push(o)}}),t});const D=e.ref([]);const B=e.ref([]),T=e.ref(0);async function P(){let e={vendorOrderID:a.value,vendorID:o.value},t=await Po(e);0==t.code&&(B.value=t.data,B.value.forEach(e=>{T.value+=e.count,e.comparePrice=(e.shopPrice/100).toFixed(2),e.earnPrice=(e.earningPrice/100).toFixed(2),e.saleSalePrice=(e.salePrice/100).toFixed(2)}),h("reLoadOrderDetail",!1))}const A=e.computed(()=>0!=s.value.vendorPayPercentage?s.value.vendorPayPercentage<50:!!b.value),O=e.computed(()=>{if(void 0===o.value)return{name:"",mobile:""};const e={0:["operatorName","operatorPhone"],1:["operatorName2","operatorPhone2"],3:["operatorName3","operatorPhone3"],9:["operatorName","operatorPhone"],4:["operatorName","operatorPhone"],5:["operatorName","operatorPhone"],6:["operatorName","operatorPhone"],7:["operatorName","operatorPhone"],8:["operatorName","operatorPhone"],14:["operatorName","operatorPhone"],16:["operatorName","operatorPhone"]};return{name:N.value[e[o.value][0]],mobile:N.value[e[o.value][1]]}}),M=e.computed(()=>{switch(s.value.waybillVendorID){case 0:case 101:return"dd";case 1:case 102:return"mt";case 2:case 3:return"fn";default:return s.value.waybillVendorID}});const L=e.ref(!1);return e.onBeforeUnmount(()=>{Mt()}),{invoiceTitle:r,invoiceTaxerID:i,orderData:s,orderInfo:l,orderStatus:m,cancelOrder:function(e){uni.jxConfirm({title:"提示",content:"是否取消该订单",success:async()=>{let t={vendorOrderID:e,isDetail:!0},a=await Io(t);if(0==a.code)if(function(e){e.data&&e.data.forEach(e=>{e.skus.forEach(e=>{p.value+=e.count,p.value==s.value.goodsCount&&(v.value=!0)}),p.value=0})}(a.data),v.value)uni.jxAlert({title:"提示",content:"有待审核的售后单,请先审核售后单再取消订单",success:()=>{n(a.data.data[0].afsOrderID||123)}});else{let t={vendorOrderID:e,vendorID:o.value,reason:"协商一致"},n=await Do(t);0==n.code?(V("取消成功",1),uni.jxAlert({title:"提示",content:"取消成功"})):uni.jxAlert({title:"提示",content:`取消失败:${n.desc||n.data}`})}else uni.jxAlert({title:"提示",content:`取消失败:${a.desc||a.data}`})}})},elemIDPre:g,elemIDSuf:y,expectTime:k,barCodeImg:c,earningTooSmall:S,isNewUser:u,realMobile:function(){if(1===s.value.vendorID){if(1!==qn.getters["storeInfo/imMtStatus"][0].imStatus)return V("美团IM状态已关闭",1);h("vendorUserInfo",{venderOrderID:s.value.vendorOrderID,orderSeq:s.value.orderSeq,vendorOrgCode:s.value.vendorOrgCode,vendorStoreID:s.value.vendorStoreID,userID:s.value.vendorUserID,vendorID:s.value.vendorID}),uni.navigateTo({url:"/subPages/messageChild/msgChat/msgChat"})}else V("暂不支持聊天",2)},avgPriceInfo:_,waybillStatus:I,afsOrder:D,skuList:B,totalCount:T,toCreateAfsOrderPage:function(e,n){if(1==e)uni.jxConfirm({title:"提示",content:"修改订单比例大于10%您的门店将被下线。请联系客户\r\n1.请联系客户更换其他等价商品\r\n2.联系客户说明可做售后退款",confirmText:"继续退款",cancelText:"联系客服",success:()=>{let t=JSON.stringify({vendorOrderID:a.value,vendorID:o.value,buyerComment:s.value.buyerComment});uni.navigateTo({url:`/subPages/orderChild/createAfterSales/createAfterSales?type=${e}&data=${t}`})},fail:()=>{t(n)}});else{let t=JSON.stringify({vendorOrderID:a.value,vendorID:o.value,buyerComment:s.value.buyerComment});uni.navigateTo({url:`/subPages/orderChild/createAfterSales/createAfterSales?type=${e}&data=${t}`})}},isPointStore:b,realPointStore:A,storeInfo:N,yunyingInfo:O,waybillType:M,pickingComplete:async function(e,t){let n={vendorOrderID:e,vendorID:t};0==(await ko(n)).code?V("拣货成功",1):V("拣货异常",2)},complaintHandler:function(e){uni.navigateTo({url:`/subPages/orderChild/complaint/complaint?vendorOrderID=${e}`})},isComplaint:L,isHiddenOrderInfo:w,callPhone:function(e){let n=[];if(e.consigneeMobile&&n.push("临1:"+e.consigneeMobile.split(",")[0]+"转"+e.consigneeMobile.split(",")[1]),e.consigneeMobile2&&n.push("临2:"+e.consigneeMobile2.split(",")[0]+"转"+e.consigneeMobile2.split(",")[1]),0===n.length)return V("该订单暂无联系方式",2);uni.showActionSheet({itemColor:"#4eb331",itemList:n,popover:{width:5e3},success:function(n){0===n.tapIndex&&t(e.consigneeMobile),1===n.tapIndex&&t(e.consigneeMobile2)}})}}}let fu={};fu={data:()=>({is_show:"none"}),watch:{show(e){this.is_show=this.show}},created(){this.swipeaction=this.getSwipeAction(),this.swipeaction&&Array.isArray(this.swipeaction.children)&&this.swipeaction.children.push(this)},mounted(){this.is_show=this.show},methods:{closeSwipe(e){this.autoClose&&this.swipeaction&&this.swipeaction.closeOther(this)},change(e){this.$emit("change",e.open),this.is_show!==e.open&&(this.is_show=e.open)},appTouchStart(e){const{clientX:t}=e.changedTouches[0];this.clientX=t,this.timestamp=(new Date).getTime()},appTouchEnd(e,t,n,o){const{clientX:a}=e.changedTouches[0];let r=Math.abs(this.clientX-a),i=(new Date).getTime()-this.timestamp;r<40&&i<300&&this.$emit("click",{content:n,index:t,position:o})},onClickForPC(e,t,n){}}};const hu=fu;let vu={};vu={data:()=>({uniShow:!1,left:0,buttonShow:"none",ani:!1,moveLeft:"",elClass:`Uni_${Math.ceil(1e6*Math.random()).toString(36)}`}),watch:{show(e){this.autoClose||this.openState(e)},left(){this.moveLeft=`translateX(${this.left}px)`},buttonShow(e){this.autoClose||this.openState(e)},leftOptions(){this.init()},rightOptions(){this.init()}},mounted(){this.swipeaction=this.getSwipeAction(),this.swipeaction&&Array.isArray(this.swipeaction.children)&&this.swipeaction.children.push(this),this.init()},methods:{init(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.getSelectorQuery()},100),this.left=0,this.x=0},closeSwipe(e){this.autoClose&&this.swipeaction&&this.swipeaction.closeOther(this)},appTouchStart(e){const{clientX:t}=e.changedTouches[0];this.clientX=t,this.timestamp=(new Date).getTime()},appTouchEnd(e,t,n,o){const{clientX:a}=e.changedTouches[0];let r=Math.abs(this.clientX-a),i=(new Date).getTime()-this.timestamp;r<40&&i<300&&this.$emit("click",{content:n,index:t,position:o})},touchstart(e){this.disabled||(this.ani=!1,this.x=this.left||0,this.stopTouchStart(e),this.autoClose&&this.closeSwipe())},touchmove(e){if(!this.disabled&&(this.stopTouchMove(e),"horizontal"===this.direction))return this.move(this.x+this.deltaX),!1},touchend(){this.disabled||this.moveDirection(this.left)},move(e){e=e||0;const t=this.leftWidth,n=this.rightWidth;this.left=this.range(e,-n,t)},range:(e,t,n)=>Math.min(Math.max(e,t),n),moveDirection(e){const t=this.threshold,n=this.isopen||"none",o=this.leftWidth,a=this.rightWidth;0!==this.deltaX?"none"===n&&a>0&&-e>t||"none"!==n&&a>0&&a+e<t?this.openState("right"):"none"===n&&o>0&&e>t||"none"!==n&&o>0&&o-e<t?this.openState("left"):this.openState("none"):this.openState("none")},openState(e){const t=this.leftWidth,n=this.rightWidth;let o="";switch(this.isopen=this.isopen?this.isopen:"none",e){case"left":o=t;break;case"right":o=-n;break;default:o=0}this.isopen!==e&&(this.throttle=!0,this.$emit("change",e)),this.isopen=e,this.ani=!0,this.$nextTick(()=>{this.move(o)})},close(){this.openState("none")},getDirection:(e,t)=>e>t&&e>10?"horizontal":t>e&&t>10?"vertical":"",resetTouchStatus(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0},stopTouchStart(e){this.resetTouchStatus();const t=e.touches[0];this.startX=t.clientX,this.startY=t.clientY},stopTouchMove(e){const t=e.touches[0];this.deltaX=t.clientX-this.startX,this.deltaY=t.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY),this.direction=this.direction||this.getDirection(this.offsetX,this.offsetY)},getSelectorQuery(){uni.createSelectorQuery().in(this).selectAll("."+this.elClass).boundingClientRect(e=>{if(0===e.length)return;let t="none";t=this.autoClose?"none":this.show,this.leftWidth=e[0].width||0,this.rightWidth=e[1].width||0,this.buttonShow=t}).exec()}}};const gu=e=>{(e.$wxs||(e.$wxs=[])).push("wxsswipe"),(e.$wxsModules||(e.$wxsModules={})).wxsswipe="afd46426"},yu=e=>{(e.$renderjs||(e.$renderjs=[])).push("renderswipe"),(e.$renderjsModules||(e.$renderjsModules={})).renderswipe="5a1e922e"},ku={mixins:[hu,{},vu],emits:["click","change"],props:{show:{type:String,default:"none"},disabled:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},threshold:{type:Number,default:20},leftOptions:{type:Array,default:()=>[]},rightOptions:{type:Array,default:()=>[]}},unmounted(){this.__isUnmounted=!0,this.uninstall()},methods:{uninstall(){this.swipeaction&&this.swipeaction.children.forEach((e,t)=>{e===this&&this.swipeaction.children.splice(t,1)})},getSwipeAction(e="uniSwipeAction"){let t=this.$parent,n=t.$options.name;for(;n!==e;){if(t=t.$parent,!t)return!1;n=t.$options.name}return t}}};gu(ku),yu(ku);const wu=Gn(ku,[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("view",{class:"uni-swipe"},[e.createElementVNode("view",{class:"uni-swipe_box","change:prop":t.renderswipe.showWatch,prop:e.wp(t.is_show),"data-threshold":o.threshold,"data-disabled":o.disabled+"",onTouchstart:n[2]||(n[2]=(...e)=>t.renderswipe.touchstart&&t.renderswipe.touchstart(...e)),onTouchmove:n[3]||(n[3]=(...e)=>t.renderswipe.touchmove&&t.renderswipe.touchmove(...e)),onTouchend:n[4]||(n[4]=(...e)=>t.renderswipe.touchend&&t.renderswipe.touchend(...e))},[e.createElementVNode("view",{class:"uni-swipe_button-group button-group--left"},[e.renderSlot(t.$slots,"left",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.leftOptions,(o,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,style:e.normalizeStyle({backgroundColor:o.style&&o.style.backgroundColor?o.style.backgroundColor:"#C7C6CD"}),class:"uni-swipe_button button-hock",onTouchstart:n[0]||(n[0]=e.withModifiers((...e)=>t.appTouchStart&&t.appTouchStart(...e),["stop"])),onTouchend:e.withModifiers(e=>t.appTouchEnd(e,a,o,"left"),["stop"]),onClick:e.withModifiers(e=>t.onClickForPC(a,o,"left"),["stop"])},[e.createElementVNode("text",{class:"uni-swipe_button-text",style:e.normalizeStyle({color:o.style&&o.style.color?o.style.color:"#FFFFFF",fontSize:o.style&&o.style.fontSize?o.style.fontSize:"16px"})},e.toDisplayString(o.text),5)],44,["onTouchend","onClick"]))),128))],!0)]),e.createElementVNode("view",{class:"uni-swipe_text--center"},[e.renderSlot(t.$slots,"default",{},void 0,!0)]),e.createElementVNode("view",{class:"uni-swipe_button-group button-group--right"},[e.renderSlot(t.$slots,"right",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.rightOptions,(o,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,style:e.normalizeStyle({backgroundColor:o.style&&o.style.backgroundColor?o.style.backgroundColor:"#C7C6CD"}),class:"uni-swipe_button button-hock",onTouchstart:n[1]||(n[1]=e.withModifiers((...e)=>t.appTouchStart&&t.appTouchStart(...e),["stop"])),onTouchend:e.withModifiers(e=>t.appTouchEnd(e,a,o,"right"),["stop"]),onClick:e.withModifiers(e=>t.onClickForPC(a,o,"right"),["stop"])},[e.createElementVNode("text",{class:"uni-swipe_button-text",style:e.normalizeStyle({color:o.style&&o.style.color?o.style.color:"#FFFFFF",fontSize:o.style&&o.style.fontSize?o.style.fontSize:"16px"})},e.toDisplayString(o.text),5)],44,["onTouchend","onClick"]))),128))],!0)])],40,["change:prop","prop","data-threshold","data-disabled"])])}],["__scopeId","data-v-aa0cda9c"]]);const bu=Gn({name:"uniSwipeAction",data:()=>({}),created(){this.children=[]},methods:{resize(){},closeAll(){this.children.forEach(e=>{e.is_show="none"})},closeOther(e){this.openItem&&this.openItem!==e&&(this.openItem.is_show="none"),this.openItem=e}}},[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("view",null,[e.renderSlot(t.$slots,"default")])}]]),xu=Gn(e.defineComponent({__name:"goodsRefund",props:{data:{}},emits:["confirm"],setup(t,{expose:n,emit:o}){const a=t,r=e.ref(null),i=o;let s=null;const l=e.ref(a.data.goodsCount);return n({open:function(){r.value.open()}}),e.onBeforeUnmount(()=>{clearTimeout(s)}),(t,n)=>{const o=e.resolveComponent("uni-number-box"),c=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createBlock(c,{ref_key:"popup",ref:r,type:"center"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"refund-root"},[e.createElementVNode("view",{class:"title"},"多份商品退款"),e.createElementVNode("view",{class:"goods-name"},e.toDisplayString(t.data.goodsName),1),e.createElementVNode("view",{class:"goods-operation"},[e.createVNode(o,{min:1,modelValue:l.value,"onUpdate:modelValue":n[0]||(n[0]=e=>l.value=e),max:t.data.goodsCount},null,8,["modelValue","max"])]),e.createElementVNode("view",{class:"goods-brn"},[e.createElementVNode("text",{class:"cancel",onClick:n[1]||(n[1]=e=>r.value.close())},"取消"),e.createElementVNode("text",{class:"confirm",onClick:n[2]||(n[2]=e=>function(e){r.value.close();let t={goodsName:a.data.goodsName,goodsCount:e,skuID:a.data.skuID,storeSubID:a.data.storeSubID};clearTimeout(s),s=setTimeout(()=>{i("confirm",t)},300)}(l.value))},"确定")])])]),_:1},512)}}}),[["__scopeId","data-v-6e6d54f3"]]),Su=e.defineComponent({__name:"goodsList",props:{skuList:{},data:{},realPointStore:{type:Boolean}},setup(t){const{previewImage:n}=tn();const o=e.ref([{text:"退款",style:{backgroundColor:"#ff0000"}}]),a=t,r=e.computed(()=>{qn.getters["storeInfo/isNewPriceDisplay"]}),i=e.ref(qn.state.storeInfo.allStoreInfo);function s(e){uni.jxConfirm({title:"提示",content:"是否对该订单创建售后单\r\n进行【退款】处理",success:()=>{if("支付方式:扫码枪"===a.data.buyerComment)l(e,e.goodsCount);else{c([{skuID:e.skuID,count:e.goodsCount,storeSubID:e.storeSubID}])}}})}async function l(e,t){try{let t=new Map;t.set(e.skuID,e.count);let n=Object.fromEntries(t);await No({vendorOrderID:a.data.vendorOrderID,skuIds:JSON.stringify(n),reason:"协商一致"}),V("创建成功",1)}catch(n){throw k("log","at subPages/orderChild/orderDetail/detailChild/goodsList.vue:294","error",n),n}}async function c(e){let t={vendorOrderID:a.data.vendorOrderID,vendorID:a.data.vendorID,refundSkuList:JSON.stringify(e),reason:"商家同意退款"},n=await Mo(t);0==n.code?(V("退款成功",1),setTimeout(()=>{uni.navigateBack()},800)):uni.jxAlert({title:"退款失败",content:n.desc||n.data})}const u=e.ref(null),d=e.ref({goodsName:"",goodsCount:1,skuID:0,storeSubID:0});return(t,m)=>{const p=w(e.resolveDynamicComponent("jx-price"),ka),f=w(e.resolveDynamicComponent("jx-icon"),Yn),v=w(e.resolveDynamicComponent("uni-swipe-action-item"),wu),g=w(e.resolveDynamicComponent("uni-swipe-action"),bu);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"skuList"},[e.createVNode(g,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.skuList,(s,m)=>(e.openBlock(),e.createBlock(v,{key:m,rightOptions:o.value,autoClose:!(t.skuList.length>20),disabled:110!=t.data.status,onClick:e=>function(e){k("log","at subPages/orderChild/orderDetail/detailChild/goodsList.vue:232","一个商品退款,,,99999999999*",e),1===e.count?uni.jxConfirm({title:"提示",content:"是否对该订单创建售后单\r\n进行【退款】处理",success:()=>{"支付方式:扫码枪"===a.data.buyerComment?l(e):c([{skuID:e.skuID,count:e.count,storeSubID:e.storeSubID}])}}):(d.value={goodsName:e.skuName,goodsCount:e.count,skuID:e.skuID,storeSubID:e.storeSubID},u.value.open())}(s)},{default:e.withCtx(()=>[s.skuID?(e.openBlock(),e.createElementBlock("view",{key:0},[e.createElementVNode("view",{class:"sku-item-for-orderdetail pd20",onClick:e.withModifiers(e=>{return t=s.nameID,n=s.skuID,o=s.comparePrice,a=s.skuName,k("log","at subPages/orderChild/orderDetail/detailChild/goodsList.vue:333","去商品详情111111"),uni.navigateTo({url:`/subPages/merchantChild/waitGoodsDetaile/waitGoodsDetaile?nameID=${t}&skuID=${n}&price=${o}&goodsName=${a}`}),void h("reLoadOrderDetail",!1);var t,n,o,a},["stop"])},[e.createElementVNode("view",{class:"img",onClick:e.withModifiers(e=>function(e){let t=[e.image,e.image2,e.image3,e.image4,e.image5].filter(e=>e&&e.length>0);n(t)}(s),["stop"])},[!r.value&&s.storeSubID&&i.value.payPercentage>=50?(e.openBlock(),e.createElementBlock("view",{key:0,style:{left:"10rpx"},class:"promtion-sku-icon2"})):e.createCommentVNode("",!0),!r.value&&s.salePrice<s.shopPrice&&!s.storeSubID&&i.value.payPercentage>=50?(e.openBlock(),e.createElementBlock("view",{key:1,style:{left:"10rpx"},class:"promtion-sku-icon"})):e.createCommentVNode("",!0),e.createElementVNode("image",{mode:"scaleToFill",src:s.image},null,8,["src"])],8,["onClick"]),t.data?(e.openBlock(),e.createElementBlock("view",{key:0,class:"right"},[e.createElementVNode("view",{class:"sku-name"},e.toDisplayString(s.skuName),1),e.createElementVNode("view",{class:"sku-spec"},[!r.value&&s.storeSubID&&i.value.payPercentage>=50?(e.openBlock(),e.createElementBlock("view",{key:0,class:"sku-price earning-price"},[e.createElementVNode("view",{class:"price2"},[e.createTextVNode("结算价: "),e.createVNode(p,{price:s.shopPrice},null,8,["price"])])])):!r.value&&100*s.comparePrice>=s.earningPrice&&s.storeSubID&&i.value.payPercentage>=50?(e.openBlock(),e.createElementBlock("view",{key:1,class:"sku-price"},[e.createElementVNode("text",{class:"price1"},"¥"+e.toDisplayString(s.shopPrice/100),1)])):(e.openBlock(),e.createElementBlock("view",{key:2,class:"sku-price"},[e.createElementVNode("text",{class:e.normalizeClass(["price1",{inLine:t.realPointStore?s.saleSalePrice!=s.comparePrice:s.earnPrice!=s.comparePrice}])},"¥"+e.toDisplayString(s.comparePrice),3),t.realPointStore||s.earnPrice==s.comparePrice?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,class:"price1"},"¥"+e.toDisplayString(s.earnPrice),1)),t.realPointStore&&s.saleSalePrice!=s.comparePrice?(e.openBlock(),e.createElementBlock("text",{key:1,class:"price1"},"¥"+e.toDisplayString(s.saleSalePrice),1)):e.createCommentVNode("",!0)])),e.createElementVNode("view",{class:e.normalizeClass(["sku-count",{strong:s.count>1}])},"数量: "+e.toDisplayString(s.count),3),e.createVNode(f,{icon:"shuxie",class:"icon-modify",color:"#999999"})]),e.createElementVNode("view",{class:"sku-info"},[s.location_code&&"EMPTY_VALUE"!==s.location_code?(e.openBlock(),e.createElementBlock("view",{key:0,class:"sku-location-code"},"货架码:"+e.toDisplayString(s.location_code),1)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"sku-stock"},"现库存:"+e.toDisplayString(s.skuStock),1)]),s.count>1?(e.openBlock(),e.createElementBlock("view",{key:0,class:"totalPrice"},[e.createTextVNode("总"+e.toDisplayString(r.value?"":"价")+": ",1),t.realPointStore||s.earnPrice==s.comparePrice?t.realPointStore&&s.saleSalePrice!=s.comparePrice?(e.openBlock(),e.createBlock(p,{key:1,price:100*s.saleSalePrice*s.count,color:"#50b335"},null,8,["price"])):(e.openBlock(),e.createBlock(p,{key:2,price:100*s.comparePrice*s.count,color:"#50b335"},null,8,["price"])):(e.openBlock(),e.createBlock(p,{key:0,price:100*s.earnPrice*s.count,color:"#50b335"},null,8,["price"]))])):e.createCommentVNode("",!0),s.upc?(e.openBlock(),e.createElementBlock("view",{key:1,class:"upc"}," UPC码:"+e.toDisplayString(s.upc),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],8,["onClick"])])):e.createCommentVNode("",!0)]),_:2},1032,["rightOptions","autoClose","disabled","onClick"]))),128))]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.skuList,(n,o)=>(e.openBlock(),e.createElementBlock("view",{key:o},[n.skuID?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"skuListWrap-1"},[e.createElementVNode("view",{class:"left"},[e.createElementVNode("image",{class:"img",src:"https://image.jxc4.com/image/5c506c8db41719fe4c433979498eb1e7.png",mode:"scaleToFill"}),e.createElementVNode("view",{class:"right"},[e.createElementVNode("view",{class:"name"},e.toDisplayString(n.skuName),1),n.count>1?(e.openBlock(),e.createElementBlock("view",{key:0,class:"price price-count"},[e.createTextVNode(" 总价: "),t.realPointStore?(e.openBlock(),e.createBlock(p,{key:0,color:"#4fb433",price:n.salePrice*n.count},null,8,["price"])):(e.openBlock(),e.createBlock(p,{key:1,color:"#4fb433",price:n.salePrice*n.count*.7},null,8,["price"]))])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"price"},[t.realPointStore?(e.openBlock(),e.createBlock(p,{key:0,color:"#f84a82",price:n.salePrice},null,8,["price"])):(e.openBlock(),e.createBlock(p,{key:1,color:"#f84a82",price:.7*n.salePrice},null,8,["price"]))]))])]),e.createElementVNode("view",{class:"sku-count-1"},"数量:"+e.toDisplayString(n.count),1)]))]))),128))]),e.createVNode(xu,{ref_key:"refundRef",ref:u,data:d.value,onConfirm:s},null,8,["data"])],64)}}}),Nu=Gn(Su,[["__scopeId","data-v-a68e9ed2"]]),Cu=Gn(e.defineComponent({__name:"orderDetail",setup(t){const{previewImage:n}=tn(),{invoiceTitle:o,invoiceTaxerID:a,orderData:r,orderInfo:i,orderStatus:s,cancelOrder:l,elemIDPre:c,elemIDSuf:u,expectTime:d,barCodeImg:m,earningTooSmall:p,isNewUser:h,realMobile:v,avgPriceInfo:g,waybillStatus:y,afsOrder:k,skuList:b,totalCount:x,toCreateAfsOrderPage:S,isPointStore:N,realPointStore:C,storeInfo:_,yunyingInfo:E,waybillType:I,pickingComplete:D,complaintHandler:V,isComplaint:B,isHiddenOrderInfo:T,callPhone:P}=pu(),{printerOrder:A,copyInfo:O,phoneCall:M,waybillVendor:L,afterSalesDetaile:j}=aa();return e.ref([{latitude:f("lat"),longitude:f("lng"),iconPath:"https://image.jxc4.com/image/f68d3785990263a4877ef8e2c4cb3412.png",width:35,height:35}]),(t,F)=>{const U=w(e.resolveDynamicComponent("jx-icon"),Yn),$=w(e.resolveDynamicComponent("jx-price"),ka),R=w(e.resolveDynamicComponent("jx-real-income"),Ir),z=w(e.resolveDynamicComponent("jx-real-income-jxgy"),Vr),H=w(e.resolveDynamicComponent("jx-empty"),Jn),q=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"tip"},e.toDisplayString(e.unref(f)("storeName")),1),-99!=e.unref(r).vendorID&&-99!=e.unref(i).vendorID?(e.openBlock(),e.createElementBlock("view",{key:0,style:{"margin-top":"60rpx"}},[e.createElementVNode("view",{class:"brandStatus"},[e.createElementVNode("view",{class:"left"},[e.createElementVNode("view",{class:e.normalizeClass(["h-number",`index-${e.unref(r).vendorID}`])},[e.createElementVNode("text",{class:e.normalizeClass(["brand",`icon-${e.unref(r).vendorID}`])},null,2),e.createElementVNode("text",{class:"num-root"},[e.createElementVNode("text",null,"#"),e.createElementVNode("text",{class:"num"},e.toDisplayString(e.unref(r).orderSeq),1)])],2),e.unref(T)?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass(["type",{"type-active":1!=e.unref(r).businessType}])},e.toDisplayString(1===e.unref(r).businessType?"立即达":"预订单"),3)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"right"},[e.createElementVNode("text",{class:"btn-print",onClick:F[0]||(F[0]=t=>e.unref(A)(e.unref(r).vendorOrderID,e.unref(r).vendorID))}),e.createElementVNode("view",{class:"order-status"},e.toDisplayString(e.unref(s)),1)])]),3!==e.unref(r).vendorID?(e.openBlock(),e.createElementBlock("view",{key:0,class:"order-number"},[e.createElementVNode("view",{onClick:F[1]||(F[1]=e.withModifiers(t=>e.unref(O)(e.unref(r).vendorOrderID,"复制订单号成功"),["stop"]))},[e.createElementVNode("text",{class:"order-num"},"订单编号:"+e.toDisplayString(e.unref(r).vendorOrderID),1),e.createVNode(U,{icon:"fuzhi",color:"#818181",size:38})]),e.createElementVNode("text",{class:"cancel",onClick:F[2]||(F[2]=t=>e.unref(l)(e.unref(r).vendorOrderID))},"取消订单")])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"order-number"},[e.createElementVNode("view",{onClick:F[3]||(F[3]=e.withModifiers(t=>e.unref(O)(e.unref(r).vendorOrderID2,"复制订单号成功"),["stop"]))},[e.createElementVNode("text",{class:"order-num"},[e.createTextVNode("订单编号:"),e.createElementVNode("text",null,e.toDisplayString(e.unref(c)),1),e.createElementVNode("text",{class:"elemIDSuf"},e.toDisplayString(e.unref(u)),1)]),e.createVNode(U,{icon:"fuzhi",color:"#818181",size:38})]),e.createElementVNode("text",{class:"cancel",onClick:F[4]||(F[4]=t=>e.unref(l)(e.unref(r).vendorOrderID2))},"取消订单")])),e.createElementVNode("view",{class:"create-order-timer"},[e.createElementVNode("view",null,"下单时间:"+e.toDisplayString(e.unref(_t)(e.unref(r).orderCreatedAt)),1),e.withDirectives(e.createElementVNode("image",{class:"icon-index",src:"https://image.jxc4.com/image/4d21a59d213ed6319e85dd51e0b37f77.tem.png"},null,512),[[e.vShow,1!=e.unref(r).businessType]])]),e.unref(T)?(e.openBlock(),e.createElementBlock("view",{key:2,class:e.normalizeClass(["estimate-service",{"dsd-expectTime":2===e.unref(r).businessType}])}," (预计)送达时间:"+e.toDisplayString(e.unref(d)),3)):e.createCommentVNode("",!0),e.createElementVNode("template",null,[-20===e.unref(r).lockStatus?(e.openBlock(),e.createElementBlock("view",{key:0,class:"order-status"}," 订单状态:已锁定 ")):e.createCommentVNode("",!0),-5===e.unref(r).lockStatus?(e.openBlock(),e.createElementBlock("view",{key:1,class:"order-status"},"订单状态:用户申请取消")):e.createCommentVNode("",!0),1&e.unref(r).deliveryFlag?(e.openBlock(),e.createElementBlock("view",{key:2,class:"order-status"},"已停止配送调度")):e.createCommentVNode("",!0),1&e.unref(r).deliveryFlag?(e.openBlock(),e.createElementBlock("view",{key:3,class:"order-status"},"已转京西自送")):e.createCommentVNode("",!0),e.unref(o)?(e.openBlock(),e.createElementBlock("view",{key:4,class:"order-status"},e.toDisplayString(e.unref(o)),1)):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("view",{key:5,class:"order-status"},e.toDisplayString(e.unref(a)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"barcode"},[e.createElementVNode("image",{src:e.unref(m),mode:"scaleToFill",onClick:F[5]||(F[5]=t=>e.unref(n)(e.unref(m)))},null,8,["src"]),e.createElementVNode("view",null,e.toDisplayString(e.unref(r).vendorOrderID),1)]),e.unref(p)?(e.openBlock(),e.createElementBlock("view",{key:3,class:"order-status"},"订单亏损严重,建议联系客户取消!")):e.createCommentVNode("",!0),e.unref(h)?(e.openBlock(),e.createElementBlock("view",{key:4,class:"order-status"},"新用户")):e.createCommentVNode("",!0),e.unref(T)?(e.openBlock(),e.createElementBlock("view",{key:5,class:"user-name"},[e.createElementVNode("view",{style:{display:"flex","align-items":"center"}},"姓名:"+e.toDisplayString(e.unref(r).consigneeName)+" ",1),e.createElementVNode("view",{class:"see-map",onClick:F[6]||(F[6]=e.withModifiers(t=>e.unref(P)(e.unref(r)),["stop"]))},"拨打电话"),e.createElementVNode("view",{class:"see-map",onClick:F[7]||(F[7]=e.withModifiers((...t)=>e.unref(v)&&e.unref(v)(...t),["stop"]))},"发消息")])):e.createCommentVNode("",!0),"self"!=e.unref(r).deliveryType?(e.openBlock(),e.createElementBlock("view",{key:6,class:"user-name"},"地址:"+e.toDisplayString(e.unref(r).consigneeAddress),1)):(e.openBlock(),e.createElementBlock("view",{key:7,class:"user-name user-name-self"},"自提订单")),e.createElementVNode("view",{class:"divider"}),e.unref(r).buyerComment&&e.unref(T)?(e.openBlock(),e.createElementBlock("view",{key:8,class:"user-name remarks"},"备注:"+e.toDisplayString(e.unref(r).buyerComment),1)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"购买次数"),e.createElementVNode("text",{class:"auxiliary"},e.toDisplayString(e.unref(i).count||0),1)]),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"差评数"),e.createElementVNode("text",{class:"auxiliary"},e.toDisplayString(e.unref(i).badCommentCount||0),1)]),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"均价"),e.createElementVNode("text",{class:"auxiliary"},e.toDisplayString(e.unref(g)),1)]),e.createElementVNode("view",{class:"divider"}),e.unref(r).waybillStatus>=10?(e.openBlock(),e.createElementBlock("view",{key:9,class:"logistics"},[e.createElementVNode("view",{class:"waybill"},[e.createElementVNode("text",null,e.toDisplayString(e.unref(L)(e.unref(r).waybillVendorID,e.unref(r).status,e.unref(r).waybillStatus)),1),e.createElementVNode("text",{class:"auxiliary"},"运单号:"+e.toDisplayString(e.unref(r).vendorWaybillID),1)]),e.createElementVNode("view",{class:"waybiller user-name"},[e.createElementVNode("view",{style:{display:"flex"}},[e.createElementVNode("text",{class:e.normalizeClass(["brand",`icon-${e.unref(I)}`])},null,2),e.createElementVNode("text",{class:"courierName"},e.toDisplayString(e.unref(r).courierName),1)]),e.unref(r).courierMobile.split(",")[1]?(e.openBlock(),e.createElementBlock("text",{key:0,class:"courierMobile",onClick:F[8]||(F[8]=e.withModifiers(t=>e.unref(M)(e.unref(r).courierMobile),["stop"]))},e.toDisplayString(e.unref(r).courierMobile.split(",")[0]+"转"+e.unref(r).courierMobile.split(",")[1]),1)):(e.openBlock(),e.createElementBlock("text",{key:1,class:"courierMobile",onClick:F[9]||(F[9]=e.withModifiers(t=>e.unref(M)(e.unref(r).courierMobile),["stop"]))},e.toDisplayString(e.unref(r).courierMobile),1))]),e.unref(B)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"finish-pick-fail",onClick:F[10]||(F[10]=t=>e.unref(V)(e.unref(r).vendorOrderID))},"投诉骑手")):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"已加小费"),e.createVNode($,{price:e.unref(r).waybillTipMoney},null,8,["price"])]),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"配送费用"),e.createVNode($,{price:e.unref(r).desiredFee},null,8,["price"])])])):e.createCommentVNode("",!0),e.unref(T)?(e.openBlock(),e.createElementBlock("view",{key:10,class:"waybill-status-root"},[e.createElementVNode("text",null,"运单状态"),0!=e.unref(y).length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(y),(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:t.id,class:e.normalizeClass(["waybill-status",{"waybill-status-active":n==e.unref(y).length-1}])},[e.createElementVNode("text",{class:e.normalizeClass(["timer",{timer1:0==n}])},e.toDisplayString(t.statusTime),3),e.createElementVNode("text",{class:"statues"},e.toDisplayString(t.status),1)],2))),128)):(e.openBlock(),e.createElementBlock("text",{key:1,class:"no-status"},":暂无运单状态"))])):e.createCommentVNode("",!0),e.unref(k).length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:11},e.renderList(e.unref(k),t=>(e.openBlock(),e.createElementBlock("view",{class:"afsOrder",key:t.id,onClick:n=>e.unref(j)(t.afsOrderID)},[e.createTextVNode(" 发起售后单:"),e.createElementVNode("text",{class:"order-num"},e.toDisplayString(t.afsOrderID),1)],8,["onClick"]))),128)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"goods-list"},[e.createElementVNode("view",{class:"left"},[e.createElementVNode("view",null,"商品列表"),e.createElementVNode("view",{class:"goods-num"},"共"+e.toDisplayString(e.unref(b).length)+"种"+e.toDisplayString(e.unref(x))+"件商品",1)]),e.unref(r).status<20&&0===e.unref(r).lockStatus?(e.openBlock(),e.createElementBlock("view",{key:0,class:"to-adjustpage",onClick:F[11]||(F[11]=t=>e.unref(S)(1,e.unref(r).consigneeMobile))},"部分退款")):e.createCommentVNode("",!0),110===e.unref(r).status?(e.openBlock(),e.createElementBlock("view",{key:1,class:"to-adjustpage",onClick:F[12]||(F[12]=t=>e.unref(S)(2))},"发起售后")):e.createCommentVNode("",!0)]),e.createVNode(Nu,{realPointStore:e.unref(C),skuList:e.unref(b),data:e.unref(r)},null,8,["realPointStore","skuList","data"]),"jxcs"==e.unref(f)("terrace")||"gblm"==e.unref(f)("terrace")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[e.createElementVNode("view",{class:"user-name"},[e.createTextVNode(e.toDisplayString(0!=e.unref(r).vendorPayPercentage?e.unref(r).vendorPayPercentage<50?"实际支付:":"实际收入:":e.unref(N)?"实际支付:":"实际收入:")+" ",1),e.createVNode(R,{orderData:e.unref(r),color:"red",isTip:!1},null,8,["orderData"])]),e.unref(N)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"user-name"},[e.createElementVNode("text",null,"平台结算:"),"完成"!=e.unref(s)?(e.openBlock(),e.createElementBlock("view",{key:0},[e.unref(r).totalShopMoney>0?(e.openBlock(),e.createBlock($,{key:0,color:"red",price:e.unref(r).totalShopMoney},null,8,["price"])):(e.openBlock(),e.createElementBlock("text",{key:1,style:{color:"red"}},"待更新"))])):(e.openBlock(),e.createBlock($,{key:1,color:"red",price:e.unref(r).totalShopMoney},null,8,["price"]))])):e.createCommentVNode("",!0),e.unref(C)&&e.unref(i)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"user-name"},[e.createElementVNode("text",null,"平台补贴:"),e.createVNode($,{color:"red",price:e.unref(r).pmSubsidyMoney},null,8,["price"])])):e.createCommentVNode("",!0),"商家自送"===e.unref(L)(e.unref(r).waybillVendorID,e.unref(r).status,e.unref(r).waybillStatus)?(e.openBlock(),e.createElementBlock("view",{key:2,class:"user-name"},[e.createElementVNode("text",null,"自送收益:"),e.createVNode($,{color:"red",price:e.unref(r).baseFreightMoney},null,8,["price"])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"亏损补贴金额:"),e.createVNode($,{color:"red",price:e.unref(r).jxSubsidyMoney},null,8,["price"])])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:13},[e.createElementVNode("view",{class:"user-name"},[e.createTextVNode(" 门店收益: "),e.createVNode(z,{order:e.unref(r),style:{color:"red"},isTip:!1},null,8,["order"])]),"商家自送"===e.unref(L)(e.unref(r).waybillVendorID,e.unref(r).status,e.unref(r).waybillStatus)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"user-name"},[e.createElementVNode("text",null,"自送收益:"),e.createVNode($,{color:"red",price:.9*(e.unref(r).baseFreightMoney||400)},null,8,["price"])])):e.createCommentVNode("",!0)],64)),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"店铺收款人:"),e.createElementVNode("text",null,e.toDisplayString(e.unref(_).payeeName||"暂无门店收款人"),1)]),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"平台负责人:"),e.unref(_).marketManName?(e.openBlock(),e.createElementBlock("view",{key:0,onClick:F[13]||(F[13]=t=>e.unref(M)(e.unref(_).marketManPhone))},[e.createVNode(U,{icon:"24gf-telephone",color:"#4eb331"}),e.createTextVNode(" "+e.toDisplayString(e.unref(_).marketManName),1)])):(e.openBlock(),e.createElementBlock("text",{key:1},"暂无平台负责人"))]),e.createElementVNode("view",{class:"user-name"},[e.createElementVNode("text",null,"运营负责人:"),e.unref(E).name?(e.openBlock(),e.createElementBlock("view",{key:0,onClick:F[14]||(F[14]=t=>e.unref(M)(e.unref(E).mobile))},[e.createVNode(U,{icon:"24gf-telephone",color:"#4eb331"}),e.createTextVNode(" "+e.toDisplayString(e.unref(E).name),1)])):(e.openBlock(),e.createElementBlock("text",{key:1},"暂无运营负责人"))]),10===e.unref(r).status&&0===e.unref(r).lockStatus?(e.openBlock(),e.createElementBlock("view",{key:14,onClick:F[15]||(F[15]=t=>e.unref(D)(e.unref(r).vendorOrderID,e.unref(r).vendorID)),class:"finish-pick"},"拣货完成")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(H,{key:1,title:"未找到此订单"})),e.createVNode(q)],64)}}}),[["__scopeId","data-v-50974143"]]);function _u(){const{openWeixin:t}=tn(),n=e.ref("");C(async e=>{n.value=null==e?void 0:e.orderId,await s(),await m()}),x(async()=>{await v(),await y()});let o=null;E(()=>{clearTimeout(o),o=setTimeout(async()=>{T(),clearTimeout(o)},1e3)});const a=e.ref({}),r=e.ref([]),i=e.ref(0);async function s(){let e={vendorOrderID:n.value},t=await ho(e);if(0==t.code&&t.data.totalCount>=1){a.value=t.data.data[0];let e=await async function(e){let t={storeIDs:JSON.stringify([e]),pageSize:1},n=await un.get_stores(t);if(0==n.code)return n.data.stores[0]}(a.value.jxStoreID);r.value=e.CourierMaps,i.value=a.value.createDeliveryType}else uni.jxAlert({title:"提示",content:"未查询到订单信息",success:()=>{uni.navigateBack()}})}const l=e.computed(()=>{if(-1!==a.value.waybillVendorID||15!==a.value.status||16&a.value.deliveryFlag||32&a.value.deliveryFlag)return-1!==a.value.waybillVendorID||15!==a.value.status||16&~a.value.deliveryFlag&&32&~a.value.deliveryFlag?a.value.waybillVendorID>=0?c.vendorName[a.value.waybillVendorID]:"商家自送":"正在召唤三方配送";if(1===a.value.businessType)return"待配送";{let e=Object.keys(d.value);return e.length>0&&d.value[e[0]].timeoutSecond?"待配送":"预订单"}}),c=Nt.serveInfo,u=e.computed(()=>{let e=a.value.status;return 15===e?"待配送":20===e?"配送中":e?c.orderStatus[e]:"未知状态"}),d=e.ref({});async function m(){let e={vendorOrderID:a.value.vendorOrderID,vendorID:a.value.vendorID},t=await Uo(e);if(0==t.code){let e=t.data;r.value&&r.value.forEach(t=>{e[t.vendorID]&&(e[t.vendorID].status=t.status)}),d.value=e,function(e){for(let n in e){var t=.9*(a.value.baseFreightMoney||400)-(e[n].waybill?e[n].waybill.actualFee:e[n].deliveryFee);Math.abs(t)>h.value&&(p.value=!0)}}(d.value)}else uni.jxAlert({title:"提示",content:"未获取到配送费用",success:()=>{uni.navigateBack()}})}const p=e.ref(!1);const h=e.ref(0);async function v(){let e=await $o();if(0==e.code){let t=qn.state.storeInfo.allStoreInfo.brandID;const n=e.data.find(e=>e.id===t);h.value=n.balance||0}else V("账户余额信息异常")}const g=e.ref(0);async function y(){let e={storeID:f("storeID")},t=await Ro(e);0==t.code?g.value=t.data.accountBalance:(V("门店账号余额异常"),g.value=0)}const w=e.computed(()=>{const e=d.value[a.value.waybillVendorID];let t=0;return e&&(t=e.waybill?e.waybill.desiredFee:e.deliveryFee),(t/100).toFixed(2)}),b=e.computed(()=>(.9*(a.value.baseFreightMoney||400)/100).toFixed(1)),S=e.computed(()=>{let e=a.value;return"deliveryFlag"in e&&!(3&~e.deliveryFlag||0!==e.lockStatus||"self"===e.deliveryType||e.vendorWaybillID)}),N=e.ref(100);const _=e.ref(null);async function I(){let e={vendorOrderID:a.value.vendorOrderID,vendorID:a.value.vendorID},t=await zo(e);0==t.code?(T(),uni.jxAlert({title:"提示",content:"转自送成功,请尽快安排给客户送货"})):uni.jxAlert({title:"提示",content:`转自送失败:${t.desc||t.data}`}),P()}const D=e.ref({name:"",tel:""});let B=null;function T(){clearTimeout(B),B=setTimeout(async()=>{await s(),await m(),await v(),await y()},1e3)}function P(){_.value.close(),D.value={name:"",tel:""}}const A=e.ref(!1);return e.onBeforeUnmount(()=>{clearTimeout(B),Mt()}),{waitingStatus:l,orderData:a,createDeliveryType:i,orderStatus:u,deliverList:d,accountBalance:h,StoreMoneyBalance:g,feeCall:w,selfDeliveryPrice:b,isSelfDeliver:S,chargeMoney:N,selfDelivery:function(){uni.jxConfirm({title:"提示",content:"是否将该订单转为自送",success:()=>{14==a.value.vendorID||3==a.value.vendorID||1==a.value.vendorID?uni.jxConfirm({title:"提示",content:"是否填写骑手信息",confirmText:"填写",cancelText:"不填写",success:()=>{_.value.open()},fail:()=>{I()}}):I()}})},deliveryRider:D,dyPopup:_,selfDelivering:I,handleConfirm:async function(){if(""==D.value.name)return V("请填写骑手姓名");if(!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(D.value.tel))return V("请填写正确的骑手电话");let e={vendorOrderID:a.value.vendorOrderID,vendorID:a.value.vendorID,courierName:D.value.name,courierMobile:D.value.tel};P();let t=await zo(e);0==t.code?(T(),uni.jxAlert({title:"提示",content:"转自送成功,请尽快安排给客户送货"})):uni.jxAlert({title:"提示",content:`转自送失败:${t.desc||t.data}`})},addTipMoney:function(){uni.jxConfirm({title:"添加小费",content:`当前已加小费:${(a.value.waybillTipMoney/100).toFixed(2)}\r\n是否再添加 1元`,confirmText:"加1元",cancelText:"不了",success:async()=>{let e={vendorOrderID:a.value.vendorOrderID,vendorID:a.value.vendorID,tipFee:+a.value.waybillTipMoney+100,isPay:0},t=await Ho(e);0==t.code?(V("添加成功",1),T()):uni.jxConfirm({title:"提示",content:`${t.desc||t.data}`,confirmText:"确认添加",cancelText:"取消",success:async()=>{let e={vendorOrderID:a.value.vendorOrderID,vendorID:a.value.vendorID,tipFee:+a.value.waybillTipMoney+100,isPay:1},t=await Ho(e);0==t.code?(V("添加成功",1),T()):uni.jxAlert({title:"提示",content:`添加失败:${t.desc||t.data}`})}})}})},switchStatus:async function(e){let t=r.value.find(t=>+t.vendorID===+e.vendorID),n={storeID:a.value.jxStoreID,vendorID:e.vendorID,payload:JSON.stringify({status:e.status,vendorStoreID:t.vendorStoreID})},o=await qo(n);0==o.code?(0==e.status?V("关闭成功",1):V("打开成功",1),await s(),await m()):uni.jxAlert({title:"提示",content:`操作失败${o.desc||o.data}`})},refresh:async function(){await s(),a.value.status>20?uni.jxAlert({title:"警告",content:"订单状态已改变",success:()=>{uni.navigateBack()}}):await m()},switchActive:A,seeMap:function(){uni.openLocation({latitude:a.value.consigneeLat/1e6,longitude:a.value.consigneeLng/1e6,name:a.value.consigneeAddress,address:"客户地址",scale:16})},handleChargeNow:function(e){if("jxgy"==f("terrace"))return void uni.jxAlert({title:"提示",content:"果园App暂不支持在线充值,请联系运营进行充值。"});let n=JSON.stringify({type:e,storeName:f("storeName"),storeID:f("storeID"),token:f("token"),platform:1});uni.jxConfirm({title:"提示",content:"即将打开微信进行充值,如果打开失败,请重新操作",confirmText:"确认充值",success:()=>{t(`subPages/messageChild/appPlay/appPlay?playData=${n}`)}})},cancelAll:function(e){let t={vendorOrderID:n.value,vendorID:a.value.vendorID};k("log","at subPages/orderChild/deliverManager/deliverManager.ts:517","ZSW-res",t),e&&(t.isStopSchedule=e),uni.jxConfirm({title:"提示",content:"是否取消该订单的所有三方配送",success:async()=>{let e=await Yo(t);0==e.code?uni.jxAlert({title:"提示",content:"取消成功",success:()=>{T()}}):uni.jxAlert({title:"提示",content:e.desc||e.data})}})},complainRider:async function(){uni.navigateTo({url:`/subPages/orderChild/complaint/complaint?vendorOrderID=${a.value.vendorOrderID}&orderData=${JSON.stringify(a.value)}&type=current`})}}}function Eu(t,n){const o=e.ref(t.waybillFee),a=e.computed(()=>t.waybillFee.waybill&&t.waybillFee.waybill.status>10?"delivering"+t.vendor:""),r=Nt.serveInfo,i=e.computed(()=>t.vendor?r.vendorName[t.vendor]:""),s=e.computed(()=>{let e=Math.floor(t.waybillFee.timeoutSecond/60),n=t.waybillFee.timeoutSecond%60;return`${e<10?"0"+e:e}分${n<10?"0"+n:n}秒`}),l=e.computed(()=>{if(o.value.status){return`<span style="font-size: 10px;">¥</span>${((t.waybillFee.waybill?t.waybillFee.waybill.desiredFee:t.waybillFee.deliveryFee)/100).toFixed(2)}<span class="small"><br/>(预估支出)</span>`}return'<span style="font-size: 10px;"></span>--<span class="small"><br/>(预估支出)</span>'}),c=e.computed(()=>{if(o.value.status){return 0==(t.waybillFee.waybill?t.waybillFee.waybill.desiredFee:t.waybillFee.deliveryFee)}}),u=Bt({time:1e3,success:e=>e===o.value.status&&0==e?V("已经是关闭状态"):e===o.value.status&&1==e?V("已经是打开状态"):(o.value.status=e,void n("switchStatus",{vendorID:t.vendor,status:e,waybillFee:t.waybillFee})),fail:e=>{V("操作过快")}}),d=e.ref({101:16,102:32}),m=Bt({time:3e3,success:()=>{let e=.9*(t.orderData.baseFreightMoney||400)-(t.waybillFee.waybill?t.waybillFee.waybill.desiredFee:t.waybillFee.deliveryFee),n=Math.abs(e/100);0==t.createDeliveryType?n>10?uni.jxConfirm({title:"提示",content:"配送费超过10元,是否继续发单",success:()=>{p()}}):p():t.accountBalance<10?uni.jxAlert({title:"提示",content:"余额不足10元,请充值后发单"}):function(e){t.accountBalance>e?uni.jxConfirm({title:"提示",content:`是否手动召唤${i.value}`,confirmText:"召唤",success:()=>{p()}}):uni.jxConfirm({title:"提示",content:"配送余额不足,点击确定对账号充值"})}(n)},fail:e=>{V(`${e}秒后在试`)}});async function p(){uni.showLoading({title:"召唤中..."});let e={vendorOrderID:t.orderData.vendorOrderID,vendorID:t.orderData.vendorID,courierVendorIDs:JSON.stringify([Number(t.vendor)]),forceCreate:!1,maxAddFee:0,maxDiffFee2Mtps:0},o=await Go(e);uni.hideLoading(),0==o.code?uni.jxAlert({title:"提示",content:"召唤成功",success:()=>{n("refresh")}}):uni.jxAlert({title:"提示",content:`召唤失败${o.desc||o.data}`})}return{vendorClass:a,vendorName:i,countDown:s,newPrice:l,maskMap:d,createWaybill:m,switchStatus:u,cancelWaybill:function(){uni.jxConfirm({title:"提示",content:`是否取消${i.value}`,success:async()=>{uni.showLoading({title:"取消中..."});let e={vendorWaybillID:t.waybillFee.waybill.vendorWaybillID,waybillVendorID:t.waybillFee.waybill.waybillVendorID,reasonID:0,reason:"不想发了"},o=await Wo(e);uni.hideLoading(),0==o.code?uni.jxAlert({title:"提示",content:"取消成功",success:()=>{n("refresh")}}):uni.jxAlert({title:"提示",content:`取消失败${o.desc||o.data}`})}})},waybillFeeStatus:o,tipText:c}}const Iu=Gn(e.defineComponent({__name:"threeDeliver",props:{vendor:{},waybillFee:{},orderData:{},accountBalance:{},sotreID:{},createDeliveryType:{}},emits:["switchStatus","refresh"],setup(t,{emit:n}){const o=t,a=n;let{vendorClass:r,vendorName:i,countDown:s,newPrice:l,maskMap:c,createWaybill:u,switchStatus:d,cancelWaybill:m,waybillFeeStatus:p,tipText:f}=Eu(o,a);return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["deliver-cell",{deActive:t.waybillFee.waybill&&t.waybillFee.waybill.status>10}])},[e.createElementVNode("view",{class:"deActive-mak"}),e.createElementVNode("view",{class:"vendor-name"},[e.createElementVNode("view",{class:"map-op"},[e.createElementVNode("view",{class:e.normalizeClass(e.unref(r))},e.toDisplayString(e.unref(i)),3),e.createElementVNode("view",{class:e.normalizeClass(["switch-group",{"group-active":t.waybillFee.waybill&&t.waybillFee.waybill.status>10}])},[e.createElementVNode("view",{class:e.normalizeClass(["left-check",{activeWarring:!e.unref(p).status}]),onClick:n[0]||(n[0]=t=>e.unref(d)(0))}," 关闭 ",2),e.createElementVNode("view",{class:e.normalizeClass(["right-check",{active:e.unref(p).status}]),onClick:n[1]||(n[1]=t=>e.unref(d)(1))}," 打开 ",2)],2)]),15===t.orderData.status&&!t.waybillFee.waybill&&t.waybillFee.timeoutSecond>0?(e.openBlock(),e.createElementBlock("view",{key:0},[e.createTextVNode(" 等待发单 "),e.createElementVNode("text",{style:{color:"#d34b3b"}},e.toDisplayString(e.unref(s)),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"right-handler"},[e.createElementVNode("view",{class:"waybill-price",innerHTML:e.unref(l)},null,8,["innerHTML"]),t.waybillFee.errCode?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"operation"},[(t.orderData.deliveryFlag&e.unref(c)[t.vendor])!==e.unref(c)[t.vendor]&&!t.waybillFee.waybill&&t.waybillFee.status?(e.openBlock(),e.createElementBlock("view",{key:0,class:"btn",onClick:n[2]||(n[2]=(...t)=>e.unref(u)&&e.unref(u)(...t))}," 召唤骑手 ")):e.createCommentVNode("",!0),t.waybillFee.waybill&&t.waybillFee.waybill.status<=10&&(t.orderData.deliveryFlag&e.unref(c)[t.vendor])!==e.unref(c)[t.vendor]?(e.openBlock(),e.createElementBlock("view",{key:1,class:"btn cancel",onClick:n[3]||(n[3]=(...t)=>e.unref(m)&&e.unref(m)(...t))}," 取消 ")):e.createCommentVNode("",!0),e.createElementVNode("view",null,[t.waybillFee.waybill&&t.waybillFee.waybill.status>10?(e.openBlock(),e.createElementBlock("view",{key:0,class:"text text-ing"}," 配送中... ")):e.createCommentVNode("",!0),(t.orderData.deliveryFlag&e.unref(c)[t.vendor])===e.unref(c)[t.vendor]?(e.openBlock(),e.createElementBlock("view",{key:1,class:"text"}," 创建中... ")):e.createCommentVNode("",!0)])])),t.waybillFee.errCode&&!e.unref(p).status?(e.openBlock(),e.createElementBlock("view",{key:1,class:"operation operation-text"},[e.createElementVNode("view",{class:"text"},"不用"),e.createElementVNode("text",{class:"text"},e.toDisplayString(e.unref(i)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("view",{key:2,class:"operation operation-text"},[e.createElementVNode("view",{class:"text"},"该范围"),e.createElementVNode("text",{class:"text"},"暂无骑手")])):e.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-f17247b3"]]),Du=Gn(e.defineComponent({__name:"deliverManager",setup(t){const{phoneCall:n}=tn(),{waitingStatus:o,orderData:a,createDeliveryType:r,orderStatus:i,deliverList:s,accountBalance:l,StoreMoneyBalance:c,feeCall:u,selfDeliveryPrice:d,isSelfDeliver:m,selfDelivery:p,deliveryRider:f,dyPopup:h,selfDelivering:v,handleConfirm:g,addTipMoney:y,switchStatus:k,refresh:b,switchActive:x,seeMap:S,handleChargeNow:N,cancelAll:C,complainRider:_}=_u();return(t,E)=>{const I=e.resolveComponent("uni-notice-bar"),D=w(e.resolveDynamicComponent("jx-price"),ka),V=w(e.resolveDynamicComponent("jx-input"),zc),B=w(e.resolveDynamicComponent("uni-popup"),Ca),T=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"top-system-root"},[1&e.unref(a).deliveryFlag?(e.openBlock(),e.createElementBlock("view",{key:0,class:"stop-delivery"},[e.createVNode(I,{style:{"border-radius":"10rpx"},showIcon:"",scrollable:"",text:"订单已停止配送调度,请自行操作召唤配送员"})])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"vender-store-money"},[e.unref(a).createDeliveryType?(e.openBlock(),e.createElementBlock("view",{key:1,class:"store"},[e.createElementVNode("view",{class:"vender-name"},[e.createTextVNode(" 门店余额:"),e.createVNode(D,{style:{"font-weight":"bold"},price:e.unref(c),color:"#000"},null,8,["price"])]),e.createElementVNode("view",{class:"right"},[e.createElementVNode("view",{onClick:E[1]||(E[1]=t=>e.unref(N)(4)),class:"btn"},"门店充值")])])):(e.openBlock(),e.createElementBlock("view",{key:0,class:"vender"},[e.createElementVNode("view",{class:"vender-name"},[e.createTextVNode(" 品牌余额:"),e.createVNode(D,{style:{"font-weight":"bold"},price:e.unref(l),color:"#000"},null,8,["price"])]),e.createElementVNode("view",{class:"right"},[e.createElementVNode("view",{class:"btn",onClick:E[0]||(E[0]=t=>e.unref(N)(5))},"品牌充值")])]))]),e.createElementVNode("view",{class:"address-tip"},[e.createElementVNode("view",{class:"addres"},[e.createElementVNode("view",{class:"icon"},[e.createElementVNode("image",{class:"banner",src:"https://image.jxc4.com/image/3ace5cca6d46d1244bfe11d16f00e5f3.png",mode:"scaleToFill"}),e.createElementVNode("view",{class:"text"},[e.createElementVNode("view",null,[e.createElementVNode("text",null,"自送:"),e.createElementVNode("text",{class:"distance",onClick:E[2]||(E[2]=(...t)=>e.unref(S)&&e.unref(S)(...t))},"自送导航")]),e.createElementVNode("image",{class:"address-icon",src:"https://image.jxc4.com/image/5fe6b33dcca1a751a34ce02872b06eb0.png",mode:"scaleToFill"})])]),0==e.unref(a).vendorID?(e.openBlock(),e.createElementBlock("view",{key:0,class:"waybill-price"},[e.createTextVNode(" +"+e.toDisplayString(e.unref(d)),1),e.createElementVNode("text",null,"(平台补贴)")])):e.createCommentVNode("",!0),e.unref(m)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"sd-btn sd-ing-btn"},"正在自送")):(e.openBlock(),e.createElementBlock("view",{key:2,class:"sd-btn",onClick:E[3]||(E[3]=(...t)=>e.unref(p)&&e.unref(p)(...t))},"立即自送"))]),e.createElementVNode("view",{class:"tip"},[e.createElementVNode("view",{class:"icon"},[e.createElementVNode("image",{class:"banner",src:"https://image.jxc4.com/image/2207d32506f746662afc58fe3ea4a148.png",mode:"scaleToFill"}),e.createElementVNode("view",{class:"text"},[e.createElementVNode("text",null,"已加小费:"),e.createVNode(D,{price:e.unref(a).waybillTipMoney,color:"#4eb331"},null,8,["price"])])]),e.createElementVNode("view",{class:"tip-btn",onClick:E[4]||(E[4]=(...t)=>e.unref(y)&&e.unref(y)(...t))},"加小费")])]),e.createElementVNode("view",{class:"delivery-info"},[e.createElementVNode("image",{src:"https://image.jxc4.com/image/d42a9b570418b70930188ac2288b77e1.png",mode:"scaleToFill"}),e.createElementVNode("view",{class:"delivery-status"},[e.createElementVNode("view",{class:"deliver-name"},[e.createTextVNode("当前配送:"),e.createElementVNode("text",null,e.toDisplayString(e.unref(o)),1)]),e.createElementVNode("text",{class:"status"},e.toDisplayString(e.unref(i)||""),1)]),-1!==e.unref(a).waybillVendorID&&e.unref(a).waybillStatus>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"delivery-person"},[e.createElementVNode("view",null,"配送员:"+e.toDisplayString(e.unref(a).courierName),1),e.createElementVNode("view",null,[e.createElementVNode("text",{class:"icon-tel"}),e.unref(a).courierMobile.split(",")[1]?(e.openBlock(),e.createElementBlock("text",{key:0,onClick:E[5]||(E[5]=e.withModifiers(t=>e.unref(n)(e.unref(a).courierMobile),["stop"]))},e.toDisplayString(e.unref(a).courierMobile.split(",")[0]+"转"+e.unref(a).courierMobile.split(",")[1]),1)):(e.openBlock(),e.createElementBlock("text",{key:1,onClick:E[6]||(E[6]=e.withModifiers(t=>e.unref(n)(e.unref(a).courierMobile),["stop"]))},e.toDisplayString(e.unref(a).courierMobile),1))])])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"delivery-person"},[e.createElementVNode("view",null,"配送员:暂无配送员"),e.createElementVNode("view",null,[e.createElementVNode("text",{class:"icon-tel"}),e.createElementVNode("text",null,"暂无配送电话")])])),e.createElementVNode("view",{style:{display:"flex","justify-content":"space-between",border:"none"}},[e.unref(s)[e.unref(a).waybillVendorID]?(e.openBlock(),e.createElementBlock("view",{key:0,class:"money"},[e.createTextVNode("配送费:"),e.createElementVNode("text",{class:"number"},"¥"+e.toDisplayString(e.unref(u)),1)])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"money"},[e.createTextVNode("配送费:"),e.createElementVNode("text",{class:"number"},"暂无配送费")])),-1!==e.unref(a).waybillVendorID&&e.unref(a).waybillStatus>0?(e.openBlock(),e.createElementBlock("view",{key:2,class:"complain",onClick:E[7]||(E[7]=(...t)=>e.unref(_)&&e.unref(_)(...t))},[e.createElementVNode("image",{src:"https://image.jxc4.com/image/d37e46e336ea31132ce343bcd305f8dc.tem.png",style:{width:"40rpx",height:"40rpx"}})])):(e.openBlock(),e.createElementBlock("view",{key:3,class:"complain"}))])])]),e.createElementVNode("view",{class:"bottom-info"},[e.createElementVNode("view",{class:"bg"}),e.createElementVNode("view",{class:"thead"},[Object.keys(e.unref(s)).length>0?(e.openBlock(),e.createElementBlock("view",{key:0},"三方配送("+e.toDisplayString(Object.keys(e.unref(s)).length)+")个",1)):(e.openBlock(),e.createElementBlock("view",{key:1},"暂无三方配送")),e.createElementVNode("view",{class:"right"},[e.createElementVNode("view",{class:"de-money"},"配送费"),e.createElementVNode("view",null,"状态/操作")])]),e.createElementVNode("view",{class:e.normalizeClass(["delivery-flex",{active:e.unref(x)}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,class:"dleivery-list"},[t?(e.openBlock(),e.createBlock(Iu,{key:0,vendor:n,waybillFee:t,orderData:e.unref(a),accountBalance:e.unref(c),sotreID:e.unref(a).jxStoreID,createDeliveryType:e.unref(r),onSwitchStatus:e.unref(k),onRefresh:e.unref(b)},null,8,["vendor","waybillFee","orderData","accountBalance","sotreID","createDeliveryType","onSwitchStatus","onRefresh"])):e.createCommentVNode("",!0)]))),128))],2),e.createElementVNode("view",{class:"cancel-all",onClick:E[8]||(E[8]=t=>e.unref(C)(!1))},"取消所有配送"),e.createElementVNode("view",{class:"stop-schedule",onClick:E[9]||(E[9]=t=>e.unref(C)(!0))},"停止运单调度"),e.createElementVNode("view",{class:"ther-btn",onClick:E[10]||(E[10]=t=>x.value=!e.unref(x))},[e.createTextVNode(e.toDisplayString(e.unref(x)?"收起配送列表":"选择其他配送")+" ",1),e.createElementVNode("text",{class:e.normalizeClass([{rotate:e.unref(x)},"iconfont icon-jiantou_yemian_xiangxia"])},null,2)]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",null,[e.createTextVNode(" (1)打开配送:打开表示使用该平台发单! "),e.createElementVNode("br"),e.createTextVNode(" (2)关闭配送:关闭表示不使用该平台发单! "),e.createElementVNode("br"),e.createTextVNode(" (3)配送费用:此处为配送调度中产生的价格变化情况,非结算费用,仅供参考。 ")])])]),e.createVNode(B,{ref_key:"dyPopup",ref:h,type:"top",isMask:!0},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"dy-root"},[e.createElementVNode("view",{class:"delivering-title"},"填写骑手信息"),e.createVNode(V,{class:"ipt"},{left:e.withCtx(()=>[e.createElementVNode("text",{class:"blod"},"姓名:")]),middle:e.withCtx(()=>[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":E[11]||(E[11]=t=>e.unref(f).name=t),placeholder:"输入骑手名字"},null,512),[[e.vModelText,e.unref(f).name]])]),_:1}),e.createVNode(V,{class:"ipt"},{left:e.withCtx(()=>[e.createElementVNode("text",{class:"blod"},"电话:")]),middle:e.withCtx(()=>[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":E[12]||(E[12]=t=>e.unref(f).tel=t),placeholder:"输入骑手电话"},null,512),[[e.vModelText,e.unref(f).tel]])]),_:1}),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("text",{onClick:E[13]||(E[13]=(...t)=>e.unref(v)&&e.unref(v)(...t)),class:"cancel"},"取消"),e.createElementVNode("text",{onClick:E[14]||(E[14]=(...t)=>e.unref(g)&&e.unref(g)(...t)),class:"confirm"},"确定")])])]),_:1},512),e.createVNode(T)],64)}}}),[["__scopeId","data-v-82f8a2a3"]]);function Vu(){let t="";C(async e=>{t=e.afsOrderID,await async function(){let e={afsOrderID:t},o=await xo(e);0==o.code&&o.data.totalCount>=1?n.value=o.data.data[0]:uni.jxAlert({title:"提示",content:"售后单数据异常",success:()=>{uni.navigateBack()}})}(),await async function(){let e={afsOrderID:t,vendorID:n.value.vendorID},a=await Fo(e);0==a.code?o.value=a.data:uni.jxAlert({title:"提示",content:"售后单数据异常",success:()=>{uni.navigateBack()}})}(),await async function(){let e={vendorOrderID:n.value.vendorOrderID},t=await ho(e);0==t.code&&t.data.totalCount>=1?a.value=t.data.data[0]:uni.jxAlert({title:"提示",content:"售后单数据异常",success:()=>{uni.navigateBack()}})}()});const n=e.ref({vendorOrderID:99});const o=e.ref([]);const a=e.ref({});const r=Nt.serveInfo,i=e.computed(()=>void 0!==n.value.appealType?r.afsAppealTypeName[n.value.appealType]:"未知"),s=e.computed(()=>void 0!==n.value.afsCreatedAt?_t(n.value.afsCreatedAt):""),l=e.computed(()=>void 0!==n.value.status?r.orderStatus[n.value.status]:"未知"),c=e.computed(()=>void 0!==a.value.waybillVendorID?r.vendorName[a.value.waybillVendorID]:"门店自送"),u=e.computed(()=>void 0!==n.value.reasonType?r.afsReasonTypeName[n.value.reasonType]:"未知"),d=e.computed(()=>void 0!==n.value.reasonImgList?n.value.reasonImgList.split(","):[]);async function m(e){let t={afsOrderID:n.value.afsOrderID,vendorID:n.value.vendorID,approveType:e,reason:1===e?"同意退款":f.value},o=await So(t);0==o.code?V("操作成功",1):V(o.desc||o.data)}const p=e.ref(null),f=e.ref();return{afsOrder:n,afsOrderSku:o,orderData:a,afsAppealTypeName:i,createTime:s,afsStatus:l,waybillVendorName:c,afsReason:u,imgList:d,popup:p,handleAgree:function(){uni.jxConfirm({title:"提示",content:"是否同意处理该售后单",success:()=>{m(1)}})},confirmGoods:function(){uni.jxConfirm({title:"提示",content:"是否已收到货",success:async()=>{let e={afsOrderID:n.value.afsOrderID,vendorID:n.value.vendorID},t=await _o(e);0==t.code?(V("操作成功",1),n.value.flag=4):V(t.desc||t.data)}})},reason:f,cancelFn:function(){f.value="",p.value.close()},diaConfirm:function(){f.value?(m(3),f.value="",p.value.close()):V("请输入驳回原因")}}}const Bu=Gn(e.defineComponent({__name:"afterSalesOrderDetail",setup(t){const{previewImage:n,copyInfo:o,phoneCall:a}=tn(),{afsOrder:r,afsOrderSku:i,orderData:s,afsAppealTypeName:l,createTime:c,afsStatus:u,waybillVendorName:d,afsReason:m,imgList:p,popup:f,handleAgree:h,confirmGoods:v,reason:g,cancelFn:y,diaConfirm:k}=Vu();return(t,b)=>{const x=w(e.resolveDynamicComponent("jx-price"),ka),S=w(e.resolveDynamicComponent("uni-popup"),Ca),N=w(e.resolveDynamicComponent("jx-empty"),Jn),C=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[99!=e.unref(r).vendorOrderID?(e.openBlock(),e.createElementBlock("view",{key:0,class:"afsOrder-detail"},[e.createElementVNode("view",{class:"skuList pd20"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),t=>(e.openBlock(),e.createElementBlock("view",{key:t.id},[t.skuID?(e.openBlock(),e.createElementBlock("view",{key:0,class:"sku-item-for-orderdetail"},[e.createElementVNode("view",{class:"img",onClick:o=>e.unref(n)(t.image)},[e.createElementVNode("image",{src:t.image,mode:"scaleToFill"},null,8,["src"])],8,["onClick"]),e.createElementVNode("view",{class:"right"},[e.createElementVNode("view",{class:"sku-name"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"sku-spec"},[e.createElementVNode("view",{class:"sku-price"},[e.createVNode(x,{price:t.shopPrice,size:"28rpx",color:"#f60d58"},null,8,["price"])]),e.createElementVNode("view",{class:"sku-count"},"数量: "+e.toDisplayString(t.count),1)])])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("view",{class:"cell pd20 cell3",onClick:b[0]||(b[0]=t=>e.unref(o)(e.unref(r).vendorOrderID))},[e.createElementVNode("view",null,"订单编号:"+e.toDisplayString(e.unref(r).vendorOrderID),1)]),e.createElementVNode("view",{class:"cell pd20 cell3",onClick:b[1]||(b[1]=t=>e.unref(o)(e.unref(r).afsOrderID))},[e.createElementVNode("view",null," 售后单号:"+e.toDisplayString(e.unref(r).afsOrderID)+"("+e.toDisplayString(e.unref(l))+") ",1)]),e.createElementVNode("view",{class:"cell pd20 cell3"},[e.createElementVNode("view",null,"申请时间:"+e.toDisplayString(e.unref(c)),1)]),e.createElementVNode("view",{class:"cell pd20 cell3"},[e.createElementVNode("view",null,"售后状态:"+e.toDisplayString(e.unref(u)),1)]),e.createElementVNode("view",{class:"cell pd20 cell3"},[e.createElementVNode("view",null,"配送方式:"+e.toDisplayString(e.unref(d)),1)]),e.createElementVNode("view",{class:"cell pd20 cell3",style:{"margin-top":"20rpx"}},[e.createElementVNode("view",null,"售后原因:"+e.toDisplayString(e.unref(m)),1)]),e.createElementVNode("view",{class:"afsWhy"},[e.createElementVNode("view",null,"原因描述:"+e.toDisplayString(e.unref(r).reasonDesc),1)]),e.unref(p).length>0&&e.unref(p)[0]?(e.openBlock(),e.createElementBlock("view",{key:0,class:"imgdesc"},[e.createElementVNode("view",{class:"title"},"售后凭证:"),e.createElementVNode("view",{class:"img-wrapper"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"img-item",key:o,onClick:o=>e.unref(n)(t)},[e.createElementVNode("image",{src:t,mode:"scaleToFill"},null,8,["src"])],8,["onClick"]))),128))])])):e.createCommentVNode("",!0),e.unref(s).consigneeMobile&&!e.unref(s).buyerComment.includes("支付方式")?(e.openBlock(),e.createElementBlock("view",{key:1,class:"userName"},[e.createElementVNode("view",{style:{"font-weight":"bold"}},"客户:"+e.toDisplayString(e.unref(s).consigneeName),1),e.createElementVNode("view",null,[e.unref(s).consigneeMobile?(e.openBlock(),e.createElementBlock("text",{key:0,style:{color:"#4eb331"}},"临:")):e.createCommentVNode("",!0),e.unref(s).consigneeMobile.split(",")[1]?(e.openBlock(),e.createElementBlock("text",{key:1,style:{color:"#4eb331"},onClick:b[2]||(b[2]=e.withModifiers(t=>e.unref(a)(e.unref(s).consigneeMobile),["stop"]))},e.toDisplayString(e.unref(s).consigneeMobile.split(",")[0]+"转"+e.unref(s).consigneeMobile.split(",")[1]),1)):(e.openBlock(),e.createElementBlock("text",{key:2,style:{color:"#4eb331"},onClick:b[3]||(b[3]=e.withModifiers(t=>e.unref(a)(e.unref(s).consigneeMobile),["stop"]))},e.toDisplayString(e.unref(s).consigneeMobile),1)),e.createElementVNode("br"),e.unref(s).consigneeMobile2?(e.openBlock(),e.createElementBlock("text",{key:3,style:{color:"#4eb331"}},"真:")):e.createCommentVNode("",!0),e.unref(s).consigneeMobile2.split(",")[1]?(e.openBlock(),e.createElementBlock("text",{key:4,style:{color:"#4eb331"},onClick:b[4]||(b[4]=e.withModifiers(t=>e.unref(a)(e.unref(s).consigneeMobile2),["stop"]))},e.toDisplayString(e.unref(s).consigneeMobile2.split(",")[0]+"转"+e.unref(s).consigneeMobile2.split(",")[1]),1)):(e.openBlock(),e.createElementBlock("text",{key:5,style:{color:"#4eb331"},onClick:b[5]||(b[5]=e.withModifiers(t=>e.unref(a)(e.unref(s).consigneeMobile2),["stop"]))},e.toDisplayString(e.unref(s).consigneeMobile2),1))])])):e.createCommentVNode("",!0),155!==e.unref(r).status||3&e.unref(r).flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:2,class:"status-155"},[e.createElementVNode("view",{class:"loss"},"若退款造成的损失较大,建议联系顾客,自行上门取回退货。"),e.createElementVNode("view",{class:"btn-group"},[e.createElementVNode("text",{class:"refuse",onClick:b[6]||(b[6]=e.withModifiers(t=>e.unref(f).open(),["stop"]))},"驳回"),e.createElementVNode("text",{class:"agree",onClick:b[7]||(b[7]=e.withModifiers((...t)=>e.unref(h)&&e.unref(h)(...t),["stop"]))},"同意")])])),155===e.unref(r).status&&3&e.unref(r).flag?(e.openBlock(),e.createElementBlock("view",{key:3,class:"afsOrder-flag"},[1==(3&e.unref(r).flag)?(e.openBlock(),e.createElementBlock("text",{key:0},"已【同意】售后")):e.createCommentVNode("",!0),3&~e.unref(r).flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:1},"已【驳回】售后"))])):e.createCommentVNode("",!0),e.unref(r).refuseReason?(e.openBlock(),e.createElementBlock("view",{key:4,class:"refuseReason"}," 驳回理由:"+e.toDisplayString(e.unref(r).refuseReason),1)):e.createCommentVNode("",!0),165!==e.unref(r).status||4&e.unref(r).flag?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:5,class:"status-165",onClick:b[8]||(b[8]=e.withModifiers((...t)=>e.unref(v)&&e.unref(v)(...t),["stop"]))},[e.createElementVNode("text",null,"商家确认收货")])),165===e.unref(r).status&&4&e.unref(r).flag?(e.openBlock(),e.createElementBlock("view",{key:6,class:"afsOrder-flag"},"已确认收货")):e.createCommentVNode("",!0),e.createVNode(S,{type:"top",ref_key:"popup",ref:f,isMask:!0},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"popup"},[e.createElementVNode("view",{class:"title"},"驳回原因"),e.withDirectives(e.createElementVNode("textarea",{class:"textarea","onUpdate:modelValue":b[9]||(b[9]=t=>e.isRef(g)?g.value=t:null),placeholder:"请输入驳回原因"},null,512),[[e.vModelText,e.unref(g),void 0,{trim:!0}]]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("text",{class:"cancel",onClick:b[10]||(b[10]=(...t)=>e.unref(y)&&e.unref(y)(...t))},"取消"),e.createElementVNode("text",{class:"confirm",onClick:b[11]||(b[11]=(...t)=>e.unref(k)&&e.unref(k)(...t))},"确定")])])]),_:1},512)])):(e.openBlock(),e.createBlock(N,{key:1,title:"未找到此订单"})),e.createVNode(C)],64)}}}),[["__scopeId","data-v-287047e3"]]);function Tu(){const t=e.ref(qn.state.storeInfo.allStoreInfo),n=e.ref(""),o=e.ref(0),a=e.ref(""),r=e.ref([]),i=e.ref(1);async function s(){let e={vendorOrderID:n.value,vendorID:o.value},t=await Po(e);return 0==t.code&&null!=t.data?t.data:[]}function l(e,t){return t?(t.forEach(t=>{let n=e.find(e=>e.jxSkuID===t.jxSkuID&&e.storeSubID===t.storeSubID);n.count=n.count-t.count}),u(e)):u(e)}C(async e=>{let t=JSON.parse(e.data);if(n.value=t.vendorOrderID,o.value=+t.vendorID,a.value=t.buyerComment,i.value=+e.type,1==e.type){let e=await s();r.value=l(e,[])}if(2==e.type){let e=await s(),t=await async function(){let e={vendorOrderID:n.value,vendorID:o.value},t=await Fo(e);return 0==t.code&&null!=t.data?t.data:[]}();r.value=l(e,t)}});const c=e.computed(()=>{qn.getters["storeInfo/isNewPriceDisplay"]});function u(e){let t=JSON.parse(JSON.stringify(e));return t.forEach(e=>{e.comparePrice=c.value?e.salePrice>e.shopPrice?(e.shopPrice/100).toFixed(2):(e.salePrice/100).toFixed(2):(e.shopPrice/100).toFixed(2),e.afsCount=0}),t}let d=[];let m="商品缺货";const p=e.ref();let f=null;const h=e.computed(()=>{let e=0;return r.value.forEach(t=>{e+=parseInt(t.count,10)}),e}),v=e.ref(0);let g={};return e.onBeforeUnmount(()=>{clearTimeout(f)}),{skuList:r,partRefundOrder:async function(){var e;if(r.value.forEach(e=>{e.afsCount&&d.push(e)}),0!==d.length)if("支付方式:扫码枪"===a.value){let e=new Map;d.forEach(t=>{e.set(t.jxSkuID,t.afsCount)});let t=Object.fromEntries(e);await No({vendorOrderID:n.value,skuIds:JSON.stringify(t),reason:"协商一致"}),V("创建成功",1)}else 1==i.value&&uni.jxConfirm({title:"退款",content:"是否对该订单进行调整",success:async()=>{p.value.open()}}),2==i.value&&(e=d,uni.jxConfirm({title:"退款",content:"是否对该订单创建售后单\r\n进行【退款】处理",success:async()=>{if(0==h.value){let e={vendorOrderID:n.value,vendorID:o.value,reason:"商家同意退款"},t=await Lo(e);0==t.code?(V("退款成功",1),setTimeout(()=>{uni.navigateBack()},800)):uni.jxAlert({title:"退款失败",content:t.desc||t.data})}if(0!=h.value){e=e.map(e=>({skuID:e.skuID,count:e.afsCount,storeSubID:e.storeSubID}));let t={vendorOrderID:n.value,vendorID:o.value,refundSkuList:JSON.stringify(e),reason:"商家同意退款"},a=await Mo(t);0==a.code?(V("售后单创建成功",1),setTimeout(()=>{uni.navigateBack()},800)):uni.jxAlert({title:"退款失败",content:a.desc||a.data})}}}));else uni.jxAlert({title:"提示",content:"请选择退款商品"})},isNewPriceDisplay:c,storeInfo:t,numChange:function(e,t){g[t.id]=t.shopPrice*e;let n=0;for(const o in g)n+=g[o],v.value=n},refundMoney:v,partRefundReason:m,handleConfirm:async function(){if(0===m.length)return V("请填写退款理由",2);let e=d.map(e=>({skuID:e.skuID,count:e.afsCount,storeSubID:e.storeSubID})),t={vendorOrderID:n.value,vendorID:o.value,removedSkuInfo:JSON.stringify(e),reason:m},a=await jo(t);0==a.code?(V("部分退款成功",1),clearTimeout(f),f=setTimeout(()=>{uni.navigateBack()},800)):uni.jxAlert({title:"退款失败",content:a.desc||a.data}),p.value.close()},onKeyInput:function(e){m=e.detail.value},popup:p}}const Pu=Gn(e.defineComponent({__name:"createAfterSales",setup(t){const{skuList:n,partRefundOrder:o,isNewPriceDisplay:a,storeInfo:r,numChange:i,refundMoney:s,partRefundReason:l,handleConfirm:c,onKeyInput:u,popup:d}=Tu(),{previewImage:m}=tn();return(t,p)=>{const f=e.resolveComponent("uni-number-box"),h=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",null,[e.createElementVNode("view",{class:"header"},[e.createElementVNode("view",{class:"title"},[e.createElementVNode("view",null,"选择退款商品"),e.createElementVNode("view",null,[e.createTextVNode("退款金额: "),e.createElementVNode("text",{class:"refundMoney"},"¥"+e.toDisplayString((e.unref(s)/100).toFixed(2)),1)])]),e.createElementVNode("view",{class:"adjust-btns"},[e.createElementVNode("view",{class:"btn-confirm",onClick:p[0]||(p[0]=(...t)=>e.unref(o)&&e.unref(o)(...t))},"确认退款")])]),e.createElementVNode("view",{class:"sku-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n},[t.skuID?(e.openBlock(),e.createElementBlock("view",{key:0,class:"adjust-sku-cell"},[e.createElementVNode("image",{mode:"scaleToFill",onClick:n=>e.unref(m)(t.image),src:t.image+"?imageView2/1/w/180/h/180"},null,8,["onClick","src"]),!e.unref(a)&&t.storeSubID&&e.unref(r).payPercentage>=50?(e.openBlock(),e.createElementBlock("view",{key:0,style:{left:"10rpx"},class:"promtion-sku-icon2"})):e.createCommentVNode("",!0),!e.unref(a)&&t.salePrice<t.shopPrice&&!t.storeSubID&&e.unref(r).payPercentage>=50?(e.openBlock(),e.createElementBlock("view",{key:1,style:{left:"10rpx"},class:"promtion-sku-icon"})):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"list-right"},[e.createElementVNode("view",{class:e.normalizeClass(["sku-name",{delete:0===t.count}])},e.toDisplayString(t.skuName),3),e.createElementVNode("view",{class:"adjust-count"},[!e.unref(a)&&t.storeSubID&&e.unref(r).payPercentage>=50?(e.openBlock(),e.createElementBlock("view",{key:0,class:"price earning-price"},[e.createElementVNode("text",{class:"price2"},"结算价:¥"+e.toDisplayString(t.earningPrice/100),1)])):!e.unref(a)&&100*t.comparePrice>=t.earningPrice&&t.storeSubID&&e.unref(r).payPercentage>=50?(e.openBlock(),e.createElementBlock("view",{key:1,class:"price"},[e.createElementVNode("text",{class:"price1"},"¥"+e.toDisplayString(t.earningPrice/100),1)])):(e.openBlock(),e.createElementBlock("view",{key:2,class:"price"},[e.createElementVNode("text",{class:"price1"},"¥"+e.toDisplayString(t.comparePrice)+" 共"+e.toDisplayString(-1===t.count?0:t.count)+"份",1)])),e.createElementVNode("view",{class:"adjust-op"},[e.createVNode(f,{min:0,modelValue:t.afsCount,"onUpdate:modelValue":e=>t.afsCount=e,max:t.count,onChange:n=>e.unref(i)(n,t)},null,8,["modelValue","onUpdate:modelValue","max","onChange"])])]),e.createElementVNode("view",{class:"count-to-0"},[e.createElementVNode("view",{class:"count-to-0-wrapper"},[0!=t.afsCount?(e.openBlock(),e.createElementBlock("view",{key:0,class:"text"},[e.createTextVNode(" 将退 "),e.createElementVNode("text",null,e.toDisplayString(t.afsCount),1),e.createTextVNode(" 份 约 "+e.toDisplayString(t.shopPrice*t.afsCount/100)+" 元 ",1)])):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0)]))),128))])]),e.createVNode(h,{ref_key:"popup",ref:d,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("text",{class:"text"},"部分退款"),e.createElementVNode("view",null,[e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"text","onUpdate:modelValue":p[1]||(p[1]=t=>e.isRef(l)?l.value=t:null),placeholder:"请输入退款理由",onInput:p[2]||(p[2]=(...t)=>e.unref(u)&&e.unref(u)(...t))},null,544),[[e.vModelText,e.unref(l)]])]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:p[3]||(p[3]=t=>e.unref(d).close())},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:p[4]||(p[4]=(...t)=>e.unref(c)&&e.unref(c)(...t))},"确定")])])]),_:1},512)],64)}}}),[["__scopeId","data-v-596c8bba"]]),Au=e.defineComponent({__name:"seeMap",setup(t){const n=e.ref(14),o=e.ref(0),a=e.ref(0);C(async e=>{o.value=e.vendorID,a.value=e.vendorOrderID,await async function(e){let t=await g("/v2/order/GetOrders",{vendorOrderID:e});if(0==t.code&&t.data.totalCount>0){let e=t.data.data[0];d.value=e.consigneeAddress,m.value=e,l.value[1].latitude=e.consigneeLat/1e6,l.value[1].longitude=e.consigneeLng/1e6,u.value=function(e,t,n,o){let a=0,r=0,i=Number(e)-Number(n),s=Number(t)-Number(o);a=i>0?Number(e)-Math.abs(i)/2:Number(n)-Math.abs(i)/2;r=s>0?Number(t)-Math.abs(s)/2:Number(o)-Math.abs(s)/2;return[+(1e6*a).toFixed(0)/1e6,+(1e6*r).toFixed(0)/1e6]}(f("lng"),f("lat"),l.value[1].longitude,l.value[1].latitude),async function(e,t,o,a){let r=await s(e,t,o,a);if("0"===r.code){let e=r.data.distance;e<1e3&&(n.value=16),e>1e3&&e<2e3&&(n.value=15),l.value[1].callout.content=`距离门店 ${(r.data.distance/1e3).toFixed(2)}km,点击导航`,r.data.original_data.split(";").forEach(e=>{var t,n,o,a,r,i,s,l,c;p.value[0].points.push((t=Number(e.split(",")[1]),n=Number(e.split(",")[0]),o=52.35987755982988,a=n-.0065,r=t-.006,i=Math.sqrt(a*a+r*r)-2e-5*Math.sin(r*o),s=Math.atan2(r,a)-3e-6*Math.cos(a*o),l=i*Math.sin(s),c=i*Math.cos(s),{latitude:l,longitude:c}))}),await i(r.data),c.value=!0}}(f("lat"),f("lng"),l.value[1].latitude,l.value[1].longitude)}else uni.jxAlert({title:"提示",content:"获取订单数据失败",success:()=>{uni.navigateBack()}})}(e.vendorOrderID)});let r=e.ref(null);async function i(e){if(m.value.waybillVendorID<0)return l.value.pop(),!1;if(e.courier_coordinate&&e.courier_coordinate.length>1)l.value=[{...l.value[0]},{...l.value[1]},{...l.value[2],latitude:e.courier_coordinate.split(",")[1],longitude:e.courier_coordinate.split(",")[0],callout:{...l.value[2].callout,content:""!=e.courierName?e.courierName:"骑手"}}],20===m.value.status&&(r.value=setTimeout(()=>{i({})},3e4));else{let e=await s(f("lat"),f("lng"),l.value[1].latitude,l.value[1].longitude);"0"===e.code&&e.data?i(e.data):(r.value&&clearTimeout(r.value),await async function(){if(m.value.waybillVendorID<0)return l.value.pop(),!1;let e={orderId:a.value,deliveryId:m.value.vendorWaybillID,waybillVendorId:m.value.waybillVendorID,orderVendorId:m.value.vendorID},t=await g("/v2/order/GetRiderLng",e,"POST");if(0==t.code){let e=t.data;l.value[2].latitude=+e.latitude-2e-4,l.value[2].longitude=+e.longitude,l.value[2].callout.content=""!=e.courier_name?e.logistics_context:"骑手"}else V("获取骑手位置异常")}())}}async function s(e,t,n,o){let r={sLng:1e6*t,sLat:1e6*e,uLng:1e6*o,uLat:Math.ceil(1e6*n),orderId:a.value};return await g("/v2/cms/GetSToURidingDistance2",r)}_(()=>{r.value&&clearTimeout(r.value)});const l=e.ref([{id:1,latitude:f("lat"),longitude:f("lng"),iconPath:"https://image.jxc4.com/image/f68d3785990263a4877ef8e2c4cb3412.png",width:45,height:45,callout:{content:f("storeName"),color:"#fff",fontSize:"16",borderWidth:"2",borderColor:"#fff",borderRadius:"4",bgColor:"#f73d7a",padding:"4",textAlign:"center",display:"ALWAYS"}},{id:2,latitude:"",longitude:"",iconPath:"https://image.jxc4.com/image/0290331b1be31d7c327a6e60fcf353ea.png",width:45,height:45,callout:{content:"",color:"#000",fontSize:"16",borderWidth:"2",borderColor:"#fff",borderRadius:"4",bgColor:"#fbcf53",padding:"4",textAlign:"center",display:"ALWAYS"}},{id:3,latitude:"",longitude:"",iconPath:"https://image.jxc4.com/image/6114b7e2e9738d3a4bc6eb9cd1ecb6a5.png",width:45,height:45,alpha:.8,callout:{content:"",color:"#fff",fontSize:"16",borderWidth:"2",borderColor:"#fff",borderRadius:"4",bgColor:"#207ce0",padding:"4",textAlign:"center",display:"ALWAYS"}}]),c=e.ref(!1),u=e.ref([]),d=e.ref(""),m=e.ref({});const p=e.ref([{points:[],color:"#00cafa",width:12,arrowLine:!0,borderColor:"#087ab8",borderWidth:3}]);function h(e,t,n){1!=e.detail.markerId&&3!=e.detail.markerId&&uni.openLocation({latitude:t,longitude:n,name:d.value,address:"客户地址",scale:16})}function g(e,t,n="GET"){return"jxgy"==f("terrace")?e="/jxgy"+e:"gblm"==f("terrace")&&(e="/gblm"+e),new Promise((o,a)=>{uni.request({url:"https://wx.jxc4.com"+e,method:n,timeout:3e4,data:t,header:{"content-type":"application/x-www-form-urlencoded",token:f("token")?f("token"):"jxcs"},success:e=>{if(e.statusCode>=200&&e.statusCode<300)if("-2"==e.data.code)uni.jxAlert({title:"提示",content:"登录信息已过期",confirmText:"重新登录",success:()=>{v(),uni.reLaunch({url:"/subPages/login/wxLogin/wxLogin"})}});else{let t=e.data;t.data=JSON.parse(t.data)||t.data,o(t)}else uni.jxAlert({title:"提示",content:"获取订单数据失败",success:()=>{uni.navigateBack()}})}})})}return(t,o)=>c.value?(e.openBlock(),e.createElementBlock("map",{key:0,onMarkertap:o[0]||(o[0]=e=>h(e,l.value[1].latitude,l.value[1].longitude)),onCallouttap:o[1]||(o[1]=e=>h(e,l.value[1].latitude,l.value[1].longitude)),style:{width:"100vw",flex:"1"},longitude:u.value[0],latitude:u.value[1],markers:l.value,scale:n.value},null,40,["longitude","latitude","markers","scale"])):e.createCommentVNode("",!0)}}),Ou=e.defineComponent({__name:"complaint",setup(t){let n="",o=e.ref("");const a=e.ref(),r=e.ref(1),i=e.ref(-1);let s="";C(async e=>{n=e.vendorOrderID,e.type&&"current"===e.type?(a.value=JSON.parse(e.orderData),o.value=e.type||"",s=e.vendorWaybillID):await async function(e){const t=await Ao({vendorOrderID:e});0==t.code&&null!=t.data?c.value=t.data:uni.jxAlert({title:"提示",content:"官方配送不支持投诉,只能投诉三方配送",success:()=>{uni.navigateBack()}})}(n)});const l=e.computed(()=>Nt.serveInfo),c=e.ref([]);async function u(){if(-1==i.value&&!o.value)return V("请选择要投诉的骑手");let e={};e=o.value?{vendorOrderID:a.value.vendorOrderID,vendorID:a.value.vendorID,waybillVendorID:a.value.waybillVendorID,complaintID:+r.value,waybillID:a.value.vendorWaybillID}:{vendorOrderID:n,waybillVendorID:s,complaintID:+r.value};let t=await Oo(e);0==t.code?uni.jxAlert({title:"投诉成功",content:"老板消消气,投诉成功啦!",success:()=>{uni.navigateBack()}}):uni.jxAlert({title:"投诉失败",content:t.desc,success:()=>{uni.navigateBack()}})}return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"comment-root"},[e.createElementVNode("view",{class:"title"},"投诉骑手原因"),e.createElementVNode("view",{class:"fail-root"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value.complaintReasons,(t,n)=>(e.openBlock(),e.createElementBlock("text",{class:e.normalizeClass(["item",{failActive:n==r.value}]),key:n,onClick:e=>function(e,t){r.value=t}(0,n)},e.toDisplayString(t),11,["onClick"]))),128))]),e.unref(o)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"deliveryList"},[e.createElementVNode("view",{class:"title"},"选择投诉的骑手"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,n)=>(e.openBlock(),e.createElementBlock("text",{class:e.normalizeClass([{deliveryActive:n==i.value},"item"]),key:n,onClick:e=>function(e,t){i.value=t,s=e.vendorWaybillID}(t,n)},e.toDisplayString(l.value.vendorName[t.waybillVendorID])+"- "+e.toDisplayString(t.courierName||"骑手")+"- "+e.toDisplayString(l.value.waybillStatus[t.status]),11,["onClick"]))),128))])),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("text",{class:"submit",onClick:u},"确认投诉")])]))}}),Mu=Gn(Ou,[["__scopeId","data-v-3883b598"]]);const Lu=Gn({},[["render",function(t,n){return e.openBlock(),e.createElementBlock("web-view",{src:"https://wx.jxc4.com/helpcenter"})}]]);function ju(){const{globGetToDay:t}=tn(),{singleCalcPrice:n}=tn(),o=e.ref(!0),a=e.ref(!0),r=e.ref(!0);C(e=>{v.value=e._vendorPayPercentage,o.value=JSON.parse(e.isNotQuote),a.value=JSON.parse(e.isZero),r.value=JSON.parse(e.isUpperfif)}),C(async()=>{await async function(){let e={storeID:f("storeID")},t=await un.get_stores(e);if(0==t.code){let e=Nt.serveInfo;t.data.stores[0].StoreMaps.forEach(t=>{i.value.push({vendorID:t.vendorID,vendorStoreName:`${e.vendorName[t.vendorID]?e.vendorName[t.vendorID]:"未知平台"}`,vendorPayPercentage:t.vendorPayPercentage})})}else V("平台数据异常",2)}(),await b(0),await d(),await c()});const i=e.ref([{vendorID:-1,vendorStoreName:"全部"}]),s=e.ref("0");const l=e.ref({});async function c(){let e=`${Et()} 00:00:00`,n=`${Et()} 23:59:59`,o={storeIDs:`[${parseInt(f("storeID"))}]`,fromTime:e,toTime:n,statuss:JSON.stringify([110])},a=await t(o);a||(a=[]),l.value=h(a)}const u=e.ref({});async function d(){let e={storeIDs:`[${parseInt(f("storeID"))}]`,fromTime:`${k.value} 00:00:00`,toTime:`${w.value} 23:59:59`,statuss:JSON.stringify([110])},n=await t(e);n||(n=[]),u.value=h(n)}const m=e.ref(!0),p=e.ref(0);function h(e){let t=i.value[+s.value].vendorID;p.value=t;let n=0,o=0,a=0,r=0,l=0,c=0,u=0,d=0,f=0,h=0,v=0,g=0;return-1===t?(e.forEach(e=>{f+=e.waybillTipMoney,g+=e.serverFee,110===e.status?(h+=e.distanceFreightMoney,o+=e.platformSettlement,a+=e.earningPrice,r+=e.shopPrice,l+=e.count,n+=e.actualPayPrice,v+=e.actualFee):115===e.status?c+=e.count:e.status<0&&(u+=e.earningPrice,d+=e.count)}),m.value=!0):(e.forEach(e=>{f+=e.waybillTipMoney,g+=e.serverFee,110===e.status&&e.vendorID===t&&(h+=e.distanceFreightMoney,o+=e.platformSettlement,a+=e.earningPrice,r+=e.shopPrice,l+=e.count,n+=e.actualPayPrice,v+=e.actualFee),115===e.status&&e.vendorID===t&&(c+=e.count),e.status<0&&e.vendorID===t&&(u+=e.earningPrice,d+=e.count)}),m.value=!1),v=+(v/100).toFixed(2),{actualPayPrice:n,earningPrice:a,shopPrice:r,count:l,cancelCount:c,afsPrice:u,afsCount:d,waybillTipMoney:f,distanceFreightMoney:h,realEarningPrice:o,actualFee:v,serverFee:g}}const v=e.ref(0);const g=e.ref(["昨日","近7日","近30日","自定义"]),y=e.ref(0),k=e.ref(""),w=e.ref("");async function b(e){switch(e){case 0:k.value=`${Et(+(new Date).getTime()-864e5)}`,w.value=`${Et(+(new Date).getTime()-864e5)}`;break;case 1:case 3:k.value=`${Et(+(new Date).getTime()-5184e5)}`,w.value=Et();break;case 2:k.value=`${Et(+(new Date).getTime()-25056e5)}`,w.value=Et()}y.value!=e&&(y.value=e,await E(y.value),await d())}const x=e.computed(()=>qn.getters["storeInfo/isPointStore"]),S=e.computed(()=>{if(_.value){if(u.value.count){let e={vendorPayPercentage:v.value,actualPayPrice:u.value.actualPayPrice,shopPrice:u.value.shopPrice,isPointStore:x.value,earningPrice:u.value.earningPrice};return n(e)}return 0}if(!_.value)return x.value?u.value.realEarningPrice?(u.value.realEarningPrice/100).toFixed(2):0:u.value.shopPrice?(u.value.shopPrice/100).toFixed(2):0}),N=e.computed(()=>_.value?x.value||0!=v.value&&v.value<50?"实际支付":"实际收入":x.value?"平台结算":"实际收入"),_=e.ref(!0);async function E(e){await async function(e){let t={storeID:f("storeID"),vendorID:e},n=await un.get_store_vendor_maps(t);if(0==n.code){let e=n.data;v.value=e[0].vendorPayPercentage}else v.value=0}(p.value),_.value=0==e}const I=e.computed(()=>u.value.waybillTipMoney?(u.value.waybillTipMoney/100).toFixed(2):"0.00"),D=e.computed(()=>x.value?u.value.distanceFreightMoney?(u.value.distanceFreightMoney/100).toFixed(2):"0.00":u.value.serverFee?(u.value.serverFee/100).toFixed(2):"0.00"),B=e.computed(()=>u.value.afsPrice?(u.value.afsPrice/100).toFixed(2):"0.00");return e.onBeforeUnmount(()=>{Mt()}),{vendorArr:i,handleVendorChange:async function(e){s.value=e.detail.value,await E(y.value),await d(),await c()},explain:function(){uni.jxAlert({title:"说明",content:"实际收入: 从当日0时到当前时间的实际获得,不再扣点,已扣除售后退款\r\n 有效订单: 统计时间内,已支付订单中未被取消的订单数量。\r\n取消订单: 统计时间内,取消订单的数量。\r\n订单取消率: 取消订单/(有效订单 + 取消订单)"})},tabArr:g,active:y,tabClick:b,fromTime:k,toTime:w,saleInfo:u,fnChangeFrom:function(e){k.value=e.detail.value},fnChangeTo:function(e){w.value=e.detail.value},pickValue:s,getFromTime:d,toDaySaleInfo:l,isAllplatfrom:m,isNotQuote:o,_vendorPayPercentage:v,isZero:a,isUpperfif:r,price:S,vendortitle:N,waybillTipMoney:I,distanceFreightMoney:D,afsPrice:B,isPointStore:x}}const Fu=Gn(e.defineComponent({__name:"orderRealTime",setup(t){const{vendorArr:n,handleVendorChange:o,explain:a,tabArr:r,active:i,tabClick:s,fromTime:l,toTime:c,saleInfo:u,fnChangeFrom:d,fnChangeTo:m,pickValue:p,getFromTime:f,toDaySaleInfo:h,isAllplatfrom:v,_vendorPayPercentage:g,isNotQuote:y,isZero:k,isUpperfif:b,price:x,vendortitle:S,waybillTipMoney:N,distanceFreightMoney:C,afsPrice:_,isPointStore:E}=ju();return(t,I)=>{const D=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("picker",{onChange:I[0]||(I[0]=(...t)=>e.unref(o)&&e.unref(o)(...t)),"range-key":"vendorStoreName",range:e.unref(n)},[e.createElementVNode("view",{class:"select-root"},[e.createElementVNode("text",{class:"all-text"},e.toDisplayString(e.unref(n)[+e.unref(p)].vendorStoreName),1),e.createElementVNode("text",{class:"slect-text"},"选择平台")])],40,["range"]),e.createVNode(pa,{saleInfo:e.unref(h),showline:!0,isAllplatfrom:e.unref(v),_vendorPayPercentage:e.unref(g),isNotQuote:e.unref(y),isZero:e.unref(k),isUpperfif:e.unref(b)},null,8,["saleInfo","isAllplatfrom","_vendorPayPercentage","isNotQuote","isZero","isUpperfif"]),e.createElementVNode("view",{class:"business-status"},[e.createElementVNode("view",{class:"business-text"},[e.createElementVNode("text",null,"营业概况 "),e.createVNode(Yn,{icon:"wenhaoxiao",color:"#cfcccc",onClick:e.withModifiers(e.unref(a),["stop"])},null,8,["onClick"])]),e.createElementVNode("view",{class:"slect-item-root"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(t,n)=>(e.openBlock(),e.createElementBlock("text",{class:e.normalizeClass(["item",{"item-active":n==e.unref(i)}]),key:n,onClick:t=>e.unref(s)(n)},e.toDisplayString(t),11,["onClick"]))),128))]),e.createElementVNode("view",{class:"time-root"},[3==e.unref(i)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"slect-edit"},[e.createElementVNode("picker",{value:e.unref(l),mode:"date",onChange:I[1]||(I[1]=(...t)=>e.unref(d)&&e.unref(d)(...t)),end:e.unref(Et)(+new Date)},[e.createElementVNode("view",{class:"time-item"},[e.createVNode(Yn,{icon:"xiangzuojiantou",size:28,color:"#919191"}),e.createElementVNode("text",null,e.toDisplayString(e.unref(l)),1),e.createVNode(Yn,{icon:"xiangyoujiantou",size:28,color:"#919191"})])],40,["value","end"]),e.createElementVNode("text",{class:"middle-text"},"至"),e.createElementVNode("picker",{value:e.unref(c),mode:"date",onChange:I[2]||(I[2]=(...t)=>e.unref(m)&&e.unref(m)(...t)),end:e.unref(Et)(+new Date)},[e.createElementVNode("view",{class:"time-item"},[e.createVNode(Yn,{icon:"xiangzuojiantou",size:28,color:"#919191"}),e.createElementVNode("text",null,e.toDisplayString(e.unref(c)),1),e.createVNode(Yn,{icon:"xiangyoujiantou",size:28,color:"#919191"})])],40,["value","end"]),e.createElementVNode("button",{size:"mini",onClick:I[3]||(I[3]=(...t)=>e.unref(f)&&e.unref(f)(...t))},"查询")])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"no-edit"},[e.createElementVNode("text",null,e.toDisplayString(e.unref(l)),1),e.createTextVNode(" 至 "),e.createElementVNode("text",null,e.toDisplayString(e.unref(c)),1)]))]),e.createElementVNode("view",{class:"money-data-root"},[e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"money-item active"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(x)),1),e.createElementVNode("text",null,e.toDisplayString(e.unref(S)),1)]),e.createElementVNode("view",{class:"money-item"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(u).count||"0"),1),e.createElementVNode("text",null,"有效订单量")])]),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"money-item active"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(u).cancelCount||"0"),1),e.createElementVNode("text",null,"取消订单")]),e.createElementVNode("view",{class:"money-item"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:e.unref(u).actualFee>0}])},e.toDisplayString(e.unref(u).actualFee||0),3),e.createElementVNode("text",null,"运费")])]),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"money-item active"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:+e.unref(_)>0}])},e.toDisplayString(e.unref(_)),3),e.createElementVNode("text",null,"售后退款")]),e.createElementVNode("view",{class:"money-item"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(u).afsCount||"0"),1),e.createElementVNode("text",null,"售后单量")])]),e.createElementVNode("view",{class:"row-last"},[e.createElementVNode("view",{class:"money-item active"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:+e.unref(N)>0}])},e.toDisplayString(e.unref(N)),3),e.createElementVNode("text",null,"配送小费")]),e.createElementVNode("view",{class:"money-item"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:+e.unref(C)>0}])},e.toDisplayString(e.unref(C)),3),e.createElementVNode("text",null,e.toDisplayString(e.unref(E)?"远距离费":"服务费"),1)])])])]),e.createVNode(D)],64)}}}),[["__scopeId","data-v-209ba2a7"]]);function Uu(){const{globGetToDay:t}=tn();C(async()=>{await async function(){let e={storeID:f("storeID")},t=await un.get_stores(e);if(0==t.code){let e=Nt.serveInfo;t.data.stores[0].StoreMaps.forEach(t=>{n.value.push({vendorID:t.vendorID,vendorStoreName:`${e.vendorName[t.vendorID]?e.vendorName[t.vendorID]:"未知平台"}`,vendorPayPercentage:t.vendorPayPercentage})})}else V("平台数据异常",2)}(),await h(0),await s(),await r()});const n=e.ref([{vendorID:-1,vendorStoreName:"全部"}]),o=e.ref("0");const a=e.ref({});async function r(){let e=`${Et()} 00:00:00`,n=`${Et()} 23:59:59`,o={storeIDs:`[${parseInt(f("storeID"))}]`,fromTime:e,toTime:n},r=await t(o);r||(r=[]),a.value=c(r)}const i=e.ref({});async function s(){let e={storeIDs:`[${parseInt(f("storeID"))}]`,fromTime:`${m.value} 00:00:00`,toTime:`${p.value} 23:59:59`},n=await t(e);n||(n=[]),i.value=c(n)}const l=e.ref(0);function c(e){let t=n.value[+o.value].vendorID;l.value=t;let a=0,r=0,i=0,s=0,c=0,u=0,d=0,m=0,p=0,f=0,h=0,v=0;return-1===t?e.forEach(e=>{p+=e.waybillTipMoney,v+=e.serverFee,110===e.status?(f+=e.distanceFreightMoney,r+=e.realEarningPrice,i+=e.earningPrice,s+=e.shopPrice,c+=e.count,a+=e.actualPayPrice,h+=e.actualFee):115===e.status?u+=e.count:e.status<0&&(d+=e.earningPrice,m+=e.count)}):e.forEach(e=>{p+=e.waybillTipMoney,v+=e.serverFee,110===e.status&&e.vendorID===t&&(f+=e.distanceFreightMoney,r+=e.realEarningPrice,i+=e.earningPrice,s+=e.shopPrice,c+=e.count,a+=e.actualPayPrice,h+=e.actualFee),115===e.status&&e.vendorID===t&&(u+=e.count),e.status<0&&e.vendorID===t&&(d+=e.earningPrice,m+=e.count)}),h=+(h/100).toFixed(2),{actualPayPrice:a,earningPrice:i,shopPrice:s,count:c,cancelCount:u,cancelPercentage:"0.00%",afsPrice:d,afsCount:m,waybillTipMoney:p,distanceFreightMoney:f,realEarningPrice:r,actualFee:h,serverFee:v}}const u=e.ref(["昨日","近7日","近30日","自定义"]),d=e.ref(0),m=e.ref(""),p=e.ref("");async function h(e){switch(e){case 0:m.value=`${Et(+(new Date).getTime()-864e5)}`,p.value=`${Et(+(new Date).getTime()-864e5)}`;break;case 1:case 3:m.value=`${Et(+(new Date).getTime()-5184e5)}`,p.value=Et();break;case 2:m.value=`${Et(+(new Date).getTime()-25056e5)}`,p.value=Et()}d.value!=e&&(d.value=e,await s())}const v=e.computed(()=>qn.getters["storeInfo/isPointStore"]),g=e.computed(()=>i.value.realEarningPrice?(i.value.realEarningPrice/100).toFixed(2):"0.00"),y=e.computed(()=>i.value.waybillTipMoney?(i.value.waybillTipMoney/100).toFixed(2):"0.00"),k=e.computed(()=>i.value.distanceFreightMoney?(i.value.distanceFreightMoney/100).toFixed(2):"0.00"),w=e.computed(()=>i.value.afsPrice?(i.value.afsPrice/100).toFixed(2):"0.00");return{vendorArr:n,handleVendorChange:async function(e){o.value=e.detail.value,await s(),await r()},explain:function(){uni.jxAlert({title:"说明",content:"实际收入: 从当日0时到当前时间的实际获得,不再扣点,已扣除售后退款\r\n 有效订单: 统计时间内,已支付订单中未被取消的订单数量。\r\n取消订单: 统计时间内,取消订单的数量。\r\n订单取消率: 取消订单/(有效订单 + 取消订单)"})},tabArr:u,active:d,tabClick:h,fromTime:m,toTime:p,saleInfo:i,fnChangeFrom:function(e){m.value=e.detail.value},fnChangeTo:function(e){p.value=e.detail.value},pickValue:o,getFromTime:s,toDaySaleInfo:a,price:g,waybillTipMoney:y,distanceFreightMoney:k,afsPrice:w,isPointStore:v}}const $u=Gn(e.defineComponent({__name:"orderRealTimeJxgy",setup(t){const{vendorArr:n,handleVendorChange:o,explain:a,tabArr:r,active:i,tabClick:s,fromTime:l,toTime:c,saleInfo:u,fnChangeFrom:d,fnChangeTo:m,pickValue:p,getFromTime:f,toDaySaleInfo:h,price:v,waybillTipMoney:g,distanceFreightMoney:y,afsPrice:k,isPointStore:b}=Uu();return(t,x)=>{const S=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("picker",{onChange:x[0]||(x[0]=(...t)=>e.unref(o)&&e.unref(o)(...t)),"range-key":"vendorStoreName",range:e.unref(n)},[e.createElementVNode("view",{class:"select-root"},[e.createElementVNode("text",{class:"all-text"},e.toDisplayString(e.unref(n)[+e.unref(p)].vendorStoreName),1),e.createElementVNode("text",{class:"slect-text"},"选择平台")])],40,["range"]),e.createVNode(fa,{saleInfo:e.unref(h),showline:!1},null,8,["saleInfo"]),e.createElementVNode("view",{class:"business-status"},[e.createElementVNode("view",{class:"business-text"},[e.createElementVNode("text",null,"营业概况 "),e.createVNode(Yn,{icon:"wenhaoxiao",color:"#cfcccc",onClick:e.withModifiers(e.unref(a),["stop"])},null,8,["onClick"])]),e.createElementVNode("view",{class:"slect-item-root"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(t,n)=>(e.openBlock(),e.createElementBlock("text",{class:e.normalizeClass(["item",{"item-active":n==e.unref(i)}]),key:n,onClick:t=>e.unref(s)(n)},e.toDisplayString(t),11,["onClick"]))),128))]),e.createElementVNode("view",{class:"time-root"},[3==e.unref(i)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"slect-edit"},[e.createElementVNode("picker",{value:e.unref(l),mode:"date",onChange:x[1]||(x[1]=(...t)=>e.unref(d)&&e.unref(d)(...t)),end:e.unref(Et)(+new Date)},[e.createElementVNode("view",{class:"time-item"},[e.createVNode(Yn,{icon:"xiangzuojiantou",size:28,color:"#919191"}),e.createElementVNode("text",null,e.toDisplayString(e.unref(l)),1),e.createVNode(Yn,{icon:"xiangyoujiantou",size:28,color:"#919191"})])],40,["value","end"]),e.createElementVNode("text",{class:"middle-text"},"至"),e.createElementVNode("picker",{value:e.unref(c),mode:"date",onChange:x[2]||(x[2]=(...t)=>e.unref(m)&&e.unref(m)(...t)),end:e.unref(Et)(+new Date)},[e.createElementVNode("view",{class:"time-item"},[e.createVNode(Yn,{icon:"xiangzuojiantou",size:28,color:"#919191"}),e.createElementVNode("text",null,e.toDisplayString(e.unref(c)),1),e.createVNode(Yn,{icon:"xiangyoujiantou",size:28,color:"#919191"})])],40,["value","end"]),e.createElementVNode("button",{size:"mini",onClick:x[3]||(x[3]=(...t)=>e.unref(f)&&e.unref(f)(...t))},"查询")])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"no-edit"},[e.createElementVNode("text",null,e.toDisplayString(e.unref(l)),1),e.createTextVNode(" 至 "),e.createElementVNode("text",null,e.toDisplayString(e.unref(c)),1)]))]),e.createElementVNode("view",{class:"money-data-root"},[e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"money-item active"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(v)),1),e.createElementVNode("text",null,"门店收益")]),e.createElementVNode("view",{class:"money-item"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(u).count||"0"),1),e.createElementVNode("text",null,"有效订单量")])]),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"money-item active"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(u).cancelCount||"0"),1),e.createElementVNode("text",null,"取消订单")]),e.createElementVNode("view",{class:"money-item"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:e.unref(u).actualFee>0}])},e.toDisplayString(e.unref(u).actualFee||0),3),e.createElementVNode("text",null,"运费")])]),e.createElementVNode("view",{class:"row"},[e.createElementVNode("view",{class:"money-item active"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:+e.unref(k)>0}])},e.toDisplayString(e.unref(k)),3),e.createElementVNode("text",null,"售后退款")]),e.createElementVNode("view",{class:"money-item"},[e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(u).afsCount||"0"),1),e.createElementVNode("text",null,"售后单量")])]),e.createElementVNode("view",{class:"row-last"},[e.createElementVNode("view",{class:"money-item active"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:+e.unref(g)>0}])},e.toDisplayString(e.unref(g)),3),e.createElementVNode("text",null,"配送小费")]),e.createElementVNode("view",{class:"money-item"},[e.createElementVNode("text",{class:e.normalizeClass(["number",{afterNumber:+e.unref(y)>0}])},e.toDisplayString(e.unref(y)),3),e.createElementVNode("text",null,e.toDisplayString(e.unref(b)?"远距离费":"服务费"),1)])])])]),e.createVNode(S)],64)}}}),[["__scopeId","data-v-45af9162"]]),Ru=Gn(e.defineComponent({__name:"platformM",setup(t){C(async()=>{await async function(){let e={storeID:f("storeID")},t=await un.get_stores(e);n.value=t.data.stores[0].StoreMaps,qn.getters["storeInfo/platformInfo"].forEach(e=>{let t=n.value.findIndex(t=>t.vendorID===e.vendorID);-1!==t&&(n.value[t].status=e.status)})}()});const n=e.ref([]);const o=e.computed(()=>Nt.serveInfo.vendorName),a=e.computed(()=>qn.getters["storeInfo/geterPointStore"]);return(t,r)=>{const i=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[0!=n.value.length?(e.openBlock(),e.createElementBlock("view",{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,t=>(e.openBlock(),e.createElementBlock("view",{key:t.vendorStoreID,class:"cell",onClick:e=>function(e){1!==e.vendorID&&3!==e.vendorID||qn.getters["storeInfo/storeStatus"]===e.status||uni.navigateTo({url:`/subPages/merchantChild/platformDetail/index?vendorInfo=${JSON.stringify(e)}`})}(t)},[e.createElementVNode("view",{class:"left"},[e.createElementVNode("view",{class:"vendor"},[e.createElementVNode("text",{class:e.normalizeClass(`icon icon-${t.vendorID}`)},null,2),e.createElementVNode("view",{class:"vendor-name"},[e.createElementVNode("view",null,e.toDisplayString(o.value[t.vendorID]?o.value[t.vendorID]:"未知平台"),1),e.createElementVNode("view",null,e.toDisplayString(t.isSync?"(自动同步)":"(未同步)"),1)])]),e.createElementVNode("view",{class:"original-name name-active"},e.toDisplayString(t.vendorStoreName),1),e.createElementVNode("text",{class:"packname"},e.toDisplayString(t.pricePercentagePack),1),1!==t.vendorID&&3!==t.vendorID||e.unref(qn).getters["storeInfo/storeStatus"]===t.status?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,style:{width:"100px"}},[e.createElementVNode("view",{class:"do-business-root business-active"},[e.createElementVNode("text",{class:"text"},e.toDisplayString(1===t.status?"营业中":0===t.status?"临时休息":-1===t.status?"休息":-2===t.status?"禁用":"未知"),1)])]))]),e.createElementVNode("view",{class:"right"},[a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn2",size:"mini",onClick:e.withModifiers(e=>{return n=t,void uni.navigateTo({url:`/subPages/merchantChild/modifyPrice/modifyPrice?vendorID=${n.vendorID}&key=${n.pricePercentagePack}`});var n},["stop"])}," 加价比例 ",8,["onClick"]))])],8,["onClick"]))),128))])):(e.openBlock(),e.createBlock(Jn,{key:1,title:"您还没有开通任何店铺哟"})),e.createVNode(i)],64)}}}),[["__scopeId","data-v-618a69ba"]]),zu=e.defineComponent({__name:"modifyPrice",setup(t){const n=e.ref(""),o=e.ref("");C(async e=>{n.value=null==e?void 0:e.vendorID,o.value=null==e?void 0:e.key,await async function(){let e={type:"PricePack",key:o.value},t=await un.query_configs(e);if(0==t.code){i.value=!1;let e=JSON.parse(t.data[0].value);for(let t of e)t.priceAdd=(t.priceAdd/100).toFixed(2);a.value=e,r.value=JSON.parse(JSON.stringify(e)),r.value=r.value.map(e=>({beginPrice:e.beginPrice/100,pricePercentage:e.pricePercentage,priceAdd:e.priceAdd?e.priceAdd:0,id:Math.random().toString(16).slice(8)}))}else i.value=!0,V("调价包数据错误",2)}()});const a=e.ref([]),r=e.ref([]),i=e.ref(!0);const s=e.ref(!1);function l(){d.value?s.value=!0:uni.jxAlert({title:"提示",content:"无法修改调价包"})}let c=null;function u(){uni.jxConfirm({title:"提示",content:"确定要修改调价包吗?",success:async()=>{let e={storeID:+f("storeID"),vendorID:+n.value,pricePack:o.value,value:JSON.stringify(r.value.map(e=>({beginPrice:100*e.beginPrice,pricePercentage:e.pricePercentage,priceAdd:100*e.priceAdd})))};0==(await un.update_store_price_pack(e)).code?(V("修改成功",1),clearTimeout(c),c=setTimeout(()=>{uni.navigateBack()},1e3)):V("修改失败",2)}})}const d=e.computed(()=>qn.getters["storeInfo/isPointStore"]);function m(){r.value=r.value.concat({id:Math.random().toString(16).slice(8),beginPrice:0,pricePercentage:100,priceAdd:0})}return e.onBeforeUnmount(()=>{clearTimeout(c)}),(t,n)=>{const o=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?(e.openBlock(),e.createBlock(Jn,{key:0,title:"未获取到调价包"})):(e.openBlock(),e.createElementBlock("view",{key:1},[e.withDirectives(e.createElementVNode("view",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"price-value",key:n},[e.createElementVNode("view",{class:"price-item"},[e.createElementVNode("view",{class:"s1 common"},[e.createElementVNode("text",null,"开始价格:"),e.createElementVNode("text",{class:"num"},"¥"+e.toDisplayString(t.beginPrice/100),1)]),e.createElementVNode("view",{class:"s2 common"},[e.createElementVNode("text",null,"提高:"),e.createElementVNode("text",{class:"num"},e.toDisplayString(t.pricePercentage)+"%",1)]),e.createElementVNode("view",{class:"s3 common"},[e.createElementVNode("text",null,"再加:"),e.createElementVNode("text",{class:"num"},e.toDisplayString(t.priceAdd?t.priceAdd:0),1)])])]))),128)),e.createElementVNode("button",{class:"btn",onClick:l},"修改")],512),[[e.vShow,!s.value]]),e.withDirectives(e.createElementVNode("view",{class:"modal"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"price-value",key:n},[e.createElementVNode("view",{class:"price-item"},[e.createElementVNode("view",{class:"news1 common"},[e.createElementVNode("text",null,"开始价格:"),e.withDirectives(e.createElementVNode("input",{type:"number",class:"num num-ipt","onUpdate:modelValue":e=>t.beginPrice=e},null,8,["onUpdate:modelValue"]),[[e.vModelText,t.beginPrice]]),e.createTextVNode("¥ ")]),e.createElementVNode("view",{class:"news2 common"},[e.createElementVNode("text",null,"提高:"),e.withDirectives(e.createElementVNode("input",{type:"number",class:"num num-ipt","onUpdate:modelValue":e=>t.pricePercentage=e},null,8,["onUpdate:modelValue"]),[[e.vModelText,t.pricePercentage]]),e.createTextVNode("% ")]),e.createElementVNode("view",{class:"news3 common"},[e.createElementVNode("text",null,"再加:"),e.withDirectives(e.createElementVNode("input",{type:"number",class:"num num-ipt3","onUpdate:modelValue":e=>t.priceAdd=e},null,8,["onUpdate:modelValue"]),[[e.vModelText,t.priceAdd]]),e.createTextVNode("¥ ")]),e.createVNode(Yn,{class:"icon-x common",icon:"shanchu",onClick:e=>function(e,t){if(0==t)return V("禁止删除",2);r.value=r.value.filter(t=>t.id!==e)}(t.id,n),color:"rgb(230, 3, 3)"},null,8,["onClick"])])]))),128)),e.createElementVNode("view",{class:"btn-group"},[e.createElementVNode("button",{size:"mini",class:"btn2",onClick:n[0]||(n[0]=e=>s.value=!1)},"取消"),e.createElementVNode("button",{size:"mini",class:"btn2",onClick:m},"添加区间"),e.createElementVNode("button",{size:"mini",class:"btn2 btn-update",onClick:u},"修改")])],512),[[e.vShow,s.value]])])),e.createVNode(o)],64)}}}),Hu=Gn(zu,[["__scopeId","data-v-7072b147"]]),qu=e.defineComponent({__name:"bill",setup(t){const n=e.ref([{billName:"",billTitle:"",date:"",id:0,shopName:"",storeId:"",url:""}]);C(e=>{n.value=JSON.parse(null==e?void 0:e.billList)});const o=e.ref(!0);return x(()=>{o.value=f("newBillUrl")===qn.state.serveInfo.orderUrl}),(t,a)=>{const r=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.value.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"bill-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"list-cell",key:n,onClick:e=>function(e,t){uni.navigateTo({url:`/subPages/merchantChild/billDetaile/billDetaile?url=${e}&index=${t}`})}(t.url,n)},[e.createElementVNode("view",{class:e.normalizeClass(["icon",0===n?"icon-new":"icon-normal"])},null,2),e.createElementVNode("view",{class:"right"},[e.createElementVNode("view",{class:"bill-name"},e.toDisplayString(t.billTitle?t.shopName+t.billTitle:t.billName),1),e.createElementVNode("view",{class:"bottom"},[e.createElementVNode("view",{class:"detail"},"查看详情"),0!==n||o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"new"},"新")),e.createElementVNode("view",{class:"timer"},e.toDisplayString(t.date),1)])])],8,["onClick"]))),128))])):(e.openBlock(),e.createBlock(Jn,{key:1,title:"没有发现账单"})),e.createVNode(r)],64)}}}),Gu=Gn(qu,[["__scopeId","data-v-9c86a195"]]),Wu=e.defineComponent({__name:"billDetaile",setup(t){const n=e.ref("");return C(e=>{n.value=(null==e?void 0:e.url)?`?path=${null==e?void 0:e.url}`:"",0==(null==e?void 0:e.index)&&h("newBillUrl",null==e?void 0:e.url)}),(t,o)=>{const a=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[""!==n.value?(e.openBlock(),e.createElementBlock("web-view",{key:0,"update-title":!1,src:`https://wx.jxc4.com/billshow/${n.value}`},null,8,["src"])):(e.openBlock(),e.createBlock(Jn,{key:1,title:"暂无新订单"})),e.createVNode(a)],64)}}}),Ju=Gn(e.defineComponent({__name:"commentList",props:{comment:{},type:{}},emits:["TapMsg"],setup(t,{emit:n}){const{previewImage:o}=tn(),a=t,r=n,{orderDetail:i}=aa();function s(){"1"===a.comment.order_flag?a.comment.vendor_order_id?i(a.comment.vendor_order_id,a.comment.order_flag):r("TapMsg"):i(a.comment.order_id,a.comment.order_flag)}const l=e.computed(()=>_t(a.comment.createTime)),c=e.computed(()=>a.comment.venderTags?""==a.comment.venderTags?[]:JSON.parse(a.comment.venderTags):[]),u=e.computed(()=>a.comment.venderTags?""==a.comment.updatedVenderTags?[]:JSON.parse(a.comment.updatedVenderTags):[]),d=e.computed(()=>{let e=new Date(a.comment.createdAt).getTime(),t=e+1e3*+a.comment.maxModifyTime*60*60-+new Date;return"3"===a.comment.order_flag&&(t=e+108e5-+new Date),t>0?`仅剩: ${function(e,t="minutes",n="",o="-1"){let a=function(e){if(e<0)return-e;return e}(e),r=0,i=0,s=0;"days"===t&&(r=+a/864e5,a%=864e5,t="hours");"hours"===t&&(i=a/36e5,a%=36e5);if(s=a/6e4,e<0)return`${o}`;return 0===r&&0===i?`${s}${n}`:0===r?`${i}小时${s}${n}`:0===r?`${r}天${s}${n}`:`${r}天${i}小时${s}${n}`}(t,"days","分钟","已超时")}`:"已超时"});return(t,n)=>{const a=w(e.resolveDynamicComponent("jx-icon"),Yn);return e.openBlock(),e.createElementBlock("view",{class:"comment-cell",onClick:s},[e.createElementVNode("view",{class:"order-id pd20"},[e.createElementVNode("view",{class:"id"},[e.createTextVNode(" 订单号:"+e.toDisplayString(t.comment.vendor_order_id?t.comment.vendor_order_id:"3"!==t.comment.order_flag?t.comment.order_id:t.comment.vendorOrderID2)+" ",1),e.createVNode(a,{icon:"fuzhi",size:40,color:"#777777",onClick:n[0]||(n[0]=e.withModifiers(e=>{return n="3"!==t.comment.order_flag?t.comment.order_id:t.comment.vendorOrderID2,void uni.setClipboardData({data:n,success(){V("复制订单号成功",1)}});var n},["stop"]))})]),e.createElementVNode("view",{class:"time"},e.toDisplayString(l.value),1)]),e.createElementVNode("view",{class:"score pd20"},[e.createElementVNode("text",{class:e.normalizeClass(["vendor-icon","icon-"+t.comment.order_flag])},null,2),e.createElementVNode("view",{class:"text"},"商家评分"),0===t.comment.status?(e.openBlock(),e.createElementBlock("view",{key:0,class:"rank"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,n=>e.createElementVNode("text",{key:n,class:e.normalizeClass(["star",{star2:n<=t.comment.score4}])},null,2)),64))])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"rank"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,n=>e.createElementVNode("text",{key:n,class:e.normalizeClass(["star",{star2:n<=+t.comment.updatedScore}]),"user-select":""},null,2)),64))]))]),e.createElementVNode("view",{class:"comment-text"},[t.comment.msg&&JSON.parse(t.comment.msg).comment_pictures?(e.openBlock(),e.createElementBlock("view",{key:0,style:{display:"flex","overflow-x":"auto","margin-bottom":"20rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(t.comment.msg).comment_pictures.split(","),(n,a)=>(e.openBlock(),e.createElementBlock("img",{key:a,src:n.includes("https")?n:n.replace("http","https"),style:{width:"240rpx",height:"240rpx",flex:"0 0 auto","margin-right":"20rpx"},onClick:e.withModifiers(e=>function(e,t){let n=e.map(e=>e.includes("https")?e:e.replace("http","https"));o(n,t)}(JSON.parse(t.comment.msg).comment_pictures.split(","),a),["stop"])},null,8,["src","onClick"]))),128))])):e.createCommentVNode("",!0),0===t.comment.status?(e.openBlock(),e.createElementBlock("text",{key:1},e.toDisplayString(t.comment.score4Content?t.comment.score4Content:"暂无评价"),1)):(e.openBlock(),e.createElementBlock("text",{key:2,"user-select":""},e.toDisplayString(t.comment.updatedScoreContent?t.comment.updatedScoreContent:"暂无评价"),1))]),e.withDirectives(e.createElementVNode("view",{class:"tag"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(n,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{class:"span",key:o},e.toDisplayString(n),1)),[[e.vShow,0===t.comment.status]])),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(n,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("text",{key:o},e.toDisplayString(n),1)),[[e.vShow,1===t.comment.status]])),128))],512),[[e.vShow,c.value.length>0]]),0===t.type&&"1"!==t.comment.order_flag?(e.openBlock(),e.createElementBlock("view",{key:0},[e.createElementVNode("view",{class:"rest-time"},"改好评"+e.toDisplayString(d.value),1),e.createElementVNode("view",{class:"contact"},["已超时"!==d.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"tel"},[e.createTextVNode(e.toDisplayString(t.comment.userPhone)+" ",1),e.createVNode(a,{icon:"fuzhi",size:40,color:"#4eb331",onClick:n[1]||(n[1]=e.withModifiers(e=>{return n=t.comment.userPhone,void uni.setClipboardData({data:n,success(){V("复制手机号成功",1)}});var n},["stop"]))})])):e.createCommentVNode("",!0),"已超时"!==d.value?(e.openBlock(),e.createElementBlock("view",{key:1,class:"btn"},"联系客户")):(e.openBlock(),e.createElementBlock("view",{key:2,class:"tel"},"超时电话已失效"))])])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-70c67dc5"]]),Xu=Gn(e.defineComponent({__name:"tabs",props:{commentNumber:{}},emits:["switchTab"],setup(t,{emit:n}){const o=n,a=e.ref(0);function r(e){a.value=e,o("switchTab",e)}return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"tabs"},[e.createElementVNode("view",{class:"tabs-wrapper"},[e.createElementVNode("view",{class:e.normalizeClass(["tab-item",{active:0===a.value}]),onClick:n[0]||(n[0]=e=>r(0))}," 待处理差评("+e.toDisplayString(t.commentNumber)+") ",3),e.createElementVNode("view",{class:e.normalizeClass(["tab-item",{active:1===a.value}]),onClick:n[1]||(n[1]=e=>r(1))}," 全部评价 ",2),e.createElementVNode("view",{class:"active-line",style:e.normalizeStyle("transform: translateX("+375*a.value+"rpx)")},null,4)])]))}}),[["__scopeId","data-v-775b6760"]]),Ku=e.defineComponent({__name:"evaluateM",setup(t){const n=e.ref(0);C(async e=>{n.value=+(null==e?void 0:e.number),await c()});const o=e.ref(0);function a(e){l.value=[],o.value=e,c()}const r=e.ref(1),i=e.ref(20),s=e.ref(0),l=e.ref([]);async function c(){d.value=!0;let e={jxStoreId:f("storeID"),type:o.value,page:r.value,size:i.value},t=await un.Tmp_get_jx_bad_comments_by_storeId(e);0==t.code?(s.value=t.data.total,l.value=l.value.concat(t.data.list||[])):V("评论数据异常",2),d.value=!1}function u(){V("美团差评暂无订单信息")}e.ref();const d=e.ref(!1);return(t,m)=>{const p=w(e.resolveDynamicComponent("jx-load-more"),ya),f=w(e.resolveDynamicComponent("jx-empty"),Jn),h=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Xu,{commentNumber:n.value,onSwitchTab:a},null,8,["commentNumber"]),e.createElementVNode("scroll-view",{style:{height:"calc(100vh - 94rpx)"},"scroll-y":"","enable-back-to-top":!0,onScrolltolower:m[0]||(m[0]=e=>{((e,t,n,o)=>{e*t>=n?o&&o(!1):o&&o(!0)})(r.value,i.value,s.value,e=>{e?(r.value++,c()):d.value=!1})})},[s.value>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value,(t,n)=>(e.openBlock(),e.createBlock(Ju,{key:n,type:o.value,comment:t,onTapMsg:u},null,8,["type","comment"]))),128)):e.createCommentVNode("",!0),e.withDirectives(e.createVNode(p,{isLoad:d.value},null,8,["isLoad"]),[[e.vShow,s.value>=5]])],32),e.withDirectives(e.createVNode(f,{title:"暂无评价"},null,512),[[e.vShow,0==s.value]]),e.createVNode(h)],64)}}}),Yu=Gn(e.defineComponent({__name:"storeScore",setup(t){C(async()=>{await async function(){let e={storeID:f("storeID"),weekIndex:-1},t=await un.get_weekly_store_score(e);0==t.code?n.value=t.data||[]:V("店铺评分数据异常")}()});const n=e.ref([]);return(t,o)=>{const a=w(e.resolveDynamicComponent("jx-empty"),Jn),r=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[0==n.value.length?(e.openBlock(),e.createBlock(a,{key:0,title:"没有找到店铺评分"})):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"score-root"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,t=>(e.openBlock(),e.createElementBlock("view",{class:"score-item",key:t.id,onClick:e=>{return n=t.id,void uni.navigateTo({url:`/subPages/merchantChild/storeScoreDetaile/storeScoreDetaile?weekIndex=${n}`});var n}},[e.createElementVNode("view",{class:e.normalizeClass(["score-icon",{level1:1===t.level,level2:2===t.level,level3:3===t.level,level0:0===t.level}])},null,2),e.createElementVNode("view",{class:"left"},[e.createElementVNode("view",{class:"storeName"},e.toDisplayString(t.storeName),1),e.createElementVNode("view",{class:"date"},"("+e.toDisplayString(e.unref(Et)(t.beginTime))+"~"+e.toDisplayString(e.unref(Et)(t.endTime))+")",1)]),e.createElementVNode("view",{class:"right"},e.toDisplayString(t.totalScore)+"分",1)],8,["onClick"]))),128))]),e.createVNode(r)],64)}}}),[["__scopeId","data-v-aa38c889"]]),Zu=e.defineComponent({__name:"storeScoreDetaile",setup(t){const n=e.ref(0),o=e.ref("");return C(async e=>{n.value=+(null==e?void 0:e.weekIndex),await async function(){o.value=`https://wx.jxc4.com/scoredetail/?storeID=${f("storeID")}&weekIndex=${n.value}&token=${f("token")}`}()}),(t,n)=>(e.openBlock(),e.createElementBlock("web-view",{src:o.value},null,8,["src"]))}}),Qu=Gn(e.defineComponent({__name:"waitGoods",setup(t){const{previewImage:n}=tn();C(async()=>{await async function(){let e={storeID:f("storeID")},t=await un.get_order_ders_accept(e);0==t.code?null==t.data?o.value=[]:o.value=t.data.map(e=>({name:e.name+e.specQuality+e.specUnit,sumCount:e.sumCount,sumWeight:e.sumWeight,id:e.id,nameID:e.nameID,img:e.img})):V("待配商品数据异常")}()});const o=e.ref([{img:"",name:"",sumCount:0,item:0,sumWeight:0,id:0,nameID:0,specQuality:"",specUnit:""}]);return(t,a)=>{const r=w(e.resolveDynamicComponent("jx-empty"),Jn),i=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[0==o.value.length?(e.openBlock(),e.createBlock(r,{key:0,title:"暂无待配商品"})):(e.openBlock(),e.createElementBlock("view",{key:1,class:"good-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"good-item",onClick:e=>function(e){uni.navigateTo({url:`/subPages/merchantChild/waitGoodsDetaile/waitGoodsDetaile?nameID=${e.nameID}&skuID=${e.id}`})}(t),key:o},[e.createElementVNode("view",{class:"left"},e.toDisplayString(o+1),1),e.createElementVNode("view",{class:"right"},[e.createElementVNode("view",{class:"good-name"},[e.createElementVNode("image",{class:"img",src:t.img,mode:"scaleToFill",onClick:e.withModifiers(o=>e.unref(n)(t.img),["stop"])},null,8,["src","onClick"]),e.createElementVNode("view",{class:"name"},e.toDisplayString(t.name),1)]),e.createElementVNode("view",{class:"good-info"},[e.createElementVNode("view",{class:"good-count"},"数量: "+e.toDisplayString(t.sumCount),1),e.createElementVNode("view",{class:"good-weight"},"重量: "+e.toDisplayString(t.sumWeight)+"g("+e.toDisplayString(t.sumWeight/500)+"斤)",1)])])],8,["onClick"]))),128))])),e.createVNode(i)],64)}}}),[["__scopeId","data-v-c81848b8"]]),ed=Gn(e.defineComponent({__name:"skuName",props:{skuName:{}},emits:["refresh"],setup(t,{emit:n}){const{copyInfo:o}=aa(),{previewImage:a}=tn(),r=n,i=t;const s=e.ref(),l=e.ref("");function c(){if(isNaN(+l.value))return V("请输入格式正确的价格");if(+l.value<.01)return V("请输入大于等于1分钱的价格");if(l.value.toString().indexOf(".")>-1&&l.value.toString().split(".")[1].length>2)return V("最多只能有两位小数");let e=Math.round(100*+l.value);if(e==i.skuName.unitPrice)return V("没有修改价格");!async function(e){let t={storeIDs:JSON.stringify([+f("storeID")]),payload:JSON.stringify([{nameID:i.skuName.id,unitPrice:e}])};s.value.close(),0==(await Ga(t)).code?m||"E"===qn.state.storeInfo.allStoreInfo.storeLevel?(V("修改成功",1),r("refresh",i.skuName.id)):V(+e<i.skuName.unitPrice?"修改成功":"成功待审核",1):V("修改失败",2)}(e)}const u=e.computed(()=>{let e=(i.skuName.unitPrice/100).toFixed(2);return l.value=e,e}),d=e.computed(()=>{let e=i.skuName.auditUnitPrice;return e?+(1*e/100).toFixed(2):0}),m=e.computed(()=>qn.getters["storeInfo/isPointStore"]);return(t,n)=>{const r=w(e.resolveDynamicComponent("jx-icon"),Yn),i=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createElementBlock("view",{class:"new-skuName-cell"},[e.createElementVNode("view",{class:"new-skuName-cell-left"},[e.createElementVNode("image",{class:"img",src:t.skuName.img,mode:"scaleToFill",onClick:n[0]||(n[0]=e=>function(e){let t=[e.img,e.img2,e.img3,e.img4,e.img5].filter(e=>e&&e.length>0);a(t)}(t.skuName))},null,8,["src"])]),e.createElementVNode("view",{class:"new-skuName-cell-right"},[e.createElementVNode("view",{class:"name"},e.toDisplayString(t.skuName.prefix?"["+t.skuName.prefix+"]":"")+e.toDisplayString(t.skuName.name),1),e.createElementVNode("view",{onClick:n[1]||(n[1]=e.withModifiers(n=>e.unref(o)(""+t.skuName.id,"复制nameID成功"),["stop"])),class:"skuNameId"},[e.createElementVNode("text",null,e.toDisplayString(t.skuName.id),1),e.createVNode(r,{icon:"fuzhi",color:"#818181",style:{"margin-left":"10rpx"}})]),e.createElementVNode("view",null,[e.createElementVNode("view",{class:"update-price"},[e.createElementVNode("view",{class:"price"},"¥"+e.toDisplayString(u.value),1),e.createElementVNode("view",{class:"btn-updatePrice",onClick:n[2]||(n[2]=e=>s.value.open())})]),e.createElementVNode("view",{class:"tips"},e.toDisplayString("份"===t.skuName.unit?"该价格为每斤价格":"该价格为每"+t.skuName.unit+"价格"),1)]),e.withDirectives(e.createElementVNode("view",{class:"check-display"},[e.createTextVNode(" 审核中价格:¥"),e.createElementVNode("text",null,e.toDisplayString(d.value),1)],512),[[e.vShow,d.value>0]])]),e.createVNode(i,{ref_key:"popup",ref:s,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("text",{class:"text"},e.toDisplayString(m.value?"改价":"提交改价审核"),1),e.createElementVNode("view",{class:"tip"},[e.createTextVNode(" 当前价格每"+e.toDisplayString("份"===t.skuName.unit?"份":t.skuName.unit)+": ",1),e.createElementVNode("text",{class:"money"},"¥"+e.toDisplayString(u.value),1)]),d.value>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"tip audit"},[e.createTextVNode(" 正在审核 ¥"),e.createElementVNode("text",null,e.toDisplayString(d.value),1)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"digit","onUpdate:modelValue":n[3]||(n[3]=e=>l.value=e),placeholder:"请输入修改价格"},null,512),[[e.vModelText,l.value]]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:n[4]||(n[4]=e=>s.value.close())},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:c},"确定修改")])])]),_:1},512)])}}}),[["__scopeId","data-v-e4e23cb2"]]),td=Gn(e.defineComponent({__name:"skuNameID",props:{sku:{},skuName:{}},emits:["refresh","openDialog"],setup(t,{emit:n}){const o=t,a=n;function r(e,t,n){let o={nameID:e.id,Skus:[{skuID:t.id,stock:t.stock,locationCode:t.locationCode&&"EMPTY_VALUE"!==t.locationCode?t.locationCode:""}]};a("openDialog",{payload:o,type:n,name:e.name})}const i=e.computed(()=>{let e=o.sku;return s&&e.actPrice?(e.earningPrice/100).toFixed(2):(e.price/100).toFixed(2)}),s=e.computed(()=>qn.getters["storeInfo/isNewPriceDisplay"]),l=e.computed(()=>!It(o.sku.autoSaleAt)&&_t(o.sku.autoSaleAt));let c=0;function u(e){return 3==c&&2==e?uni.jxAlert({title:"提示",content:"【临时不可售】状态下不能设置为【不可售】,只能从【可售】切换到【不可售】"}):e!=c&&(c=e,void async function(e,t){try{if(3==e){let e={storeIDs:JSON.stringify([+f("storeID")]),payload:JSON.stringify([{skuID:t,isSale:-1}]),isAsync:!1,autoSaleAt:d()};0==(await Wa(e)).code?V("操作成功"):V("操作失败",2)}else{let n={storeIDs:JSON.stringify([+f("storeID")]),payload:JSON.stringify([{nameID:o.skuName.id,skus:[{skuID:t,isSale:1==+e?1:-1}]}])};0==(await Ga(n)).code?V("操作成功"):V("操作失败",2)}}catch(n){V("系统异常")}finally{a("refresh",o.skuName.id)}}(e,o.sku.id))}function d(){return+new Date<+new Date(`${Et(+new Date)} ${m.value}`)?`${Et(+new Date)} ${m.value}`:`${Et(+new Date+864e5)} ${m.value}`}const m=e.computed(()=>"20:25:00");return(t,n)=>{const o=w(e.resolveDynamicComponent("jx-icon"),Yn);return e.openBlock(),e.createElementBlock("view",{class:"new-sku-cell"},[e.createElementVNode("view",{class:"flex-wrapper"},[e.createElementVNode("view",{class:"new-sku-cell-left"},[!s.value&&t.sku.actPrice?(e.openBlock(),e.createElementBlock("view",{key:0,class:"promotion-earning-icon"})):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"spec"},e.toDisplayString(t.sku.specQuality)+e.toDisplayString(t.sku.specUnit),1),e.createElementVNode("view",{class:e.normalizeClass(["price",{"promotion-price":!s.value&&t.sku.actPrice}])}," ¥"+e.toDisplayString(i.value),3)]),e.createElementVNode("view",{class:"new-sku-cell-right"},[e.createElementVNode("view",{onClick:n[0]||(n[0]=e=>u(1)),class:e.normalizeClass(["btn-status",{active:t.sku.storeSkuStatus}])}," 可售 ",2),e.createElementVNode("view",{onClick:n[1]||(n[1]=e=>u(2)),class:e.normalizeClass(["btn-status",{active:!t.sku.storeSkuStatus&&!l.value}])}," 不可售 ",2),e.createElementVNode("view",{onClick:n[2]||(n[2]=e=>u(3)),class:e.normalizeClass(["btn-status",{active:!t.sku.storeSkuStatus&&l.value}])}," 临时不可售 ",2)])]),e.createElementVNode("view",{class:"flex-wrapper-3"},[e.createElementVNode("view",{onClick:n[3]||(n[3]=e=>r(t.skuName,t.sku,"stock"))},[e.createTextVNode(" 库存:"+e.toDisplayString(t.sku.stock)+" ",1),e.createVNode(o,{icon:"shuxie",color:"#999",size:24})]),e.createElementVNode("view",{class:"locationCode",onClick:n[4]||(n[4]=e=>r(t.skuName,t.sku,"locationCode"))},[e.createTextVNode(" 货架码:"+e.toDisplayString(t.sku.locationCode&&"EMPTY_VALUE"!==t.sku.locationCode?t.sku.locationCode:"")+" ",1),e.createVNode(o,{icon:"shuxie",color:"#999",size:24})])]),e.createElementVNode("view",{class:"flex-wrapper-2"},[e.createElementVNode("view",{class:"cell-bottom"},e.toDisplayString(t.sku.comment?t.sku.comment:""),1),l.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"auto-at"}," 该规格将在 "+e.toDisplayString(l.value)+" 可售 ",1)):e.createCommentVNode("",!0)])])}}}),[["__scopeId","data-v-81880721"]]);const nd=e.defineComponent({__name:"waitGoodsDetaile",setup(t){const{skuName:n,goodsInfo:o,refresh:a,goodsTotalCount:r,skuNameItem:i,popupDialog:s,sureStockOrCode:l,stockOrCode:c,openDialog:u}=function(){const{copyInfo:t}=tn(),n=e.ref({nameID:0,skuID:0,goodsName:"商品名字"}),o=e.ref(0);C(async e=>{n.value.nameID=null==e?void 0:e.nameID,n.value.skuID=null==e?void 0:e.skuID,n.value.goodsName=null==e?void 0:e.goodsName,await i()});let a=null;E(()=>{clearTimeout(a),a=setTimeout(async()=>{uni.stopPullDownRefresh(),await i()},500)});const r=e.ref({img:"",prefix:"",unit:"",name:"",unitPrice:0,auditUnitPrice:0});async function i(){let e={storeIDs:JSON.stringify([f("storeID")]),isFocus:!0,nameIDs:JSON.stringify([+n.value.nameID]),fromStatus:0,toStatus:1},a=await un.get_stores_skus(e);0==a.code?(o.value=a.data.totalCount,0==a.data.totalCount?uni.jxConfirm({title:"提示",content:`未创建该商品,请先创建该商品,商品名字:【${n.value.goodsName}】`,success:()=>{uni.navigateTo({url:"/subPages/shoppingChild/createGoods/createGoods",success:()=>{t(n.value.goodsName,"商品名字复制成功")}})}}):r.value=a.data.skuNames[0]):V("商品数据异常",2)}const s=e.ref(null),l=e.ref({payload:{nameID:0,Skus:[]},name:"",type:"price"}),c=e.ref("");function u(e){n.value.nameID=e,i()}return e.onBeforeUnmount(()=>{clearTimeout(a)}),{skuName:r,goodsInfo:n,refresh:u,goodsTotalCount:o,skuNameItem:l,popupDialog:s,sureStockOrCode:async function(){const e=l.value.payload.nameID,t=l.value.payload.Skus[0].skuID;let n={storeIDs:JSON.stringify([+f("storeID")])};"stock"===l.value.type?n.payload=JSON.stringify([{nameID:e,Skus:[{skuID:t,stock:+c.value}]}]):n.payload=JSON.stringify([{nameID:e,Skus:[{skuID:t,locationCode:""+c.value?""+c.value:"EMPTY_VALUE"}]}]),0==(await Ga(n)).code&&(u(r.value.id),h("reLoadOrderDetail",!0),V("修改成功")),s.value.close()},stockOrCode:c,openDialog:function(e){l.value=e;const t=e.payload.Skus[0];"stock"===e.type&&(c.value=t.stock+""),"locationCode"===e.type&&(c.value=t.locationCode),s.value.open()}}}();return(t,d)=>{const m=w(e.resolveDynamicComponent("jx-empty"),Jn),p=w(e.resolveDynamicComponent("uni-popup"),Ca),f=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(n)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"skuName-wrapper"},[e.createVNode(ed,{skuName:e.unref(n),onRefresh:e.unref(a)},null,8,["skuName","onRefresh"])])):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"sku-wrapper"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n).skus,t=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["sku-item",{"sku-active":t.id==e.unref(o).skuID}]),key:t.id},[e.createVNode(td,{sku:t,skuName:e.unref(n),onRefresh:e.unref(a),onOpenDialog:e.unref(u)},null,8,["sku","skuName","onRefresh","onOpenDialog"])],2))),128))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(m,{key:1,title:"未创建商品,下拉刷新试试"})),e.createVNode(p,{ref_key:"popupDialog",ref:s,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("view",{class:"text"},e.toDisplayString("stock"===e.unref(i).type?"修改库存":"修改货架码"),1),e.createElementVNode("view",{class:"tip"},e.toDisplayString(e.unref(i).name),1),e.createElementVNode("view",{class:"ipt-box"},[e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"stock"===e.unref(i).type?"number":"text","onUpdate:modelValue":d[0]||(d[0]=t=>e.isRef(c)?c.value=t:null),placeholder:"stock"===e.unref(i).type?"请输入商品库存":"请输入商品货架码"},null,8,["type","placeholder"]),[[e.vModelDynamic,e.unref(c)]])]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:d[1]||(d[1]=t=>e.unref(s).close())},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:d[2]||(d[2]=(...t)=>e.unref(l)&&e.unref(l)(...t))},"确定")])])]),_:1},512),e.createVNode(f)],64)}}}),od=Gn(nd,[["__scopeId","data-v-2714f130"]]),ad=Gn(e.defineComponent({__name:"jx-popup",props:{isMask:{type:Boolean,default:!1},time:{default:300},type:{}},emits:["mask"],setup(t,{expose:n,emit:o}){e.useCssVars(e=>({"45d4a806":p.value}));const a=t,r=o,i=e.ref(!1),s=e.ref(""),l=e.ref(!1);let c=null;let u=null;let d=null;function m(){a.isMask||(r("mask"),i.value=!1,s.value="",clearTimeout(d),d=setTimeout(()=>{l.value=!1},a.time))}n({open:function(){if(!["top","right","bottom","left","center"].includes(a.type))return k("error","at components/jx-popup/jx-popup.vue:61","this is param need is top or right or bottom or left or center");l.value=!0,clearTimeout(c),c=setTimeout(()=>{switch(i.value=!0,a.type){case"top":s.value="topAnimation";break;case"right":s.value="rightAnimation";break;case"bottom":s.value="bottomAnimation";break;case"left":s.value="leftAnimation";break;case"center":s.value="centerAnimation"}},20)},close:function(e){i.value=!1,s.value="",clearTimeout(u),u=setTimeout(()=>{l.value=!1,e&&e()},a.time)}});const p=e.computed(()=>a.time/1e3+"s");return(t,n)=>e.withDirectives((e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["jx-popup",{popupAnimation:i.value}]),onClick:m,onTouchmove:n[1]||(n[1]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("view",{class:e.normalizeClass(["popup-center",[t.type,s.value]]),onClick:n[0]||(n[0]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2)],34)),[[e.vShow,l.value]])}}),[["__scopeId","data-v-81a753e5"]]);var rd=Object.prototype.hasOwnProperty,id=Object.prototype.toString,sd=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,cd=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===id.call(e)},ud=function(e){if(!e||"[object Object]"!==id.call(e))return!1;var t,n=rd.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&rd.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||rd.call(e,t)},dd=function(e,t){sd&&"__proto__"===t.name?sd(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},md=function(e,t){if("__proto__"===t){if(!rd.call(e,t))return;if(ld)return ld(e,t).value}return e[t]},pd=function e(){var t,n,o,a,r,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)o=md(s,n),s!==(a=md(t,n))&&(u&&a&&(ud(a)||(r=cd(a)))?(r?(r=!1,i=o&&cd(o)?o:[]):i=o&&ud(o)?o:{},dd(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&dd(s,{name:n,newValue:a}));return s};function fd(e){this.mode=vd.MODE_8BIT_BYTE,this.data=e}function hd(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=new Array}fd.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},hd.prototype={addData:function(e){var t=new fd(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=Sd.getRSBlocks(e,this.errorCorrectLevel),n=new Nd,o=0,a=0;a<t.length;a++)o+=t[a].dataCount;for(a=0;a<this.dataList.length;a++){var r=this.dataList[a];n.put(r.mode,4),n.put(r.getLength(),kd.getLengthInBits(r.mode,e)),r.write(n)}if(n.getLengthInBits()<=8*o)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++)this.modules[n][o]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=hd.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var o=-1;o<=7;o++)t+o<=-1||this.moduleCount<=t+o||(this.modules[e+n][t+o]=0<=n&&n<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=o&&o<=4)},getBestMaskPattern:function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var o=kd.getLostPoint(this);(0==n||e>o)&&(e=o,t=n)}return t},createMovieClip:function(e,t,n){var o=e.createEmptyMovieClip(t,n);this.make();for(var a=0;a<this.modules.length;a++)for(var r=1*a,i=0;i<this.modules[a].length;i++){var s=1*i;this.modules[a][i]&&(o.beginFill(0,100),o.moveTo(s,r),o.lineTo(s+1,r),o.lineTo(s+1,r+1),o.lineTo(s,r+1),o.endFill())}return o},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=kd.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var o=e[t],a=e[n];if(null==this.modules[o][a])for(var r=-2;r<=2;r++)for(var i=-2;i<=2;i++)this.modules[o+r][a+i]=-2==r||2==r||-2==i||2==i||0==r&&0==i}},setupTypeNumber:function(e){for(var t=kd.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var o=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=o}for(n=0;n<18;n++)o=!e&&1==(t>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=o},setupTypeInfo:function(e,t){for(var n=this.errorCorrectLevel<<3|t,o=kd.getBCHTypeInfo(n),a=0;a<15;a++){var r=!e&&1==(o>>a&1);a<6?this.modules[a][8]=r:a<8?this.modules[a+1][8]=r:this.modules[this.moduleCount-15+a][8]=r}for(a=0;a<15;a++)r=!e&&1==(o>>a&1),a<8?this.modules[8][this.moduleCount-a-1]=r:a<9?this.modules[8][15-a-1+1]=r:this.modules[8][15-a-1]=r;this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,o=this.moduleCount-1,a=7,r=0,i=this.moduleCount-1;i>0;i-=2)for(6==i&&i--;;){for(var s=0;s<2;s++)if(null==this.modules[o][i-s]){var l=!1;r<e.length&&(l=1==(e[r]>>>a&1)),kd.getMask(t,o,i-s)&&(l=!l),this.modules[o][i-s]=l,-1==--a&&(r++,a=7)}if((o+=n)<0||this.moduleCount<=o){o-=n,n=-n;break}}}},hd.PAD0=236,hd.PAD1=17,hd.createData=function(e,t,n){for(var o=Sd.getRSBlocks(e,t),a=new Nd,r=0;r<n.length;r++){var i=n[r];a.put(i.mode,4),a.put(i.getLength(),kd.getLengthInBits(i.mode,e)),i.write(a)}var s=0;for(r=0;r<o.length;r++)s+=o[r].dataCount;if(a.getLengthInBits()>8*s)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*s+")");for(a.getLengthInBits()+4<=8*s&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=8*s||(a.put(hd.PAD0,8),a.getLengthInBits()>=8*s));)a.put(hd.PAD1,8);return hd.createBytes(a,o)},hd.createBytes=function(e,t){for(var n=0,o=0,a=0,r=new Array(t.length),i=new Array(t.length),s=0;s<t.length;s++){var l=t[s].dataCount,c=t[s].totalCount-l;o=Math.max(o,l),a=Math.max(a,c),r[s]=new Array(l);for(var u=0;u<r[s].length;u++)r[s][u]=255&e.buffer[u+n];n+=l;var d=kd.getErrorCorrectPolynomial(c),m=new xd(r[s],d.getLength()-1).mod(d);for(i[s]=new Array(d.getLength()-1),u=0;u<i[s].length;u++){var p=u+m.getLength()-i[s].length;i[s][u]=p>=0?m.get(p):0}}var f=0;for(u=0;u<t.length;u++)f+=t[u].totalCount;var h=new Array(f),v=0;for(u=0;u<o;u++)for(s=0;s<t.length;s++)u<r[s].length&&(h[v++]=r[s][u]);for(u=0;u<a;u++)for(s=0;s<t.length;s++)u<i[s].length&&(h[v++]=i[s][u]);return h};for(var vd={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},gd={L:1,M:0,Q:3,H:2},yd={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},kd={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;kd.getBCHDigit(t)-kd.getBCHDigit(kd.G15)>=0;)t^=kd.G15<<kd.getBCHDigit(t)-kd.getBCHDigit(kd.G15);return(e<<10|t)^kd.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;kd.getBCHDigit(t)-kd.getBCHDigit(kd.G18)>=0;)t^=kd.G18<<kd.getBCHDigit(t)-kd.getBCHDigit(kd.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return kd.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case yd.PATTERN000:return(t+n)%2==0;case yd.PATTERN001:return t%2==0;case yd.PATTERN010:return n%3==0;case yd.PATTERN011:return(t+n)%3==0;case yd.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case yd.PATTERN101:return t*n%2+t*n%3==0;case yd.PATTERN110:return(t*n%2+t*n%3)%2==0;case yd.PATTERN111:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new xd([1],0),n=0;n<e;n++)t=t.multiply(new xd([1,wd.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case vd.MODE_NUMBER:return 10;case vd.MODE_ALPHA_NUM:return 9;case vd.MODE_8BIT_BYTE:case vd.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case vd.MODE_NUMBER:return 12;case vd.MODE_ALPHA_NUM:return 11;case vd.MODE_8BIT_BYTE:return 16;case vd.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case vd.MODE_NUMBER:return 14;case vd.MODE_ALPHA_NUM:return 13;case vd.MODE_8BIT_BYTE:return 16;case vd.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,o=0;o<t;o++)for(var a=0;a<t;a++){for(var r=0,i=e.isDark(o,a),s=-1;s<=1;s++)if(!(o+s<0||t<=o+s))for(var l=-1;l<=1;l++)a+l<0||t<=a+l||0==s&&0==l||i==e.isDark(o+s,a+l)&&r++;r>5&&(n+=3+r-5)}for(o=0;o<t-1;o++)for(a=0;a<t-1;a++){var c=0;e.isDark(o,a)&&c++,e.isDark(o+1,a)&&c++,e.isDark(o,a+1)&&c++,e.isDark(o+1,a+1)&&c++,0!=c&&4!=c||(n+=3)}for(o=0;o<t;o++)for(a=0;a<t-6;a++)e.isDark(o,a)&&!e.isDark(o,a+1)&&e.isDark(o,a+2)&&e.isDark(o,a+3)&&e.isDark(o,a+4)&&!e.isDark(o,a+5)&&e.isDark(o,a+6)&&(n+=40);for(a=0;a<t;a++)for(o=0;o<t-6;o++)e.isDark(o,a)&&!e.isDark(o+1,a)&&e.isDark(o+2,a)&&e.isDark(o+3,a)&&e.isDark(o+4,a)&&!e.isDark(o+5,a)&&e.isDark(o+6,a)&&(n+=40);var u=0;for(a=0;a<t;a++)for(o=0;o<t;o++)e.isDark(o,a)&&u++;return n+Math.abs(100*u/t/t-50)/5*10}},wd={glog:function(e){if(e<1)throw new Error("glog("+e+")");return wd.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return wd.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},bd=0;bd<8;bd++)wd.EXP_TABLE[bd]=1<<bd;for(bd=8;bd<256;bd++)wd.EXP_TABLE[bd]=wd.EXP_TABLE[bd-4]^wd.EXP_TABLE[bd-5]^wd.EXP_TABLE[bd-6]^wd.EXP_TABLE[bd-8];for(bd=0;bd<255;bd++)wd.LOG_TABLE[wd.EXP_TABLE[bd]]=bd;function xd(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var o=0;o<e.length-n;o++)this.num[o]=e[o+n]}function Sd(e,t){this.totalCount=e,this.dataCount=t}function Nd(){this.buffer=new Array,this.length=0}function Cd(e){(e=pd(!0,{width:256,height:256,x:0,y:0,typeNumber:-1,correctLevel:gd.H,background:"#ffffff",foreground:"#000000",image:{imageResource:"",dx:0,dy:0,dWidth:100,dHeight:100}},e=e||{})).canvasId||e.ctx?function(){var t,n=new hd(e.typeNumber,e.correctLevel);n.addData(function(e){var t,n,o,a;for(t="",o=e.length,n=0;n<o;n++)(a=e.charCodeAt(n))>=1&&a<=127?t+=e.charAt(n):a>2047?(t+=String.fromCharCode(224|a>>12&15),t+=String.fromCharCode(128|a>>6&63),t+=String.fromCharCode(128|63&a)):(t+=String.fromCharCode(192|a>>6&31),t+=String.fromCharCode(128|63&a));return t}(e.text)),n.make(),t=e.ctx?e.ctx:e._this?wx.createCanvasContext&&wx.createCanvasContext(e.canvasId,e._this):wx.createCanvasContext&&wx.createCanvasContext(e.canvasId);for(var o=e.width/n.getModuleCount(),a=e.height/n.getModuleCount(),r=0;r<n.getModuleCount();r++)for(var i=0;i<n.getModuleCount();i++){var s=n.isDark(r,i)?e.foreground:e.background;t.setFillStyle(s);var l=Math.ceil((i+1)*o)-Math.floor(i*o),c=Math.ceil((r+1)*o)-Math.floor(r*o);t.fillRect(Math.round(i*o)+e.x,Math.round(r*a)+e.y,l,c)}e.image.imageResource&&t.drawImage(e.image.imageResource,e.image.dx,e.image.dy,e.image.dWidth,e.image.dHeight),t.draw(!1,function(t){e.callback&&e.callback(t)})}():k("warn","at utils/weapp.qrcode.esm.js:5","please set canvasId or ctx!")}xd.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<e.getLength();o++)t[n+o]^=wd.gexp(wd.glog(this.get(n))+wd.glog(e.get(o)));return new xd(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=wd.glog(this.get(0))-wd.glog(e.get(0)),n=new Array(this.getLength()),o=0;o<this.getLength();o++)n[o]=this.get(o);for(o=0;o<e.getLength();o++)n[o]^=wd.gexp(wd.glog(e.get(o))+t);return new xd(n,0).mod(e)}},Sd.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],Sd.getRSBlocks=function(e,t){var n=Sd.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var o=n.length/3,a=new Array,r=0;r<o;r++)for(var i=n[3*r+0],s=n[3*r+1],l=n[3*r+2],c=0;c<i;c++)a.push(new Sd(s,l));return a},Sd.getRsBlockTable=function(e,t){switch(t){case gd.L:return Sd.RS_BLOCK_TABLE[4*(e-1)+0];case gd.M:return Sd.RS_BLOCK_TABLE[4*(e-1)+1];case gd.Q:return Sd.RS_BLOCK_TABLE[4*(e-1)+2];case gd.H:return Sd.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},Nd.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};const _d=Gn(e.defineComponent({__name:"shareStore",setup(t){C(async()=>{await async function(){let e={storeID:f("storeID")},t=await un.get_stores(e);n.value=t.data.stores[0].StoreMaps}()});const n=e.ref([]);const o=e.computed(()=>Nt.serveInfo.vendorName),a=e.ref(null),r=e.ref("");function i(e){setTimeout(()=>new Promise((t,n)=>{uni.createCanvasContext("shareCanvas").clearRect(0,0,120,120),Cd({canvasId:"shareCanvas",text:String(e),width:120,height:120,callback(){uni.hideLoading()}})}),100)}return e.onBeforeUnmount(()=>{Mt()}),(t,s)=>{const l=w(e.resolveDynamicComponent("jx-icon"),Yn),c=w(e.resolveDynamicComponent("jx-empty"),Jn),u=w(e.resolveDynamicComponent("jx-popup"),ad);return e.openBlock(),e.createElementBlock(e.Fragment,null,[0!=n.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"share-store-root"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,t=>(e.openBlock(),e.createElementBlock("view",{class:"store-vender",key:t.vendorStoreID,onClick:e=>async function(e,t,n){uni.showLoading({title:"请稍后"});let o="";if(9==e){let e={scene:`storeID=${f("storeID")}-type=${"jxcs"==f("terrace")?"c4":"jxgy"==f("terrace")?"gy":"gm"}`},t=await un.get_weixin_unlimited(e);0==t.code?(o=t.data.wxcode,r.value="微信扫码进店/",a.value.open(),i(o)):uni.jxAlert({title:"提示",content:"获取店铺二维码失败"}),uni.hideLoading()}else 0==e?(r.value="京东/微信/支付宝扫码进店/",a.value.open(),o=`https://daojia.jd.com/activity/storeShare/index.html?channel=o2ostore&storeId=${t}&orgCode=${n}`,i(o)):1==e?(r.value="美团/微信/支付宝扫码进店/",a.value.open(),o=`https://h5.waimai.meituan.com/waimai/mindex/menu?mtShopId=${t}`,i(o)):3==e?(r.value="饿了么/微信/支付宝扫码进店/",a.value.open(),o=`https://h5.ele.me/newretail/p/shop/?&id=${t}`,i(o)):5==e?(r.value="京东/微信/支付宝扫码进店/",a.value.open(),o=`https://mini-app-static.jd.com/apps/mpshare/index.html?category=jump&des=jdmp&vapptype=1&appId=10569615¶m={"storeId":"${t}","source":"qrcode","skuId":""}`,i(o)):(uni.hideLoading(),uni.jxAlert({title:"提示",content:"该品牌暂不支持扫码进店"}))}(t.vendorID,t.vendorStoreID,t.vendorOrgCode)},[e.createElementVNode("view",{class:"left"},[e.createElementVNode("text",{class:e.normalizeClass(`icon icon-${t.vendorID}`)},null,2),e.createElementVNode("view",{class:"vendor-name"},e.toDisplayString(o.value[t.vendorID]?o.value[t.vendorID]:"未知平台"),1)]),e.createElementVNode("view",{class:"right"},[e.createVNode(l,{icon:"erweima",size:60,color:"rgb(71, 71, 71)"}),e.createElementVNode("text",{class:"code-text"},"店铺码")])],8,["onClick"]))),128))])):(e.openBlock(),e.createBlock(c,{key:1,title:"您还没有开通任何店铺哟"})),e.createVNode(u,{ref_key:"share",ref:a,type:"center"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"share-root"},[e.createElementVNode("view",{class:"qrCode"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(e.unref(f)("storeName")),1),e.createElementVNode("view",{class:"canvas"},[e.createElementVNode("canvas",{"canvas-id":"shareCanvas",style:{width:"120px",height:"120px",overflow:"hidden"}})])]),e.createElementVNode("view",{onClick:s[0]||(s[0]=e=>a.value.close()),class:"closeQrCode"},"关闭")])]),_:1},512)],64)}}}),[["__scopeId","data-v-555bd076"]]);const Ed=Gn({},[["render",function(t,n){const o=e.resolveComponent("cell"),a=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"jx-chat-root"},[e.createElementVNode("view",{class:"chat-center"},[e.createVNode(o,{class:"chart-root",plugid:"455b837a961a3c74e3a8e4591dcc66e2"}),e.createElementVNode("text",{class:"text"},"加入群聊")])]),e.createVNode(a)],64)}],["__scopeId","data-v-106c7703"]]),Id=Gn(e.defineComponent({__name:"message",setup(t){const n=e.ref([{id:0,messageID:0,title:"",createdAt:"",readCount:0}]);return x(async()=>{await async function(){let e={storeIDs:JSON.stringify([+f("storeID")]),offset:0,pageSize:-1,fromTime:Et(+new Date-6048e5)+" 00:00:00",toTime:Et(+new Date)+" 23:59:59"},t=await un.Get_store_message_statuses(e);0==t.code?0!=t.data.totalCount?n.value=t.data.data.sort((e,t)=>+new Date(t.createdAt)-+new Date(e.createdAt)):n.value=[]:V("消息数据异常")}()}),(t,o)=>{const a=w(e.resolveDynamicComponent("jx-empty"),Jn),r=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"list"},[e.createElementVNode("text",{class:"list-title"},"一周内的消息通知"),0!=n.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,t=>(e.openBlock(),e.createElementBlock("view",{key:t.id},[e.createElementVNode("view",{class:"list-item",onClick:e=>{return n=t.messageID,o=t.id,void uni.navigateTo({url:`/subPages/merchantChild/messageDetail/messageDetail?messageID=${n}&id=${o}`});var n,o}},[e.createElementVNode("view",{class:"content"},[0===t.readCount?(e.openBlock(),e.createElementBlock("div",{key:0,class:"new-icon"},"新消息")):(e.openBlock(),e.createElementBlock("div",{key:1,class:"old-icon"},"已查看")),e.createElementVNode("div",{class:"title"},e.toDisplayString(t.title),1)]),e.createElementVNode("div",{class:"create-time"},e.toDisplayString(e.unref(_t)(t.createdAt)),1)],8,["onClick"])]))),128)):(e.openBlock(),e.createBlock(a,{key:1,title:"暂无消息通知"}))]),e.createVNode(r)],64)}}}),[["__scopeId","data-v-6b81de23"]]),Dd=e.defineComponent({__name:"messageDetail",setup(t){const n=e.ref(0),o=e.ref(0);C(async e=>{n.value=e.messageID,o.value=e.id,await async function(){let e={msgIDs:JSON.stringify([+n.value]),offset:0,pageSize:1},t=await un.get_store_messages(e);0==t.code?0!=t.data.totalCount?(a.value=t.data.data[0],r.value=t.data.totalCount,async function(){let e={msgID:n.value,msgStatusID:o.value},t=await un.read_store_message(e);0!=t.code&&V("读取信息异常",2)}()):r.value=0:V("获取消息数据异常",2)}()});const a=e.ref({content:"",title:"",type:0,imgs:"",createdAt:""}),r=e.ref(0);function i(){uni.navigateBack()}return(t,n)=>{const o=w(e.resolveDynamicComponent("jx-icon"),Yn),r=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"msg-page"},[e.createElementVNode("view",{class:"cell"},[e.createVNode(o,{icon:"xinxi"}),e.createElementVNode("text",{class:"text"},e.toDisplayString(a.value.title),1)]),e.createElementVNode("view",{class:"cell"},[e.createVNode(o,{icon:"shijian"}),e.createElementVNode("text",{class:"text"},e.toDisplayString(e.unref(_t)(a.value.createdAt)),1)]),e.createElementVNode("view",{class:"content"},[e.createElementVNode("rich-text",{nodes:a.value.content},null,8,["nodes"])]),""!=a.value.imgs?(e.openBlock(),e.createElementBlock("view",{key:0,class:"imgWrap"},[e.createElementVNode("div",{class:"imgInnerWrap"},[e.createElementVNode("img",{class:"img",src:a.value.imgs,mode:"aspectFit"},null,8,["src"])])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"return",onClick:i},"返回消息列表")]),e.createVNode(r)],64)}}}),Vd=Gn(Dd,[["__scopeId","data-v-1164840a"]]),Bd=e.defineComponent({__name:"activity",setup(t){x(async()=>{await async function(){let e=Et(+new Date-864e5)+" 00:00:00",t=Et(+new Date)+" 23:59:59",o={storeID:f("storeID"),createdAtFrom:e,createdAtTo:t,typeList:"[0,3,4,5]",statusList:"[1]",pageSize:7,offset:7},a=await un.query_acts(o);0==a.code?a.data.totalCount>0?n.value=a.data.data:n.value=[]:V("活动那个信息异常")}()});const n=e.ref([]);return(t,n)=>{const o=w(e.resolveDynamicComponent("jx-empty"),Jn);return e.openBlock(),e.createBlock(o,{title:"暂无活动信息"})}}});function Td(){const{logOutFn:t}=tn(),n=e.ref(0),o=e.ref(0),a=e.ref(0),r=e.ref({}),i=e.ref({}),s=e.ref(!1),l=e.ref(!1);x(async()=>{await async function(){if(b.value=qn.state.storeInfo.allStoreInfo.smsNotify,n.value=qn.state.storeInfo.allStoreInfo.printerDisabled,"{}"!==JSON.stringify(qn.state.storeInfo.allStoreInfo)){let e=qn.state.storeInfo.allStoreInfo.StoreMaps.find(e=>1===e.vendorID);if(e&&"{}"!==JSON.stringify(e)){r.value=e,s.value=!0;let t=qn.state.storeInfo.imOnlineStatus.filter(e=>1===e.vendorID);o.value=t.length>0?t[0].imStatus:0}let t=qn.state.storeInfo.allStoreInfo.StoreMaps.find(e=>3===e.vendorID);if(t&&"{}"!==JSON.stringify(t)){i.value=t,l.value=!0;let e=qn.state.storeInfo.imOnlineStatus.filter(e=>3===e.vendorID);a.value=e.length>0?e[0].imStatus:0}}m.value=qn.state.serveInfo.serviceInfo.printerVendorInfo;for(let e in m.value)if(!c.value[e]){let t=m.value[e][0]+"打印机";c.value[e]=t,u.value.push(t)}if(qn.state.storeInfo.allStoreInfo.printerVendorID)for(let e in c.value)if(e==qn.state.storeInfo.allStoreInfo.printerVendorID){let t=u.value.findIndex(t=>t===c.value[e]);-1!==t&&(d.value=t+"",p.value=d.value)}I.value=+f("printerRetrySize")+"",S.value=f("defaultPrinter")||"2"}()});const c=e.ref({0:"未绑定",201:"飞鹅打印机",202:"外卖管家打印机",203:"易联云打印机",204:"中午云打印机",205:"京西云打印机",206:"芯烨云",207:"大趋智能"}),u=e.ref(["无","外卖管家打印机","易联云打印机","中午云打印机","京西云打印机","飞鹅打印机","芯烨云打印机","大趋智能打印机"]),d=e.ref(""),m=e.ref(),p=e.ref(""),v=e.ref(null),g=e.ref(["","",""]),y=e.ref({printerSN:"",printerKey:""});const k=e.ref([{id:1,title:"用户协议",url:"https://www.jxc4.com/managerApp/service.html"},{id:2,title:"隐私协议",url:"https://www.jxc4.com/managerApp/privacy.html"},{id:3,title:"关于京西菜市",url:"/subPages/agreement/updateVersion"}]),w=e.ref(["不提醒","拣货超时短信提醒","拣货超时电话提示"]),b=e.ref("0");const S=e.ref("0"),N=e.ref(["蓝牙打印机","网络打印机","手动选择打印机"]);async function C(){await qn.dispatch("storeInfo/getOneStore",f("storeID"))}function _(){d.value=p.value,y.value.printerSN="",y.value.printerKey="",v.value.close()}const E=e.ref(["小号","中号","大号","开发者模板"]),I=e.ref("0");const D=e.ref("");x(()=>{D.value=f("deviceName")||"未连接"});const B=e.ref(!0);return B.value=!(!f("defaultOrderReminder")&&""!==f("defaultOrderReminder")),{copyRight:k,smsNotifyData:w,defaultPrinter:N,defaultPrinterChange:function(e){S.value=e.detail.value,h("defaultPrinter",e.detail.value)},defaultPrinterValue:S,smsNotify:b,bindMultiPickerChange:function(e){if(1===qn.state.storeInfo.allStoreInfo.packageSwitch){let e=qn.state.storeInfo.allStoreInfo.marketManPhone?qn.state.storeInfo.allStoreInfo.marketManPhone:"18048531223";return void uni.jxAlert({title:"设置失败",content:`非常抱歉,无法设置拣货提醒,请联系运营${e}`})}b.value=e.detail.value,async function(){let e={storeID:f("storeID"),payload:JSON.stringify({smsNotify:b.value})};if(0!=(await un.update_store(e)).code)V("切换失败")}()},copyRightFn:function(e,t){3==t?uni.navigateTo({url:e}):uni.navigateTo({url:`/subPages/agreement/jxcs?url=${e}`})},bluetoothPrinterSetUp:function(){uni.navigateTo({url:"/subPages/merchantChild/printerSetUp/printerSetUp"})},switchUpc:function(e){h("isPrinterUpc",e.detail.value)},newPrinterName:D,DeletePrinterSeq:async function(){let e={storeIDs:JSON.stringify([f("storeID")])};0==(await un.delete_printer_seq(e)).code?V("清空队列成功",1):V("清空队列失败",2)},printerDisabled:n,switchprinterDisabled:async function(e){let t={storeID:f("storeID"),payload:JSON.stringify({printerDisabled:e.detail.value?1:0})};await un.update_store(t)},imMtStoreStatus:o,imEbStoreStatus:a,switchImMtStoreStatus:async function(e,t){let n=[{vendorID:t,vendorStoreID:1===t?r.value.vendorStoreID+"":i.value.vendorStoreID+"",vendorOrgCode:1===t?r.value.vendorOrgCode+"":i.value.vendorOrgCode+"",imStatus:e.detail.value?1:0}],o=await un.set_mt_store_im_status({data:JSON.stringify(n)});if(0==o.code){let n=[];qn.state.storeInfo.imOnlineStatus.forEach(o=>{o.vendorID===t?n.push({...o,imStatus:e.detail.value?1:0}):n.push({...o})}),qn.commit("storeInfo/setImOnlineStatus",n)}else uni.jxAlert({title:"提示",content:`修改失败:${o.desc||o.data}`,success:()=>{}})},isExistMtStore:s,isExistEbStore:l,printerFontSize:E,retryActive:I,changeRetry:function(e){I.value=e.detail.value,h("printerRetrySize",+e.detail.value)},backstage:function(){switch(uni.getSystemInfoSync().platform){case"android":uni.navigateTo({url:"/subPages/merchantChild/backstageApp/backstageApp"});break;case"ios":uni.jxAlert({title:"提示",content:"IOS暂不支持此功能"})}},accoutCancellation:function(){uni.jxConfirm({title:"注销账号",content:"您确定注销账号吗?如果确定注销账号请联系官方运行进行注销账号(预计7个工作日)。",success:()=>{uni.navigateTo({url:"/subPages/orderChild/getPhone/getPhone"})}})},switchCompatible:function(e){h("printerCompatible",e.detail.value)},outLogin:function(){t(),uni.navigateTo({url:"/subPages/login/wxLogin/wxLogin",animationType:"zoom-out"})},switchgoodsMoney:function(e){h("printerGoodsMoney",e.detail.value)},netPrinterData:u,defultNetPrinterValue:d,updateNetPrinter:async function(e){if("0"!==e.detail.value){d.value=e.detail.value;for(let t in m.value)m.value[t][0]+"打印机"===u.value[e.detail.value]&&(g.value=m.value[t],v.value.open())}else{d.value="","0"==(await un.update_store({storeID:qn.state.storeInfo.allStoreInfo.id,payload:JSON.stringify({printerVendorID:0,printerSN:"",printerKey:""})})).code?(V("删除成功",1),C()):V("删除失败",2)}},popup:v,scanCode:function(){uni.jxConfirm({title:"相机/相册权限说明",content:"便于您使用该功能扫描打印机上的二维码,快速识别并绑定打印机",success(){uni.scanCode({success:async({result:e})=>{let t={storeID:qn.state.storeInfo.allStoreInfo.id,data:e};0==(await un.bind_net_printer(t)).code?(V("绑定成功",1),d.value="2",C()):V("绑定失败",2)},fail:e=>{V("取消扫码",2),_()}})},fail(){d.value="2"}})},cancelPopup:_,currentNetPrinter:g,bindNetPrinter:y,handleConfirm:async function(){if(!y.value.printerSN)return V(`请输入${g.value[1]}`,2);if("不填"!==g.value[2]&&!y.value.printerKey)return V(`请输入${g.value[2]}`,2);let e="";for(let t in c.value)u.value[+d.value]===c.value[t]&&(e=t);"0"==(await un.update_store({storeID:qn.state.storeInfo.allStoreInfo.id,payload:JSON.stringify({printerVendorID:e,printerSN:y.value.printerSN,printerKey:y.value.printerKey})})).code?(V("绑定成功",1),C()):V("绑定失败",2),y.value.printerSN="",y.value.printerKey="",v.value.close()},setTime:async function(){uni.navigateTo({url:"/subPages/merchantChild/setBusinessTime/setBusinessTime"})},jumpBusinessStatus:function(){uni.navigateTo({url:"/subPages/merchantChild/setBusinessStatus/setBusinessStatus"})},orderReminder:B,changeOrderReminder:function(){B.value=!B.value,h("defaultOrderReminder",B.value?1:0)},jumpInvoiceSet:function(){uni.navigateTo({url:"/subPages/merchantChild/setInvoiceEB/setInvoiceEB"})},store:qn}}const Pd=Gn(e.defineComponent({__name:"setUp",setup(t){const{copyRight:n,smsNotifyData:o,defaultPrinter:a,defaultPrinterChange:r,smsNotify:i,bindMultiPickerChange:s,defaultPrinterValue:l,copyRightFn:c,bluetoothPrinterSetUp:u,switchUpc:d,newPrinterName:m,DeletePrinterSeq:p,printerDisabled:h,switchprinterDisabled:v,imMtStoreStatus:g,imEbStoreStatus:y,switchImMtStoreStatus:k,isExistMtStore:b,isExistEbStore:x,printerFontSize:S,retryActive:N,changeRetry:C,backstage:_,accoutCancellation:E,switchCompatible:I,outLogin:D,switchgoodsMoney:V,netPrinterData:B,defultNetPrinterValue:T,updateNetPrinter:P,popup:A,scanCode:O,cancelPopup:M,currentNetPrinter:L,bindNetPrinter:j,handleConfirm:F,setTime:U,jumpBusinessStatus:$,orderReminder:R,changeOrderReminder:z,jumpInvoiceSet:H,store:q}=Td();return(t,G)=>{const W=w(e.resolveDynamicComponent("jx-icon"),Yn),J=w(e.resolveDynamicComponent("jx-ios-android"),Nr),X=w(e.resolveDynamicComponent("uni-popup"),Ca),K=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"tips-root"},[e.createElementVNode("view",{class:"title-tip"},"通知")]),e.createVNode(J,{isShow:"android"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"copyRight-root"},[e.createElementVNode("view",{class:"item",onClick:G[0]||(G[0]=(...t)=>e.unref(_)&&e.unref(_)(...t))},[e.createElementVNode("text",null,"来单通知设置"),e.createVNode(W,{icon:"gengduo",color:"rgb(220, 220, 220)"})])])]),_:1}),e.createVNode(J,{isShow:"ios"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"copyRight-root"},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",null,"来单通知提醒"),e.createElementVNode("switch",{checked:e.unref(R),onChange:G[1]||(G[1]=(...t)=>e.unref(z)&&e.unref(z)(...t)),color:"#4EB331",style:{zoom:"0.85"}},null,40,["checked"])])])]),_:1}),e.createElementVNode("view",{class:"picking-root"},[e.createElementVNode("picker",{value:e.unref(i),range:e.unref(o),onChange:G[2]||(G[2]=(...t)=>e.unref(s)&&e.unref(s)(...t))},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",null,"未拣货提醒"),e.createElementVNode("view",{class:"text"},e.toDisplayString(e.unref(o)[+e.unref(i)]||"请选择"),1)])],40,["value","range"])]),e.createElementVNode("view",{class:"picking-root"},[e.createElementVNode("picker",{value:e.unref(l),range:e.unref(a),onChange:G[3]||(G[3]=(...t)=>e.unref(r)&&e.unref(r)(...t))},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",null,"选择默认使用打印机"),e.createElementVNode("view",{class:"text"},e.toDisplayString(e.unref(a)[+e.unref(l)]||"请选择"),1)])],40,["value","range"])]),e.createElementVNode("view",{class:"inter-printer"},[e.createElementVNode("view",{class:"title-tip"},"网络打印机"),e.createElementVNode("picker",{value:e.unref(T),range:e.unref(B),onChange:G[4]||(G[4]=(...t)=>e.unref(P)&&e.unref(P)(...t))},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",null,"网络打印机"),e.createElementVNode("view",{class:"printer-name"},e.toDisplayString(e.unref(B)[+e.unref(T)]||"未绑定"),1)])],40,["value","range"]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",null,"禁用网络打印机设置"),e.createElementVNode("switch",{checked:e.unref(h),onChange:G[5]||(G[5]=(...t)=>e.unref(v)&&e.unref(v)(...t)),color:"#4EB331",style:{zoom:"0.85"}},null,40,["checked"])]),e.createElementVNode("view",{class:"item",onClick:G[6]||(G[6]=(...t)=>e.unref(p)&&e.unref(p)(...t))},[e.createElementVNode("text",null,"清空打印队列"),e.createVNode(W,{icon:"gengduo",color:"rgb(220, 220, 220)"})])]),e.createElementVNode("view",{class:"bluetooth-printer"},[e.createElementVNode("view",{class:"title-tip"},"蓝牙打印机设置"),e.createElementVNode("view",{class:"item",onClick:G[7]||(G[7]=(...t)=>e.unref(u)&&e.unref(u)(...t))},[e.createElementVNode("view",null,"蓝牙打印机"),e.createElementVNode("text",{class:"printer-name"},e.toDisplayString(e.unref(m)),1)]),e.createElementVNode("picker",{value:e.unref(N),range:e.unref(S),onChange:G[8]||(G[8]=(...t)=>e.unref(C)&&e.unref(C)(...t))},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",null,"打印模板"),e.createElementVNode("text",{class:"text"},e.toDisplayString(e.unref(S)[+e.unref(N)]?e.unref(S)[+e.unref(N)]:"请选择"),1)])],40,["value","range"]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",null,"兼容模式"),e.createElementVNode("switch",{checked:e.unref(f)("printerCompatible"),onChange:G[9]||(G[9]=(...t)=>e.unref(I)&&e.unref(I)(...t)),color:"#4EB331",style:{zoom:"0.85"}},null,40,["checked"])]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",null,"不打印商品价格"),e.createElementVNode("switch",{checked:e.unref(f)("printerGoodsMoney"),onChange:G[10]||(G[10]=(...t)=>e.unref(V)&&e.unref(V)(...t)),color:"#4EB331",style:{zoom:"0.85"}},null,40,["checked"])]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",null,"是否打印UPC码"),e.createElementVNode("switch",{checked:e.unref(f)("isPrinterUpc"),onChange:G[11]||(G[11]=(...t)=>e.unref(d)&&e.unref(d)(...t)),color:"#4EB331",style:{zoom:"0.85"}},null,40,["checked"])])]),e.unref(b)||e.unref(x)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"inter-printer"},[e.createElementVNode("view",{class:"title-tip"},"消息设置"),e.unref(b)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"item"},[e.createElementVNode("view",null,"美团IM单聊状态"),e.unref(q).getters["storeInfo/imMtStatus"][0].errMsg?(e.openBlock(),e.createElementBlock("text",{key:1,class:"printer-name"},"未知状态")):(e.openBlock(),e.createElementBlock("switch",{key:0,checked:e.unref(g),onChange:G[12]||(G[12]=t=>e.unref(k)(t,1)),color:"#4EB331",style:{zoom:"0.85"}},null,40,["checked"]))])):e.createCommentVNode("",!0),e.unref(x)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"item"},[e.createElementVNode("view",null,"饿百IM单聊状态"),e.unref(q).getters["storeInfo/imEbStatus"][0].errMsg?(e.openBlock(),e.createElementBlock("text",{key:1,class:"printer-name"},"未知状态")):(e.openBlock(),e.createElementBlock("switch",{key:0,checked:e.unref(y),onChange:G[13]||(G[13]=t=>e.unref(k)(t,3)),color:"#4EB331",style:{zoom:"0.85"}},null,40,["checked"]))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"inter-printer"},[e.createElementVNode("view",{class:"title-tip"},"其它设置"),e.createElementVNode("view",{class:"item",onClick:G[14]||(G[14]=(...t)=>e.unref($)&&e.unref($)(...t))},[e.createElementVNode("view",null,"营业状态设置"),e.createVNode(W,{icon:"gengduo",color:"rgb(220, 220, 220)"})]),e.createElementVNode("view",{class:"item",onClick:G[15]||(G[15]=(...t)=>e.unref(U)&&e.unref(U)(...t))},[e.createElementVNode("view",null,"营业时间设置"),e.createVNode(W,{icon:"gengduo",color:"rgb(220, 220, 220)"})]),e.unref(x)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"item",onClick:G[16]||(G[16]=(...t)=>e.unref(H)&&e.unref(H)(...t))},[e.createElementVNode("view",null,"发票设置(饿百)"),e.createVNode(W,{icon:"gengduo",color:"rgb(220, 220, 220)"})])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"copyRight-root"},[e.createElementVNode("view",{class:"title-tip"},"关于"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),t=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:t.id,onClick:n=>e.unref(c)(t.url,t.id)},[e.createElementVNode("text",null,e.toDisplayString(t.title),1),e.createVNode(W,{icon:"gengduo",color:"rgb(220, 220, 220)"})],8,["onClick"]))),128))]),e.createVNode(X,{ref_key:"popup",ref:A,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("view",{class:"text"},e.toDisplayString(e.unref(B)[+e.unref(T)]),1),e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"digit",placeholder:"请输入"+e.unref(L)[1],"onUpdate:modelValue":G[17]||(G[17]=t=>e.unref(j).printerSN=t)},null,8,["placeholder"]),[[e.vModelText,e.unref(j).printerSN]]),"不填"!==e.unref(L)[2]?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,style:{"margin-top":"20rpx"},class:"ipt",type:"digit",placeholder:"请输入"+e.unref(L)[2],"onUpdate:modelValue":G[18]||(G[18]=t=>e.unref(j).printerKey=t)},null,8,["placeholder"])),[[e.vModelText,e.unref(j).printerKey]]):e.createCommentVNode("",!0),"易联云打印机"===e.unref(B)[+e.unref(T)]?(e.openBlock(),e.createElementBlock("view",{key:1,class:"scan-code",onClick:G[19]||(G[19]=(...t)=>e.unref(O)&&e.unref(O)(...t))},"扫码绑定")):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:G[20]||(G[20]=(...t)=>e.unref(M)&&e.unref(M)(...t))},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:G[21]||(G[21]=(...t)=>e.unref(F)&&e.unref(F)(...t))},"确定")])])]),_:1},512),e.createElementVNode("view",{class:"outLogin-root"},[e.createElementVNode("text",{class:"accoutCancellation",onClick:G[22]||(G[22]=(...t)=>e.unref(E)&&e.unref(E)(...t))},"注销账号"),e.createElementVNode("text",{class:"outLogin",onClick:G[23]||(G[23]=(...t)=>e.unref(D)&&e.unref(D)(...t))},"退出登录")]),e.createVNode(K)],64)}}}),[["__scopeId","data-v-271adfdc"]]);function Ad(){const t=new Ut,{bluetoothPrinter:n}=aa(),{setPrinterStatus:o}=tn();C(()=>{let e=JSON.parse(qn.state.serveInfo.sysInfo);"android"==e.platform&&Dt("4.3.0",e.osVersion)&&uni.jxAlert({title:"温馨提示",content:"当前系统版本过低,请升级",success:()=>{uni.navigateBack()}}),"ios"==e.platform&&Dt("4.3.0",e.osVersion),u.value=function(){let e=f("deviceName");return e||"请选择设备"}(),d.value=f("deviceId"),t.openBluetoothAdapter()});const a=e.ref(!1);const r=Bt({time:5e3,success:()=>{t.openBluetoothAdapter().then(e=>{Gt.getBTAdapterState().then(e=>{var n;e.available?e.discovering?t.stopBluetoothDevicesDiscovery():null==(n=t.startBluetoothDevicesDiscovery())||n.then(e=>{s.value=!0,uni.showLoading({title:"正在搜索蓝牙...",mask:!0}),clearTimeout(l),l=setTimeout(()=>{t.getBluetoothDevices().then(e=>{for(var n=[],o=0,a=0;a<e.devices.length;++a)""!=e.devices[a].name&&""!=e.devices[a].localName&&(n[o]=e.devices[a],n[o].RSSI=Math.floor(c(0,n[o].RSSI+100)/10),o++);i.value.list=n,t.stopBluetoothDevicesDiscovery()}).catch(e=>{V(e)}).finally(()=>{s.value=!1,uni.hideLoading()})},2e3)}).catch(e=>{V(e)}):V("本机蓝牙不可用")}).catch(e=>{V(e)})}).catch(e=>{V(e)})},fail:e=>{V(`请${e}秒后再试`)}});const i=e.ref({list:[],services:[],serviceId:0,writeCharacter:!1,readCharacter:!1,notifyCharacter:!1}),s=e.ref(!1);let l=null;function c(e,t){return Math.max(e,t)}const u=e.ref(""),d=e.ref(""),m=e.ref([]);let p=null;function g(){let e=f("commitBTDevCharact");Gt.notifyBLEState(e.deviceId,e.serviceId,e.uuid).then(e=>{switch(e){case 12:V("打印机正常");break;case 32:V("打印机缺纸");break;case 36:V("开盖、缺纸");break;case 16:V("打印机开盖");break;case 40:V("打印机未启动");break;default:V("设备断开")}}).catch(e=>{V(e),u.value="请选择设备",d.value=""})}return e.onBeforeUnmount(()=>{clearTimeout(l),clearTimeout(p),clearTimeout(null)}),{printerName:u,blueToothChecked:a,initBlue:function(){uni.jxConfirm({title:"位置/设备信息权限说明",content:"便于搜索您附近的蓝牙设备(含打印功能),在连接成功后,可以进行订单信息的打印",success(){r()}})},setData:i,setState:g,linkBLE:async function(e,n){t.deviceId=e,m.value=[];try{await t.createBLEConnection(),uni.showLoading({title:"正在获取蓝牙设备服务"}),await t.getBLEDeviceServices().then(t=>{uni.hideLoading(),m.value=t,t.forEach(t=>{!function(e,t,n){let a={deviceId:e,serviceId:t,deviceName:n,uuid:""};uni.getBLEDeviceCharacteristics({deviceId:e,serviceId:t,success:t=>{t.characteristics.forEach(t=>{t.properties.read&&t.properties.write&&t.properties.notify&&(a.uuid=t.uuid,h("commitBTDevCharact",a),V("连接成功"),o(),qn.commit("storeInfo/setIsConnectPrinter",!0),u.value=n,d.value=e,h("deviceId",e),h("deviceName",n),clearTimeout(p),p=setTimeout(()=>{g(),clearTimeout(p)},2500))})},fail:e=>{u.value="请选择设备",d.value="",V("获取打印机权限失败请重试")}})}(e,t.uuid,n)})})}catch(ts){uni.hideLoading(),uni.jxAlert({title:"提示",content:"连接失败,请重试,或者先断开其他已经连接的设备"})}},closeBLE:function(e){u.value="请选择设备",d.value="",v("deviceId"),v("deviceName"),v("commitBTDevCharact"),t.deviceId=e,t.closeBLEConnection()},testPrint:function(){Gt.getBTAdapterState().then(async()=>{n("901234567890123")}).catch(()=>{uni.jxAlert({title:"提示",content:"请打开蓝牙和定位"})})},printerVID:d,isScanning:s,clearPrinter:function(){v("deviceId"),v("deviceName"),v("commitBTDevCharact"),uni.jxAlert({title:"提示",content:"清除缓存成功,请重新启动软件!",success:()=>{plus.runtime.restart()}})}}}const Od=Gn(e.defineComponent({__name:"printerSetUp",setup(t){const{printerName:n,initBlue:o,setData:a,linkBLE:r,setState:i,closeBLE:s,testPrint:l,printerVID:c,isScanning:u,clearPrinter:d}=Ad();return(t,m)=>{const p=w(e.resolveDynamicComponent("jx-empty"),Jn),f=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",null,[e.createElementVNode("view",{class:"Tips"},"(Android8.0+系统需开启定位)"),e.createElementVNode("view",{class:"Tipss"},"温馨提示一:蓝牙打印机由于本身属性相对不稳定,如果出现连接失败的情况请多试几次,打印机每隔20秒会重连一次。"),e.createElementVNode("view",{class:"Tipss"},"温馨提示二:由于蓝牙传输数据不稳定以及受其他外界环境因素等影响,如果在打印过程中出现打印错乱或打印信息缺失,请重新打印。"),e.createElementVNode("view",{class:"Tipss"},"温馨提示三:当无法连接打印机时,请点击清除缓存并重新启动软件。"),e.createElementVNode("view",{class:"printer-root"},[e.createElementVNode("view",{class:"left"},[e.createElementVNode("view",null,"当前设备"),e.createElementVNode("view",null,e.toDisplayString(e.unref(n)),1)]),e.createElementVNode("view",{class:"right"},[e.createElementVNode("button",{"hover-class":"active1","hover-start-time":"0","hover-stay-time":"10",class:"btn",onClick:m[0]||(m[0]=(...t)=>e.unref(o)&&e.unref(o)(...t)),loading:e.unref(u)}," 搜索蓝牙 ",8,["loading"]),e.createElementVNode("button",{class:"btn setState",onClick:m[1]||(m[1]=(...t)=>e.unref(i)&&e.unref(i)(...t)),"hover-start-time":"0","hover-stay-time":"10","hover-class":"active2"}," 设备状态 ")])]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("button",{class:"btn text-printer1","hover-start-time":"0","hover-stay-time":"10","hover-class":"active4",onClick:m[2]||(m[2]=(...t)=>e.unref(d)&&e.unref(d)(...t))}," 清除缓存 "),e.createElementVNode("button",{class:"btn text-printer","hover-start-time":"0","hover-stay-time":"10","hover-class":"active3",onClick:m[3]||(m[3]=(...t)=>e.unref(l)&&e.unref(l)(...t))}," 测试打印 ")]),e.createElementVNode("view",{class:"printer-list"},[e.createElementVNode("view",{class:"fjsb"},"附近打印设备"),e.withDirectives(e.createElementVNode("view",{class:"bt-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).list,(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,class:"bt-item"},[e.createElementVNode("view",{class:"singleLeft"},[e.createElementVNode("div",{class:"dev-single-name"},[e.createElementVNode("div",{class:"single"},[e.createElementVNode("div",{class:e.normalizeClass({cgreen:t.RSSI>=1}),style:{height:"8rpx"}},null,2),e.createElementVNode("div",{class:e.normalizeClass({cgreen:t.RSSI>=2}),style:{height:"12rpx"}},null,2),e.createElementVNode("div",{class:e.normalizeClass({cgreen:t.RSSI>=3}),style:{height:"15rpx"}},null,2),e.createElementVNode("div",{class:e.normalizeClass({cgreen:t.RSSI>=4}),style:{height:"19rpx"}},null,2),e.createElementVNode("div",{class:e.normalizeClass({cgreen:t.RSSI>=5}),style:{height:"22rpx"}},null,2)]),e.createElementVNode("div",{class:"dev-name"},[e.createElementVNode("div",null,e.toDisplayString(t.name?t.name:"未知设备"),1),e.createElementVNode("div",null,e.toDisplayString(t.deviceId),1)])])]),e.createElementVNode("view",{class:"singleRight"},[e.unref(c)==t.deviceId?(e.openBlock(),e.createElementBlock("view",{key:0,class:"link-btn activelink",onClick:n=>e.unref(s)(t.deviceId)},"取消",8,["onClick"])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"link-btn",onClick:n=>e.unref(r)(t.deviceId,t.name)},"选择",8,["onClick"]))])]))),128))],512),[[e.vShow,0!=e.unref(a).list.length]]),e.withDirectives(e.createVNode(p,{title:"未发现附近打印设备"},null,512),[[e.vShow,0==e.unref(a).list.length]])])]),e.createVNode(f)],64)}}}),[["__scopeId","data-v-638f95cb"]]),Md=Gn(e.defineComponent({__name:"jx-upload-img",props:{title:{},type:{},img:{}},emits:["imgChange"],setup(t,{emit:n}){const o=n,a=e.ref(!1);function r(){uni.jxConfirm({title:"提示",content:"确定要删除此图片吗",success:()=>{o("imgChange",{img:"",type:"delet"}),a.value=!1}})}function i(){uni.jxConfirm({title:"相机/相册权限说明",content:"便于您使用该功能拍照上传您的照片/图片用于同步第三方平台信息等场景中使用相机或读取相册文件内容",success(){uni.chooseImage({count:1,sizeType:["original"],sourceType:["album","camera"],success(e){o("imgChange",{img:e.tempFilePaths[0],type:"upload"}),a.value=!1}})}})}return x(()=>{a.value=!1}),(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"upload-pic"},[e.createElementVNode("view",{class:"pic-title"},e.toDisplayString(t.title),1),e.createElementVNode("view",{class:"pic-wrapper",style:e.normalizeStyle({"justify-content":"invoiceImg"===t.type?"center":""})},[e.createElementVNode("view",{class:"left",onClick:n[1]||(n[1]=e=>a.value=!0)},["invoiceImg"!==t.type||t.img?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass({isInvoice:"invoiceImg"===t.type})},"点击上传",2)),e.createElementVNode("view",{class:e.normalizeClass(["upload-btn",{active:a.value}])},[e.createElementVNode("text",{onClick:e.withModifiers(i,["stop"]),class:"upload-img"},e.toDisplayString(t.img?"修改":"上传"),1),t.img?(e.openBlock(),e.createElementBlock("text",{key:0,onClick:e.withModifiers(r,["stop"]),class:"delete"},"删 除")):e.createCommentVNode("",!0),e.createElementVNode("text",{onClick:n[0]||(n[0]=e.withModifiers(e=>a.value=!1,["stop"])),class:"upload-cancel"},"取 消")],2),t.img?(e.openBlock(),e.createElementBlock("img",{key:1,class:"img",src:t.img},null,8,["src"])):e.createCommentVNode("",!0),"idCardFront"!==t.type||t.img?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("img",{key:2,src:"https://image.jxc4.com/image/d40844356c5d03975cca9f9bff6e3aeb.png"})),"idCardBack"!==t.type||t.img?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("img",{key:3,class:"img",src:"https://image.jxc4.com/image/388f6e26316128c33591f6b1ce6aaed0.png"})),"idCardHand"!==t.type||t.img?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("img",{key:4,class:"img",src:"https://image.jxc4.com/image/1f173d964970abb13921431a2c2cde02.png"})),"licence"!==t.type||t.img?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("img",{key:5,class:"img",src:"https://image.jxc4.com/image/06ba0d91dd8bae128776358af0e3b0b1.png"})),"licence2Image"!==t.type||t.img?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("img",{key:6,class:"img",src:"https://image.jxc4.com/image/ab82b2445366d3579b7064987787f3b6.png"}))]),"invoiceImg"!==t.type?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["right",{"card-front":"idCardFront"===t.type,"card-back":"idCardBack"===t.type,"card-hand":"idCardHand"===t.type,licence:"licence"===t.type,licence2:"licence2Image"===t.type}])},null,2)):e.createCommentVNode("",!0)],4)]))}}),[["__scopeId","data-v-58012523"]]);function Ld(){var e={qiniuUploadURL:"",qiniuImageURLPrefix:"",qiniuUploadToken:"",qiniuUploadTokenURL:"",qiniuUploadTokenFunction:null};function t(t){e={qiniuUploadURL:"",qiniuImageURLPrefix:"",qiniuUploadToken:"",qiniuUploadTokenURL:"",qiniuUploadTokenFunction:null},function(t){t.uploadURL?e.qiniuUploadURL=t.uploadURL:k("error","at utils/qiniuUploader.ts:25","qiniu uploader need uploadURL");t.uptoken?e.qiniuUploadToken=t.uptoken:t.uptokenURL?e.qiniuUploadTokenURL=t.uptokenURL:t.uptokenFunc&&(e.qiniuUploadTokenFunction=t.uptokenFunc);t.domain&&(e.qiniuImageURLPrefix=t.domain)}(t)}function n(t,n,o,a){var r=e.qiniuUploadURL,i=t.split("//")[1];a&&a.key&&(i=a.key);var s={token:e.qiniuUploadToken,key:i};uni.uploadFile({url:r,filePath:t,name:"file",formData:s,success:function(t){var o=t.data,a=JSON.parse(o),r=e.qiniuImageURLPrefix+a.key;a.imageURL=r,n(a)},fail:function(e){o(e)}})}return{init:t,upload:function(o,a,r,i){if(null!=o)if(i&&t(i),e.qiniuUploadToken)n(o,a,r,i);else if(e.qiniuUploadTokenURL)!function(t){uni.request({url:e.qiniuUploadTokenURL,success:function(n){var o=n.data.uptoken;e.qiniuUploadToken=o,t&&t()},fail:function(e){k("log","at utils/qiniuUploader.ts:106",e)}})}(function(){n(o,a,r,i)});else{if(!e.qiniuUploadTokenFunction)return void k("error","at utils/qiniuUploader.ts:60","qiniu uploader need one of [uptoken, uptokenURL, uptokenFunc]");e.qiniuUploadToken=e.qiniuUploadTokenFunction()}else k("error","at utils/qiniuUploader.ts:43","qiniu uploader need filePath to upload")}}}function jd(){const t=Ld();C(async()=>{await function(){let e=qn.state.storeInfo.allStoreInfo;n.value.licenceCode=e.licenceCode,n.value.licenceType=e.licenceType,n.value.licenceCorpName=e.licenceCorpName,n.value.licenceOwnerName=e.licenceOwnerName,n.value.licenceAddress=e.licenceAddress,n.value.licenceValid=e.licenceValid,n.value.licence2Code=e.licence2Code,n.value.licenceExpire=e.licenceExpire,n.value.licence2Valid=e.licence2Valid,n.value.licence2Expire=e.licence2Expire,r.value.licence=e.licence,r.value.licence2Image=e.licence2Image}()});const n=e.ref({licenceCode:"",typeArr:["个人","公司"],licenceType:0,licenceCorpName:"",licenceOwnerName:"",licenceAddress:"",licenceValid:"",licence2Code:"",licenceExpire:"",licence2Valid:"",licence2Expire:""});const o=e.computed(()=>0===parseInt(""+n.value.licenceType,10)?"个人":1===parseInt(""+n.value.licenceType,10)?"公司":"");const a=e.ref("https://image.jxc4.com/"),r=e.ref({licence:"",licence2Image:""});async function i(e,n){let o={suffix:-1===e.img.indexOf(".png")?".jpg":".png"},i=await un.get_qiniu_upload_token(o);if(0==i.code){let o=e.img;t.upload(o,e=>{let t=a.value+e.key;r.value[n]=t},e=>{V("上传失败,请重试",2)},{uploadURL:"https://up-z2.qiniup.com/",key:i.data.fileName,uptoken:i.data.token})}else V("上传失败",2)}return{businessData:n,typeChange:function(e){n.value.licenceType=e.target.value},licenceTypeText:o,fnDateChange:function(e,t){1==t&&(n.value.licenceValid=e.detail.value),2==t&&(n.value.licenceExpire=e.detail.value),3==t&&(n.value.licence2Valid=e.detail.value),4==t&&(n.value.licence2Expire=e.detail.value)},imgChangeLicence:function(e){"delet"==e.type&&(r.value.licence=""),"upload"==e.type&&i(e,"licence")},imgChangeLicence2Image:function(e){"delet"==e.type&&(r.value.licence2Image=""),"upload"==e.type&&i(e,"licence2Image")},confirmSubmit:function(){uni.jxConfirm({title:"提示",content:"您确定要修改信息吗?",success:async()=>{let e={storeID:f("storeID"),payload:JSON.stringify({licenceCode:n.value.licenceCode,licenceType:n.value.licenceType,licenceCorpName:n.value.licenceCorpName,licenceOwnerName:n.value.licenceOwnerName,licenceAddress:n.value.licenceAddress,licenceValid:n.value.licenceValid,licenceExpire:n.value.licenceExpire,licence2Code:n.value.licence2Code,licence2Valid:n.value.licence2Valid,licence2Expire:n.value.licence2Expire,licence:r.value.licence,licence2Image:r.value.licence2Image})};0==(await un.update_store(e)).code?(V("修改成功",1),setTimeout(()=>{uni.navigateBack()},1500)):V("修改失败",2)}})},imgUrls:r}}const Fd=Gn(e.defineComponent({__name:"businessLicense",setup(t){const{businessData:n,typeChange:o,licenceTypeText:a,fnDateChange:r,imgChangeLicence:i,imgChangeLicence2Image:s,confirmSubmit:l,imgUrls:c}=jd();return(t,u)=>{const d=w(e.resolveDynamicComponent("jx-upload-img"),Md),m=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock("view",{class:"business-license"},[e.createElementVNode("view",{class:"title"},"营业执照相关"),e.createElementVNode("view",{class:"cell"},[e.createElementVNode("text",null,"营业执照编号:"),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":u[0]||(u[0]=t=>e.unref(n).licenceCode=t),placeholder:"请输入营业执照编号"},null,512),[[e.vModelText,e.unref(n).licenceCode,void 0,{trim:!0}]])]),e.createElementVNode("picker",{onChange:u[1]||(u[1]=(...t)=>e.unref(o)&&e.unref(o)(...t)),range:e.unref(n).typeArr},[e.createElementVNode("view",{class:"cell"},[e.createElementVNode("text",null,"营业执照类型:"),e.createElementVNode("view",{class:"licence-type"},e.toDisplayString(e.unref(a)),1)])],40,["range"]),e.createElementVNode("view",{class:"cell"},[e.createElementVNode("text",null,"公司名称:"),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":u[2]||(u[2]=t=>e.unref(n).licenceCorpName=t),placeholder:"请输入营业执照公司名称"},null,512),[[e.vModelText,e.unref(n).licenceCorpName,void 0,{trim:!0}]])]),e.createElementVNode("view",{class:"cell"},[e.createElementVNode("text",null,"法人姓名:"),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":u[3]||(u[3]=t=>e.unref(n).licenceOwnerName=t),placeholder:"请输入营业执照公法人姓名"},null,512),[[e.vModelText,e.unref(n).licenceOwnerName,void 0,{trim:!0}]])]),e.createElementVNode("view",{class:"cell"},[e.createElementVNode("text",null,"地址:"),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":u[4]||(u[4]=t=>e.unref(n).licenceAddress=t),placeholder:"请输入营业执照地址"},null,512),[[e.vModelText,e.unref(n).licenceAddress,void 0,{trim:!0}]])]),e.createElementVNode("view",{class:"cell"},[e.createElementVNode("text",null,"有效期:"),e.createElementVNode("view",{class:"range-date"},[e.createElementVNode("picker",{mode:"date",value:e.unref(n).licenceValid,onChange:u[5]||(u[5]=t=>e.unref(r)(t,1))},[e.createElementVNode("view",{class:"time"},e.toDisplayString(e.unref(n).licenceValid||"请选择"),1)],40,["value"]),e.createElementVNode("view",{class:""},"至"),e.createElementVNode("picker",{mode:"date",value:e.unref(n).licenceExpire,onChange:u[6]||(u[6]=t=>e.unref(r)(t,2))},[e.createElementVNode("view",{class:"time"},e.toDisplayString(e.unref(n).licenceExpire||"请选择"),1)],40,["value"])])]),e.createVNode(d,{title:"营业执照:",type:"licence",img:e.unref(c).licence,onImgChange:e.unref(i)},null,8,["img","onImgChange"]),e.createElementVNode("view",{class:"title"},"食品经营许可证相关"),e.createElementVNode("view",{class:"cell"},[e.createElementVNode("text",null,"证件编号:"),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":u[7]||(u[7]=t=>e.unref(n).licence2Code=t),placeholder:"请输入食品经营许可证编号"},null,512),[[e.vModelText,e.unref(n).licence2Code,void 0,{trim:!0}]])]),e.createElementVNode("view",{class:"cell"},[e.createElementVNode("text",null,"有效期:"),e.createElementVNode("view",{class:"range-date"},[e.createElementVNode("picker",{mode:"date",value:e.unref(n).licence2Valid,onChange:u[8]||(u[8]=t=>e.unref(r)(t,3))},[e.createElementVNode("view",{class:"time"},e.toDisplayString(e.unref(n).licence2Valid||"请选择"),1)],40,["value"]),e.createElementVNode("view",{class:""},"至"),e.createElementVNode("picker",{mode:"date",value:e.unref(n).licence2Expire,onChange:u[9]||(u[9]=t=>e.unref(r)(t,4))},[e.createElementVNode("view",{class:"time"},e.toDisplayString(e.unref(n).licence2Expire||"请选择"),1)],40,["value"])])]),e.createVNode(d,{title:"食品经营许可证图片:",type:"licence2Image",img:e.unref(c).licence2Image,onImgChange:e.unref(s)},null,8,["img","onImgChange"]),e.createElementVNode("view",{style:{height:"120rpx"}}),e.createElementVNode("view",{class:"submit-btn",onClick:u[10]||(u[10]=(...t)=>e.unref(l)&&e.unref(l)(...t))},"提 交"),e.createVNode(m)])}}}),[["__scopeId","data-v-8d28bb23"]]),Ud=Gn(e.defineComponent({__name:"backstageApp",setup(t){const n=y("RC-NoticeMonitoring"),o=e.ref(!1),a=e.ref(!1),r=e.ref(!1),i=e.ref("");x(()=>{n.isBatteryOptimizations(e=>{o.value=1==e}),n.isNotification(e=>{a.value=1==e}),async function(){let e=await un.get_self_info();0==e.code&&(f("cid")==e.data.c_id?c.value=!1:c.value=!0)}()});const s=e.ref([{title:"需开启使用通知权限",type:1},{title:"需开启锁屏通知权限",type:2},{title:"需忽略电池优化",type:3},{title:"来单通知测试",type:4}]);function l(e){switch(e){case 1:uni.navigateTo({url:"/subPages/merchantChild/setNotice/setNotice"});break;case 2:n.OpenNoticePermission(e=>{V("权限已开启",3)});break;case 3:n.OpenBatteryOptimizations(e=>{V("权限已开启",3)});break;case 4:!async function(){if(c.value)return;if(0===i.value.length)return V("请填写订单号");let e=await ho({vendorOrderID:i.value});if(e.data.totalCount){if(e.data.data[0].jxStoreID!==f("storeID"))return V("门店信息有误,请重新登录");await Zo(i.value),V("推送成功")}else V("未查询到该订单,请确认订单号是否正确")}()}}let c=e.ref(!1);return(t,n)=>{const u=w(e.resolveDynamicComponent("jx-icon"),Yn);return e.openBlock(),e.createElementBlock("view",{class:"backstageApp-root"},[e.createElementVNode("view",{class:"title-root"},[e.createTextVNode("Android由于省电设置与后台进程限制,为了确保京西菜市在后台或者锁屏状态下有一个好的运行效果,请检查以下设置都已按要求设置完成。 "),e.createElementVNode("br"),e.createTextVNode(" 注意:通知权限较为特殊请按教程进行设置。")]),e.createElementVNode("view",{class:"backstageList",onClick:n[0]||(n[0]=e=>l(s.value[0].type))},[e.createElementVNode("view",{class:"title"},e.toDisplayString(s.value[0].title),1),e.createElementVNode("view",{class:"center-root"},[r.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"right rigeht-ok"},[e.createVNode(u,{icon:"zhengque",color:"#4eb331"}),e.createTextVNode("已设置")])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"right"},[e.createTextVNode("去设置"),e.createVNode(u,{icon:"gengduo",color:"#4eb331"})]))])]),e.createElementVNode("view",{class:"backstageList",onClick:n[1]||(n[1]=e=>l(s.value[1].type))},[e.createElementVNode("view",{class:"title"},e.toDisplayString(s.value[1].title),1),e.createElementVNode("view",{class:"center-root"},[a.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"right rigeht-ok"},[e.createVNode(u,{icon:"zhengque",color:"#4eb331"}),e.createTextVNode("已设置")])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"right"},[e.createTextVNode("去设置"),e.createVNode(u,{icon:"gengduo",color:"#4eb331"})]))])]),e.createElementVNode("view",{class:"backstageList",onClick:n[2]||(n[2]=e=>l(s.value[2].type))},[e.createElementVNode("view",{class:"title"},e.toDisplayString(s.value[2].title),1),e.createElementVNode("view",{class:"center-root"},[o.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"right rigeht-ok"},[e.createVNode(u,{icon:"zhengque",color:"#4eb331"}),e.createTextVNode(" 已设置 ")])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"right"},[e.createTextVNode("去设置"),e.createVNode(u,{icon:"gengduo",color:"#4eb331"})]))])]),e.createElementVNode("view",{class:"backstageList"},[e.createElementVNode("view",{class:"title",style:{display:"flex"}},[e.createElementVNode("view",{style:{"white-space":"nowrap",width:"fit-content"}},e.toDisplayString(s.value[3].title)+": ",1),e.withDirectives(e.createElementVNode("input",{class:"ipt","onUpdate:modelValue":n[3]||(n[3]=e=>i.value=e),placeholder:e.unref(c)?"请重新登录更新通知信息":"请输入订单号",style:e.normalizeStyle([{border:"1rpx solid #eee","margin-top":"-4rpx","font-weight":"lighter",padding:"10rpx","font-size":"28rpx"},{backgroundColor:e.unref(c)?"#eee":""}]),"confirm-type":"search",disabled:e.unref(c)},null,12,["placeholder","disabled"]),[[e.vModelText,i.value]])]),e.createElementVNode("view",{class:"center-root"},[e.createElementVNode("view",{class:"right",style:{width:"100rpx"},onClick:n[4]||(n[4]=e=>l(s.value[3].type))},"测试")])])])}}}),[["__scopeId","data-v-7909063c"]]),$d=Gn(e.defineComponent({__name:"useInfo",setup(t){const{copyInfo:n,logOutFn:o,previewImage:a}=tn(),r=e.ref(""),i=e.ref(""),s=e.ref("");return(t,l)=>{const c=w(e.resolveDynamicComponent("uni-easyinput"),Xc);return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("view",{class:"avatar"},[e.createElementVNode("image",{onClick:l[0]||(l[0]=t=>e.unref(a)("https://image.jxc4.com/image/70143fcf48aefe74537533f35a0a8153.jpg")),src:"https://image.jxc4.com/image/70143fcf48aefe74537533f35a0a8153.jpg",mode:"scaleToFill"})]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",null,"用 户 名:"),e.createElementVNode("text",{class:"number",onClick:l[1]||(l[1]=t=>e.unref(n)(e.unref(f)("userID2")))},e.toDisplayString(e.unref(f)("userID2")),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",null,"手 机 号:"),e.createElementVNode("text",{class:"number",onClick:l[2]||(l[2]=t=>e.unref(n)(e.unref(f)("mobile")))},e.toDisplayString(e.unref(f)("mobile")),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",null,"原 密 码:"),e.createVNode(c,{primaryColor:"#aaa",class:"input",inputBorder:!1,type:"password",modelValue:r.value,"onUpdate:modelValue":l[3]||(l[3]=e=>r.value=e),placeholder:"输入原密码(首次设置密码无需输入)"},null,8,["modelValue"])]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",null,"新 密 码:"),e.createVNode(c,{primaryColor:"#aaa",class:"input",type:"password",inputBorder:!1,modelValue:i.value,"onUpdate:modelValue":l[4]||(l[4]=e=>i.value=e),placeholder:"输入新密码"},null,8,["modelValue"])]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",null,"确认密码:"),e.createVNode(c,{primaryColor:"#aaa",class:"input",type:"password",inputBorder:!1,modelValue:s.value,"onUpdate:modelValue":l[5]||(l[5]=e=>s.value=e),placeholder:"确认密码"},null,8,["modelValue"])]),e.createElementVNode("view",{class:"btn",onClick:l[6]||(l[6]=e=>async function(e){if(i.value!=s.value)return V("两次密码不一致");let t={oldPwd:Zc(r.value),newPwd:Zc(e)},n=await Qt(t);0==n.code?uni.jxAlert({title:"提示",content:"密码修改成功",success:()=>{o(),uni.reLaunch({url:"/subPages/login/wxLogin/wxLogin"})}}):V(n.desc,2)}(s.value))},"确认修改")])}}}),[["__scopeId","data-v-0b7d3456"]]),Rd=Gn(e.defineComponent({__name:"payeeInfo",setup(t){const{copyInfo:n,previewImage:o}=tn(),a=qn.state.storeInfo.allStoreInfo,r=e.ref(),i=e.ref("");function s(){n(`收款人姓名:${a.payeeName}\n开户银行:${a.payeeBankCode}\n开户支行:${a.payeeBankBranchName}\n收款账号:${a.payeeAccountNo}`),V("复制成功"),r.value.close()}function l(e,t){const n=new RegExp(".","g");return"part"===t?e.substring(0,1)+"*"+e.substring(e.length-1,e.length):e.replace(n,"*")}return(t,n)=>{const c=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",null,[e.createElementVNode("view",{class:"avatar"},[e.createElementVNode("image",{onClick:n[0]||(n[0]=t=>e.unref(o)("http://image.jxc4.com/image/70143fcf48aefe74537533f35a0a8153.jpg")),src:"http://image.jxc4.com/image/70143fcf48aefe74537533f35a0a8153.jpg",mode:"scaleToFill"})]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"收款人姓名:"),e.createElementVNode("text",{class:"number"},e.toDisplayString(l(e.unref(a).payeeName,"part")),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"开户银行:"),e.createElementVNode("text",{class:"number"},e.toDisplayString(l(e.unref(a).payeeBankCode,"all")),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"开户支行:"),e.createElementVNode("text",{class:"number"},e.toDisplayString(l(e.unref(a).payeeBankBranchName,"all")),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"收款账号:"),e.createElementVNode("text",{class:"number"},e.toDisplayString(l(e.unref(a).payeeAccountNo,"all")),1)]),e.createElementVNode("view",{class:"btn",onClick:n[1]||(n[1]=e=>r.value.open())},"查看详细信息")]),e.createVNode(c,{ref_key:"popup",ref:r,type:"center"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("text",{class:"text"},e.toDisplayString(i.value===e.unref(a).payeeName?"收款信息":"验证收款人信息"),1),i.value!==e.unref(a).payeeName?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,class:"ipt","onUpdate:modelValue":n[2]||(n[2]=e=>i.value=e),placeholder:"请输入完整的姓名"},null,512)),[[e.vModelText,i.value]]):(e.openBlock(),e.createElementBlock("view",{key:1,class:"tip"},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"收款人姓名:"),e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(a).payeeName),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"开户银行:"),e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(a).payeeBankCode),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"开户支行:"),e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(a).payeeBankBranchName),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("text",{class:"title"},"收款账号:"),e.createElementVNode("text",{class:"number"},e.toDisplayString(e.unref(a).payeeAccountNo),1)])])),i.value===e.unref(a).payeeName?(e.openBlock(),e.createElementBlock("view",{key:2,class:"btn-root"},[e.createElementVNode("view",{class:"btn-ok",onClick:s},"复制")])):e.createCommentVNode("",!0)])]),_:1},512)],64)}}}),[["__scopeId","data-v-c19ecaec"]]),zd=e.defineComponent({__name:"invoice",setup(t){const n=e.ref(`${Et(+new Date-6048e5)}`),o=e.ref(`${Et()}`),a=e.ref([]),r=e.ref([]),i=e.ref(null),s=e.ref({}),l=e.ref(""),c=e.ref(""),u=Ld();C(async()=>{if(qn.getters["storeInfo/imMtStatus"]&&qn.getters["storeInfo/imMtStatus"].length>0&&y("mt"),qn.getters["storeInfo/platformInfo"]&&qn.getters["storeInfo/platformInfo"].length>0){let e=qn.getters["storeInfo/platformInfo"].filter(e=>3===e.vendorID);"{}"!==JSON.stringify(e)&&y("eb",e[0])}});const d=e=>{"delet"==e.type&&(c.value=""),"upload"==e.type&&async function(e){let t=-1===e.img.indexOf(".png")?".jpg":".png",n={suffix:t},o=await un.get_qiniu_upload_token(n);if(0==o.code){let t=e.img;u.upload(t,e=>{let t=m.value+e.key;c.value=t},e=>{V("上传失败,请重试",2)},{uploadURL:"https://up-z2.qiniup.com/",key:o.data.fileName,uptoken:o.data.token})}else V("上传失败",2)}(e)},m=e.ref("https://image.jxc4.com/");const p=async()=>{try{if(!l.value)return V("请输入发票id");if(!c.value)return V("请上传发票图片");let e={orderId:s.value.order_id,invoiceId:l.value,invoiceUrl:c.value};await ea(e);V("上传成功",1)}catch(e){V("系统异常")}};function h(e){uni.setClipboardData({data:e,success(){V("复制订单号成功",1)}})}function v(e){n.value=e.detail.value}function g(e){o.value=e.detail.value}const y=async(e,t)=>{if("mt"===e){let e={storeId:f("storeID"),startTime:n.value+" 00:00:00",endTime:o.value+" 23:59:59",pageSize:-1,offset:0},t=await Qo(e);"0"===t.code&&(a.value=t.data.data)}else if("eb"===e){let e=await oa({vendorId:"3",vendorStoreID:""+t.vendorStoreID,storeID:+t.storeID});"0"===e.code&&(r.value=e.data.record_list)}};return(t,u)=>{const m=w(e.resolveDynamicComponent("jx-icon"),Yn),f=w(e.resolveDynamicComponent("jx-upload-img"),Md),k=w(e.resolveDynamicComponent("uni-popup"),Ca),b=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"time-root"},[e.createElementVNode("view",{class:"slect-edit"},[e.createElementVNode("picker",{value:n.value,mode:"date",onChange:v,end:e.unref(Et)(+new Date)},[e.createElementVNode("view",{class:"time-item"},[e.createVNode(m,{icon:"xiangzuojiantou",size:28,color:"#919191"}),e.createElementVNode("text",null,e.toDisplayString(n.value),1),e.createVNode(m,{icon:"xiangyoujiantou",size:28,color:"#919191"})])],40,["value","end"]),e.createElementVNode("text",{class:"middle-text"},"至"),e.createElementVNode("picker",{value:o.value,mode:"date",onChange:g,end:e.unref(Et)(+new Date)},[e.createElementVNode("view",{class:"time-item"},[e.createVNode(m,{icon:"xiangzuojiantou",size:28,color:"#919191"}),e.createElementVNode("text",null,e.toDisplayString(o.value),1),e.createVNode(m,{icon:"xiangyoujiantou",size:28,color:"#919191"})])],40,["value","end"])]),e.createElementVNode("button",{size:"mini",class:"query-button",onClick:y,style:{height:"50rpx","line-height":"50rpx","font-size":"30rpx"}},"查询")]),e.createElementVNode("view",{style:{"margin-top":"20px"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,style:{"margin-bottom":"20px",border:"1rpx solid #eee","box-shadow":"rgba(0, 0, 0, 0.1) 0px 2px 12px 0px"}},[e.createElementVNode("view",{class:"order-id pd20"},[e.createElementVNode("view",{class:"id",style:{"margin-left":"10rpx"}},[e.createTextVNode(" 订单号:"+e.toDisplayString(t.order_id)+" ",1),e.createVNode(m,{icon:"fuzhi",size:40,color:"#777777",onClick:e.withModifiers(e=>h(t.order_id),["stop"])},null,8,["onClick"])]),e.createElementVNode("button",{size:"mini",class:"uploadBut",onClick:e.withModifiers(e=>(e=>{s.value=e,i.value.open()})(t),["stop"]),style:{height:"50rpx","line-height":"50rpx","font-size":"30rpx"}},"上传发票",8,["onClick"])]),e.createElementVNode("view",{style:{border:"0","margin-left":"10rpx"}},[e.createElementVNode("view",{style:{"margin-top":"10px"}},"创建时间:"+e.toDisplayString(t.createdAt),1),e.createElementVNode("view",null,"发票任务id:"+e.toDisplayString(t.invoiceTaskId),1)])]))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,style:{"margin-bottom":"20px",border:"1rpx solid #eee","box-shadow":"rgba(0, 0, 0, 0.1) 0px 2px 12px 0px"}},[e.createElementVNode("view",{class:"order-id pd20"},[e.createElementVNode("view",{class:"id",style:{"margin-left":"10rpx"}},[e.createTextVNode(" 订单号:"+e.toDisplayString(t.order_list.order_id)+" ",1),e.createVNode(m,{icon:"fuzhi",size:40,color:"#777777",onClick:e.withModifiers(e=>h(t.order_list.order_id),["stop"])},null,8,["onClick"])]),e.createElementVNode("view",{style:{border:"0","margin-left":"10rpx"}},[e.createElementVNode("view",null,"建议开票金额:"+e.toDisplayString(t.order_list.invoice_amount),1),e.createElementVNode("view",null,"抬头类型:"+e.toDisplayString("PERSONAL"===t.buyer_title.title_type?"个人":"ENTERPRISE"===t.buyer_title.title_type?"企业":"GOVERNMENT"===t.buyer_title.title_type?"政府":"未知"),1),e.createElementVNode("view",null,"抬头名称:"+e.toDisplayString(t.buyer_title.title_name),1),e.createElementVNode("view",null,"纳税人识别号:"+e.toDisplayString(t.buyer_title.tax_payer_num),1),e.createElementVNode("view",null,"注册地址:"+e.toDisplayString(t.buyer_title.register_address),1),e.createElementVNode("view",null,"注册电话:"+e.toDisplayString(t.buyer_title.register_phone),1),e.createElementVNode("view",null,"开户行名称:"+e.toDisplayString(t.buyer_title.bank_name),1),e.createElementVNode("view",null,"开户行账号:"+e.toDisplayString(t.buyer_title.bank_account),1),e.createElementVNode("view",null,"申请编号:"+e.toDisplayString(t.application_no),1),e.createElementVNode("view",null,"发票材质:"+e.toDisplayString("PAPER"===t.invoice_material?"纸质发票":"电子发票"),1),e.createElementVNode("view",null,"发票种类:"+e.toDisplayString("VAT_COMMON"===t.invoice_class?"普通发票":"专用发票"),1),e.createElementVNode("view",null,"申请状态:"+e.toDisplayString(t.status),1),e.createElementVNode("view",null,"发票任务id: "+e.toDisplayString(t.invoiceTaskId),1),e.createElementVNode("view",null,"开票总金额: "+e.toDisplayString(t.total_invoice_amount),1),e.createElementVNode("view",null,"开票总金额: "+e.toDisplayString(t.total_invoice_amount),1),e.createElementVNode("view",null,"创建时间: "+e.toDisplayString(new Date(t.order_list.create_time)),1),e.createElementVNode("view",null,"用户联系人邮箱: "+e.toDisplayString(t.buyer_contact.email),1)])])]))),128)),e.createVNode(k,{ref_key:"popupDialog",ref:i,type:"top"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("view",{class:"text"},"上传发票(美团)"),e.createElementVNode("view",{class:"tip-new"},"订单号:"+e.toDisplayString(s.value.order_id),1),e.createElementVNode("view",{class:"ipt-box"},[e.withDirectives(e.createElementVNode("input",{class:"ipt",type:"number","onUpdate:modelValue":u[0]||(u[0]=e=>l.value=e),placeholder:"请输入发票号码","placeholder-style":"font-size:30rpx","cursor-spacing":0,style:{"font-size":"30rpx"}},null,512),[[e.vModelDynamic,l.value]]),e.createVNode(f,{title:"发票图片:",type:"invoiceImg",img:c.value,onImgChange:d},null,8,["img"])]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:u[1]||(u[1]=e=>i.value.close())},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:p},"确定")])])]),_:1},512),e.createVNode(b)],64)}}}),Hd=Gn(zd,[["__scopeId","data-v-8a7ee137"]]),qd=Gn(e.defineComponent({__name:"accountBalance",setup(t){const{openWeixin:n}=tn(),o=e.ref([]),a=e.ref(!1);x(()=>{uni.getProvider({service:"share",success:function(e){a.value="weixin"==e.provider[0]}}),async function(){let e=await $o();if(0==e.code){let t=qn.state.storeInfo.allStoreInfo.brandID;const{balance:n}=e.data.find(e=>e.id===t);r.value=n}else V("品牌账号余额异常"),r.value=0}(),async function(){let e={storeID:f("storeID")},t=await Ro(e);0==t.code?i.value=t.data.accountBalance:(V("门店账号余额异常"),i.value=0)}(),o.value=qn.state.storeInfo.allStoreInfo.StoreMaps});const r=e.ref(0);const i=e.ref(0);function s(e){if("jxgy"==f("terrace"))return void uni.jxAlert({title:"提示",content:"果园App暂不支持在线充值,请联系运营进行充值。"});let t=JSON.stringify({type:e,storeName:f("storeName"),storeID:f("storeID"),token:f("token"),platform:1});uni.jxConfirm({title:"提示",content:"即将打开微信进行充值,如果打开失败,请重新操作",confirmText:"确认充值",success:()=>{n(`subPages/messageChild/appPlay/appPlay?playData=${t}`)}})}return(t,n)=>{const l=w(e.resolveDynamicComponent("jx-price"),ka);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"delivery-root"},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",null,"品牌发单将扣除品牌账号余额"),e.createElementVNode("view",null,"门店发单将扣除门店账号余额")]),e.createElementVNode("view",{class:"delivery"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,t=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:t.id},[e.createElementVNode("text",{class:e.normalizeClass(["venderName",`icon-${t.vendorID}`])},null,2),e.createElementVNode("text",{class:"type"},"-"+e.toDisplayString(0==t.createDeliveryType?"品牌发单":"门店发单"),1)]))),128))])]),e.createElementVNode("view",{class:"balance"},[e.createElementVNode("text",null,"品牌账号余额:"),e.createVNode(l,{price:r.value,color:"#ff0000"},null,8,["price"])]),e.createElementVNode("view",{class:"balance"},[e.createElementVNode("text",null,"门店账号余额:"),e.createVNode(l,{price:i.value,color:"#ff0000"},null,8,["price"])]),a.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"btn-root"},[e.createElementVNode("view",{onClick:n[0]||(n[0]=e=>s(5)),class:"btn store"},"品牌充值"),e.createElementVNode("view",{onClick:n[1]||(n[1]=e=>s(4)),class:"btn"},"门店充值")])):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-d20b0b99"]]),Gd=Gn(e.defineComponent({__name:"setNotice",setup(t){const n=y("Ba-Notify");function o(){n.goSetNotify()}const a=e.ref([]);C(()=>{switch(f("brand")){case"xiaomi":a.value=r;break;case"oppo":case"pacm00":case"oneplus":a.value=i;break;case"vivo":a.value=s;break;case"huawei":case"honor":a.value=l;break;default:a.value=[]}});const r=[{title:"1、点击本页的去设置按钮↓",img:"https://image.jxc4.com/image/3a1d77214130f1dcb0e4dc250283cf9c.jpg"},{title:"2、将图中全部的开关都打开↓",img:"https://image.jxc4.com/image/71dd33b69d069add95158c35fd0dfcf1.jpg"},{title:"3、点击下面的每一列进入设置↓",img:"https://image.jxc4.com/image/feafdedbb88b1dbd843a976cf7e247cc.jpg"},{title:"4、将图中全部的开关都打开↓",img:"https://image.jxc4.com/image/92ee123000b3fa1314e627c667a9fa06.jpg"},{title:"5、设置允许锁屏通知显示↓",img:"https://image.jxc4.com/image/96ece42b093ea2a9448b102f0b653a8e.jpg"},{title:"6、自定义提示音↓",img:"https://image.jxc4.com/image/54e729c905653ecf62ee79157fe54d78.jpg"}],i=[{title:"1、点击本页的去设置按钮↓",img:"https://image.jxc4.com/image/3a1d77214130f1dcb0e4dc250283cf9c.jpg"},{title:"2、将图中标识的开关打开↓",img:"https://image.jxc4.com/image/09172105196705fd6d0abb276c652968.jpg"},{title:"3、将图中标识的开关打开↓",img:"https://image.jxc4.com/image/e7e1f09d929f7a922d77b41d1446f526.jpg"},{title:"4、点击下面的每一列进入设置↓",img:"https://image.jxc4.com/image/2d9cd3b27677cd464ff6baca2206502d.jpg"},{title:"5、将图中标识的开关打开↓",img:"https://image.jxc4.com/image/00bb1d771b97a098403fef0a75b36a1e.jpg"},{title:"6、自定义提示音↓",img:"https://image.jxc4.com/image/1f56acc11f55ed0b237736e60b7891aa.jpg"}],s=[{title:"1、点击本页的去设置按钮↓",img:"https://image.jxc4.com/image/3a1d77214130f1dcb0e4dc250283cf9c.jpg"},{title:"2、将图中标识的开关打开↓",img:"https://image.jxc4.com/image/561753b963fac75b9e7c2c11838de9e2.jpg"},{title:"3、点击下面的每一列进入设置↓",img:"https://image.jxc4.com/image/d4474070e84823415198de743b54a874.jpg"},{title:"4、将图中标识的开关打开↓",img:"https://image.jxc4.com/image/b4ca841a6ed47a0bbf0e661244034617.jpg"},{title:"5、将重要性设置为最高↓",img:"https://image.jxc4.com/image/2b47f7ff1ca98f63240dc470d571d130.jpg"},{title:"6、自定义提示音↓",img:"https://image.jxc4.com/image/62ba18a719438835b6ee942a4e75986c.jpg"}],l=[{title:"1、点击本页的去设置按钮↓",img:"https://image.jxc4.com/image/3a1d77214130f1dcb0e4dc250283cf9c.jpg"},{title:"2、将图中标识的开关都打开↓",img:"https://image.jxc4.com/image/b1884408a4f46963dfe25165ec81207a.jpg"},{title:"3、点击下面的每一列进入设置↓",img:"https://image.jxc4.com/image/2814556144e74ea350e275a2db404e57.jpg"},{title:"4、将图中标识的开关都打开↓",img:"https://image.jxc4.com/image/5662508924172c34c5ac1c64da81b4fc.jpg"},{title:"5、将重要性设置为最高↓",img:"https://image.jxc4.com/image/785646d008e1ed34c24d26c8a83555a4.jpg"},{title:"6、设置允许锁屏通知显示↓",img:"https://image.jxc4.com/image/5a52b32c23227e2a76ebf158659657ef.jpg"},{title:"7、自定义提示音↓",img:"https://image.jxc4.com/image/9efb400ae30c10c82966ee9ee2cae53a.jpg"}],c=e.ref(["小米","oppo","一加","vivo","华为","荣耀"]);return(t,n)=>{const u=w(e.resolveDynamicComponent("jx-icon"),Yn),d=e.resolveComponent("uni-title"),m=e.resolveComponent("uni-section");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"set-root",onClick:o},[e.createElementVNode("text",null,"需开启使用通知权限"),e.createElementVNode("view",{class:"right"},[e.createTextVNode("去设置"),e.createVNode(u,{icon:"gengduo",color:"#4eb331"})])]),e.createElementVNode("view",{class:"notify-root"},[a.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:n},[e.createVNode(d,{type:"h2",title:t.title},null,8,["title"]),e.createElementVNode("view",{class:"img"},[e.createElementVNode("image",{src:t.img,mode:"widthFix"},null,8,["src"])])]))),128)),e.createElementVNode("view",{class:"item"},[e.createVNode(d,{type:"h2",title:"完、按照以上方法即可成功开通订单提醒"}),e.createElementVNode("view",{class:"img-over"},[e.createElementVNode("image",{src:"https://image.jxc4.com/image/ccb1152ff313b1890c4af5ad80449013.png",mode:"widthFix"})])])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(m,{title:"商户您好!",type:"line",titleFontSize:"18px"}),e.createElementVNode("view",{class:"title"},"非常抱歉离线订单通知业务只支持【小米】【vivo】【oppo】【一加】【华为】【荣耀】等手机开通!"),e.createVNode(m,{title:"温馨提示",type:"line",titleFontSize:"18px"}),e.createElementVNode("view",{class:"title"},"如果你也是以上品牌手机,请点击下方对应的品牌进行设置!"),e.createElementVNode("view",{class:"myself-setup"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:n,onClick:e=>function(e){switch(e){case 0:a.value=r;break;case 1:case 2:a.value=i;break;case 3:a.value=s;break;case 4:case 5:a.value=l}}(n)},[e.createTextVNode("我的手机是:"),e.createElementVNode("text",null,e.toDisplayString(t),1)],8,["onClick"]))),128))])],64))])],64)}}}),[["__scopeId","data-v-15c138e6"]]),Wd={};function Jd(e){return/^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(e)}function Xd(e){switch(typeof e){case"undefined":return!0;case"string":if(0==e.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"").length)return!0;break;case"boolean":if(!e)return!0;break;case"number":if(0===e||isNaN(e))return!0;break;case"object":if(null===e||0===e.length)return!0;for(const t in e)return!1;return!0}return!1}function Kd(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function Yd(e){return"[object Object]"===Object.prototype.toString.call(e)}function Zd(e){return"function"==typeof e}const Qd=Object.freeze(Object.defineProperty({__proto__:null,amount:function(e){return/^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(e)},array:Kd,carNo:function(e){const t=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/,n=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;return 7===e.length?n.test(e):8===e.length&&t.test(e)},chinese:function(e){return/^[\u4e00-\u9fa5]+$/gi.test(e)},code:function(e,t=6){return new RegExp(`^\\d{${t}}$`).test(e)},contains:function(e,t){return e.indexOf(t)>=0},date:function(e){return!!e&&(Jd(e)&&(e=+e),!/Invalid|NaN/.test(new Date(e).toString()))},dateISO:function(e){return/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},digits:function(e){return/^\d+$/.test(e)},email:function(e){return/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(e)},empty:Xd,enOrNum:function(e){return/^[0-9a-zA-Z]*$/g.test(e)},func:Zd,idCard:function(e){return/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(e)},image:function(e){const t=e.split("?")[0];return/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i.test(t)},jsonString:function(e){if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(ts){return!1}return!1},landline:function(e){return/^\d{3,4}-\d{7,8}(-\d{3,4})?$/.test(e)},letter:function(e){return/^[a-zA-Z]*$/.test(e)},mobile:function(e){return/^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(e)},number:Jd,object:Yd,promise:function(e){return Yd(e)&&Zd(e.then)&&Zd(e.catch)},range:function(e,t){return e>=t[0]&&e<=t[1]},rangeLength:function(e,t){return e.length>=t[0]&&e.length<=t[1]},regExp:function(e){return e&&"[object RegExp]"===Object.prototype.toString.call(e)},string:function(e){return"string"==typeof e},url:function(e){return/^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(e)},video:function(e){return/\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i.test(e)}},Symbol.toStringTag,{value:"Module"}));function em(e,t=15){return+parseFloat(Number(e).toPrecision(t))}function tm(e){const t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function nm(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));const t=tm(e);return t>0?em(Number(e)*Math.pow(10,t)):Number(e)}function om(e){(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&k("warn","at uni_modules/uv-ui-tools/libs/function/digit.js:45",`${e} 超出了精度限制,结果可能不正确`)}function am(e,t){const[n,o,...a]=e;let r=t(n,o);return a.forEach(e=>{r=t(r,e)}),r}function rm(...e){if(e.length>2)return am(e,rm);const[t,n]=e,o=nm(t),a=nm(n),r=tm(t)+tm(n),i=o*a;return om(i),i/Math.pow(10,r)}function im(...e){if(e.length>2)return am(e,im);const[t,n]=e,o=nm(t),a=nm(n);return om(o),om(a),rm(o/a,em(Math.pow(10,tm(n)-tm(t))))}function sm(e=void 0){let t=this.$parent;for(;t;){if(!t.$options||t.$options.name===e)return t;t=t.$parent}return!1}function lm(e,t=new WeakMap){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime());else if(e instanceof RegExp)n=new RegExp(e);else if(e instanceof Map)n=new Map(Array.from(e,([e,n])=>[e,lm(n,t)]));else if(e instanceof Set)n=new Set(Array.from(e,e=>lm(e,t)));else if(Array.isArray(e))n=e.map(e=>lm(e,t));else if("[object Object]"===Object.prototype.toString.call(e)){n=Object.create(Object.getPrototypeOf(e)),t.set(e,n);for(const[o,a]of Object.entries(e))n[o]=lm(a,t)}else n=Object.assign({},e);return t.set(e,n),n}function cm(e=null,t="yyyy-mm-dd"){let n;n=e?/^\d{10}$/.test(null==e?void 0:e.toString().trim())?new Date(1e3*e):"string"==typeof e&&/^\d+$/.test(e.trim())?new Date(Number(e)):"string"==typeof e&&e.includes("-")&&!e.includes("T")?new Date(e.replace(/-/g,"/")):new Date(e):new Date;const o={y:n.getFullYear().toString(),m:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate().toString().padStart(2,"0"),h:n.getHours().toString().padStart(2,"0"),M:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0")};for(const a in o){const[e]=new RegExp(`${a}+`).exec(t)||[];if(e){const n="y"===a&&2===e.length?2:0;t=t.replace(e,o[a].slice(n))}}return t}function um(e,t="both"){return e=String(e),"both"==t?e.replace(/^\s+|\s+$/g,""):"left"==t?e.replace(/^\s*/,""):"right"==t?e.replace(/(\s*$)/g,""):"all"==t?e.replace(/\s+/g,""):e}String.prototype.padStart||(String.prototype.padStart=function(e,t=" "){if("[object String]"!==Object.prototype.toString.call(t))throw new TypeError("fillString must be String");const n=this;if(n.length>=e)return String(n);const o=e-n.length;let a=Math.ceil(o/t.length);for(;a>>=1;)t+=t,1===a&&(t+=t);return t.slice(0,o)+n});const dm=Object.freeze(Object.defineProperty({__proto__:null,$parent:sm,addStyle:function(e,t="object"){if(Xd(e)||"object"==typeof e&&"object"===t||"string"===t&&"string"==typeof e)return e;if("object"===t){const t=(e=um(e)).split(";"),n={};for(let e=0;e<t.length;e++)if(t[e]){const o=t[e].split(":");n[um(o[0])]=um(o[1])}return n}let n="";for(const o in e){n+=`${o.replace(/([A-Z])/g,"-$1").toLowerCase()}:${e[o]};`}return um(n)},addUnit:function(e="auto",t=((e=>{return null==(e=null==(t=null==uni?void 0:uni.$uv)?void 0:t.config)?void 0:e.unit;var t})()?(e=>{return null==(e=null==(t=null==uni?void 0:uni.$uv)?void 0:t.config)?void 0:e.unit;var t})():"px")){return Jd(e=String(e))?`${e}${t}`:e},deepClone:lm,deepMerge:function e(t={},n={}){if("object"!=typeof(t=lm(t))||null===t||"object"!=typeof n||null===n)return t;const o=Array.isArray(t)?t.slice():Object.assign({},t);for(const a in n){if(!n.hasOwnProperty(a))continue;const t=n[a],r=o[a];t instanceof Date?o[a]=new Date(t):t instanceof RegExp?o[a]=new RegExp(t):t instanceof Map?o[a]=new Map(t):t instanceof Set?o[a]=new Set(t):o[a]="object"==typeof t&&null!==t?e(r,t):t}return o},error:function(e){},formValidate:function(e,t){const n=sm.call(e,"uv-form-item"),o=sm.call(e,"uv-form");n&&o&&o.validateField(n.prop,()=>{},t)},getDuration:function(e,t=!0){const n=parseInt(e);return t?/s$/.test(e)?e:e>30?`${e}ms`:`${e}s`:/ms$/.test(e)?n:/s$/.test(e)?n>30?n:1e3*n:n},getHistoryPage:function(e=0){const t=getCurrentPages();return t[t.length-1+e]},getProperty:function(e,t){if(e){if("string"!=typeof t||""===t)return"";if(-1!==t.indexOf(".")){const n=t.split(".");let o=e[n[0]]||{};for(let e=1;e<n.length;e++)o&&(o=o[n[e]]);return o}return e[t]}},getPx:function(e,t=!1){return Jd(e)?t?`${e}px`:Number(e):/(rpx|upx)$/.test(e)?t?`${uni.upx2px(parseInt(e))}px`:Number(uni.upx2px(parseInt(e))):t?`${parseInt(e)}px`:parseInt(e)},guid:function(e=32,t=!0,n=null){const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),a=[];if(n=n||o.length,e)for(let r=0;r<e;r++)a[r]=o[0|Math.random()*n];else{let e;a[8]=a[13]=a[18]=a[23]="-",a[14]="4";for(let t=0;t<36;t++)a[t]||(e=0|16*Math.random(),a[t]=o[19==t?3&e|8:e])}return t?(a.shift(),`u${a.join("")}`):a.join("")},os:function(){return uni.getSystemInfoSync().platform.toLowerCase()},padZero:function(e){return`00${e}`.slice(-2)},page:function(){var e;const t=getCurrentPages(),n=null==(e=t[t.length-1])?void 0:e.route;return`/${n||""}`},pages:function(){return getCurrentPages()},priceFormat:function(e,t=0,n=".",o=","){e=`${e}`.replace(/[^0-9+-Ee.]/g,"");const a=isFinite(+e)?+e:0,r=isFinite(+t)?Math.abs(t):0,i=void 0===o?",":o,s=void 0===n?".":n;let l="";l=(r?function(e,t){const n=Math.pow(10,t);let o=im(Math.round(Math.abs(rm(e,n))),n);return e<0&&0!==o&&(o=rm(o,-1)),o}(a,r)+"":`${Math.round(a)}`).split(".");const c=/(-?\d+)(\d{3})/;for(;c.test(l[0]);)l[0]=l[0].replace(c,`$1${i}$2`);return(l[1]||"").length<r&&(l[1]=l[1]||"",l[1]+=new Array(r-l[1].length+1).join("0")),l.join(s)},queryParams:function(e={},t=!0,n="brackets"){const o=t?"?":"",a=[];-1==["indices","brackets","repeat","comma"].indexOf(n)&&(n="brackets");for(const r in e){const t=e[r];if(!(["",void 0,null].indexOf(t)>=0))if(t.constructor===Array)switch(n){case"indices":for(let n=0;n<t.length;n++)a.push(`${r}[${n}]=${t[n]}`);break;case"brackets":default:t.forEach(e=>{a.push(`${r}[]=${e}`)});break;case"repeat":t.forEach(e=>{a.push(`${r}=${e}`)});break;case"comma":let e="";t.forEach(t=>{e+=(e?",":"")+t}),a.push(`${r}=${e}`)}else a.push(`${r}=${t}`)}return a.length?o+a.join("&"):""},random:function(e,t){if(e>=0&&t>0&&t>=e){const n=t-e+1;return Math.floor(Math.random()*n+e)}return 0},randomArray:function(e=[]){return e.sort(()=>Math.random()-.5)},range:function(e=0,t=0,n=0){return Math.max(e,Math.min(t,Number(n)))},setConfig:function({props:e={},config:t={},color:n={},zIndex:o={}}){const{deepMerge:a}=uni.$uv;uni.$uv.config=a(uni.$uv.config,t),uni.$uv.props=a(uni.$uv.props,e),uni.$uv.color=a(uni.$uv.color,n),uni.$uv.zIndex=a(uni.$uv.zIndex,o)},setProperty:function(e,t,n){if(!e)return;const o=function(e,t,n){if(1!==t.length)for(;t.length>1;){const a=t[0];e[a]&&"object"==typeof e[a]||(e[a]={}),t.shift(),o(e[a],t,n)}else e[t[0]]=n};if("string"!=typeof t||""===t);else if(-1!==t.indexOf(".")){const a=t.split(".");o(e,a,n)}else e[t]=n},sleep:function(e=30){return new Promise(t=>{setTimeout(()=>{t()},e)})},sys:function(){return uni.getSystemInfoSync()},timeFormat:cm,timeFrom:function(e=null,t="yyyy-mm-dd"){null==e&&(e=Number(new Date)),10==(e=parseInt(e)).toString().length&&(e*=1e3);let n=(new Date).getTime()-e;n=parseInt(n/1e3);let o="";switch(!0){case n<300:o="刚刚";break;case n>=300&&n<3600:o=`${parseInt(n/60)}分钟前`;break;case n>=3600&&n<86400:o=`${parseInt(n/3600)}小时前`;break;case n>=86400&&n<2592e3:o=`${parseInt(n/86400)}天前`;break;default:o=!1===t?n>=2592e3&&n<31536e3?`${parseInt(n/2592e3)}个月前`:`${parseInt(n/31536e3)}年前`:cm(e,t)}return o},toast:function(e,t=2e3){uni.showToast({title:String(e),icon:"none",duration:t})},trim:um,type2icon:function(e="success",t=!1){-1==["primary","info","error","warning","success"].indexOf(e)&&(e="success");let n="";switch(e){case"primary":case"info":n="info-circle";break;case"error":n="close-circle";break;case"warning":n="error-circle";break;default:n="checkmark-circle"}return t&&(n+="-fill"),n}},Symbol.toStringTag,{value:"Module"})),mm={props:{customStyle:{type:[Object,String],default:()=>({})},customClass:{type:String,default:""},url:{type:String,default:""},linkType:{type:String,default:"navigateTo"}},data:()=>({}),onLoad(){this.$uv.getRect=this.$uvGetRect},created(){this.$uv.getRect=this.$uvGetRect},computed:{$uv:()=>({...dm,test:Qd}),bem:()=>function(e,t,n){const o=`uv-${e}--`,a={};return t&&t.map(e=>{a[o+this[e]]=!0}),n&&n.map(e=>{this[e]?a[o+e]=this[e]:delete a[o+e]}),Object.keys(a)}},methods:{openPage(e="url"){const t=this[e];t&&uni[this.linkType]({url:t})},$uvGetRect(e,t){return new Promise(n=>{uni.createSelectorQuery().in(this)[t?"selectAll":"select"](e).boundingClientRect(e=>{t&&Array.isArray(e)&&e.length&&n(e),!t&&e&&n(e)}).exec()})},getParentData(e=""){this.parent||(this.parent={}),this.parent=this.$uv.$parent.call(this,e),this.parent.children&&-1===this.parent.children.indexOf(this)&&this.parent.children.push(this),this.parent&&this.parentData&&Object.keys(this.parentData).map(e=>{this.parentData[e]=this.parent[e]})},preventEvent(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()},noop(e){this.preventEvent(e)}},onReachBottom(){uni.$emit("uvOnReachBottom")},beforeDestroy(){if(this.parent&&Kd(this.parent.children)){const e=this.parent.children;e.map((t,n)=>{t===this&&e.splice(n,1)})}}};const pm=Gn({name:"uv-toolbar",emits:["confirm","cancel"],mixins:[Wd,mm,{props:{show:{type:Boolean,default:!0},showBorder:{type:Boolean,default:!1},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"},cancelColor:{type:String,default:"#909193"},confirmColor:{type:String,default:"#3c9cff"},title:{type:String,default:""},...null==(o=null==(n=uni.$uv)?void 0:n.props)?void 0:o.toolbar}}],methods:{cancel(){this.$emit("cancel")},confirm(){this.$emit("confirm")}}},[["render",function(t,n,o,a,r,i){return t.show?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uv-toolbar",{"uv-border-bottom":t.showBorder}]),onTouchmove:n[2]||(n[2]=e.withModifiers((...e)=>t.noop&&t.noop(...e),["stop","prevent"]))},[e.createElementVNode("view",{class:"uv-toolbar__cancel__wrapper","hover-class":"uv-hover-class"},[e.createElementVNode("text",{class:"uv-toolbar__wrapper__cancel",onClick:n[0]||(n[0]=(...e)=>i.cancel&&i.cancel(...e)),style:e.normalizeStyle({color:t.cancelColor})},e.toDisplayString(t.cancelText),5)]),t.title?(e.openBlock(),e.createElementBlock("text",{key:0,class:"uv-toolbar__title uv-line-1"},e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"uv-toolbar__confirm__wrapper","hover-class":"uv-hover-class"},[e.createElementVNode("text",{class:"uv-toolbar__wrapper__confirm",onClick:n[1]||(n[1]=(...e)=>i.confirm&&i.confirm(...e)),style:e.normalizeStyle({color:t.confirmColor})},e.toDisplayString(t.confirmText),5)])],34)):e.createCommentVNode("",!0)}],["__scopeId","data-v-ea4ec3e5"]]);function fm(e,t=!0){if((e=String(e).toLowerCase())&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e)){if(4===e.length){let t="#";for(let n=1;n<4;n+=1)t+=e.slice(n,n+1).concat(e.slice(n,n+1));e=t}const n=[];for(let t=1;t<7;t+=2)n.push(parseInt(`0x${e.slice(t,t+2)}`));return t?`rgb(${n[0]},${n[1]},${n[2]})`:n}if(/^(rgb|RGB)/.test(e)){return e.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(e=>Number(e))}return e}function hm(e){const t=e;if(/^(rgb|RGB)/.test(t)){const e=t.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");let n="#";for(let t=0;t<e.length;t++){let o=Number(e[t]).toString(16);o=1==String(o).length?`0${o}`:o,"0"===o&&(o+=o),n+=o}return 7!==n.length&&(n=t),n}if(!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t))return t;{const e=t.replace(/#/,"").split("");if(6===e.length)return t;if(3===e.length){let t="#";for(let n=0;n<e.length;n+=1)t+=e[n]+e[n];return t}}}const vm=Gn({name:"uv-loading-icon",mixins:[Wd,mm,{props:{show:{type:Boolean,default:!0},color:{type:String,default:"#909193"},textColor:{type:String,default:"#909193"},vertical:{type:Boolean,default:!1},mode:{type:String,default:"spinner"},size:{type:[String,Number],default:24},textSize:{type:[String,Number],default:15},textStyle:{type:Object,default:()=>({})},text:{type:[String,Number],default:""},timingFunction:{type:String,default:"linear"},duration:{type:[String,Number],default:1200},inactiveColor:{type:String,default:""},...null==(r=null==(a=uni.$uv)?void 0:a.props)?void 0:r.loadingIcon}}],data:()=>({array12:Array.from({length:12}),aniAngel:360,webviewHide:!1,loading:!1}),computed:{otherBorderColor(){const e=function(e="rgb(0, 0, 0)",t="rgb(255, 255, 255)",n=10){const o=fm(e,!1),a=o[0],r=o[1],i=o[2],s=fm(t,!1),l=(s[0]-a)/n,c=(s[1]-r)/n,u=(s[2]-i)/n,d=[];for(let m=0;m<n;m++){let o=hm(`rgb(${Math.round(l*m+a)},${Math.round(c*m+r)},${Math.round(u*m+i)})`);0===m&&(o=hm(e)),m===n-1&&(o=hm(t)),d.push(o)}return d}(this.color,"#ffffff",100)[80];return"circle"===this.mode?this.inactiveColor?this.inactiveColor:e:"transparent"}},watch:{show(e){}},mounted(){this.init()},methods:{init(){setTimeout(()=>{},20)},addEventListenerToWebview(){const e=getCurrentPages(),t=e[e.length-1].$getAppWebview();t.addEventListener("hide",()=>{this.webviewHide=!0}),t.addEventListener("show",()=>{this.webviewHide=!1})}}},[["render",function(t,n,o,a,r,i){return t.show?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uv-loading-icon",[t.vertical&&"uv-loading-icon--vertical"]]),style:e.normalizeStyle([t.$uv.addStyle(t.customStyle)])},[r.webviewHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uv-loading-icon__spinner",[`uv-loading-icon__spinner--${t.mode}`]]),ref:"ani",style:e.normalizeStyle({color:t.color,width:t.$uv.addUnit(t.size),height:t.$uv.addUnit(t.size),borderTopColor:t.color,borderBottomColor:i.otherBorderColor,borderLeftColor:i.otherBorderColor,borderRightColor:i.otherBorderColor,"animation-duration":`${t.duration}ms`,"animation-timing-function":"semicircle"===t.mode||"circle"===t.mode?t.timingFunction:""})},["spinner"===t.mode?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.array12,(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,class:"uv-loading-icon__dot"}))),128)):e.createCommentVNode("",!0)],6)),t.text?(e.openBlock(),e.createElementBlock("text",{key:1,class:"uv-loading-icon__text",style:e.normalizeStyle([{fontSize:t.$uv.addUnit(t.textSize),color:t.textColor},t.$uv.addStyle(t.textStyle)])},e.toDisplayString(t.text),5)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)}],["__scopeId","data-v-27f4f0cd"]]);class gm{constructor(e,t){this.options=e,this.animation=uni.createAnimation({...e}),this.currentStepAnimates={},this.next=0,this.$=t}_nvuePushAnimates(e,t){let n=this.currentStepAnimates[this.next],o={};if(o=n||{styles:{},config:{}},ym.includes(e)){o.styles.transform||(o.styles.transform="");let n="";"rotate"===e&&(n="deg"),o.styles.transform+=`${e}(${t+n}) `}else o.styles[e]=`${t}`;this.currentStepAnimates[this.next]=o}_animateRun(e={},t={}){let n=this.$.$refs.ani.ref;if(n)return new Promise((o,a)=>{nvueAnimation.transition(n,{styles:e,...t},e=>{o()})})}_nvueNextAnimate(e,t=0,n){let o=e[t];if(o){let{styles:a,config:r}=o;this._animateRun(a,r).then(()=>{t+=1,this._nvueNextAnimate(e,t,n)})}else this.currentStepAnimates={},"function"==typeof n&&n(),this.isEnd=!0}step(e={}){return this.animation.step(e),this}run(e){this.$.animationData=this.animation.export(),this.$.timer=setTimeout(()=>{"function"==typeof e&&e()},this.$.durationTime)}}const ym=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"];function km(e,t){if(t)return clearTimeout(t.timer),new gm(e,t)}ym.concat(["opacity","backgroundColor"],["width","height","left","right","top","bottom"]).forEach(e=>{gm.prototype[e]=function(...t){return this.animation[e](...t),this}});const wm=Gn({name:"uv-transition",mixins:[Wd,mm],emits:["click","change"],props:{show:{type:Boolean,default:!1},mode:{type:[Array,String,null],default:()=>"fade"},duration:{type:[String,Number],default:300},timingFunction:{type:String,default:"ease-out"},customClass:{type:String,default:""},cellChild:{type:Boolean,default:!1}},data:()=>({isShow:!1,transform:"",opacity:1,animationData:{},durationTime:300,config:{}}),watch:{show:{handler(e){e?this.open():this.isShow&&this.close()},immediate:!0}},computed:{transformStyles(){const e={transform:this.transform,opacity:this.opacity,...this.$uv.addStyle(this.customStyle),"transition-duration":this.duration/1e3+"s"};return this.$uv.addStyle(e,"string")}},created(){this.config={duration:this.duration,timingFunction:this.timingFunction,transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init(e={}){e.duration&&(this.durationTime=e.duration),this.animation=km(Object.assign(this.config,e),this)},onClick(){this.$emit("click",{detail:this.isShow})},step(e,t={}){if(this.animation){for(let t in e)try{"object"==typeof e[t]?this.animation[t](...e[t]):this.animation[t](e[t])}catch(ts){k("error","at uni_modules/uv-transition/components/uv-transition/uv-transition.vue:166",`方法 ${t} 不存在`)}return this.animation.step(t),this}},run(e){this.animation&&this.animation.run(e)},open(){clearTimeout(this.timer),this.transform="",this.isShow=!0;let{opacity:e,transform:t}=this.styleInit(!1);void 0!==e&&(this.opacity=e),this.transform=t,this.$nextTick(()=>{this.timer=setTimeout(()=>{this.animation=km(this.config,this),this.tranfromInit(!1).step(),this.animation.run(),this.$emit("change",{detail:this.isShow})},20)})},close(e){this.animation&&this.tranfromInit(!0).step().run(()=>{this.isShow=!1,this.animationData=null,this.animation=null;let{opacity:e,transform:t}=this.styleInit(!1);this.opacity=e||1,this.transform=t,this.$emit("change",{detail:this.isShow})})},styleInit(e){let t={transform:""},n=(e,n)=>{"fade"===n?t.opacity=this.animationType(e)[n]:t.transform+=this.animationType(e)[n]+" "};return"string"==typeof this.mode?n(e,this.mode):this.mode.forEach(t=>{n(e,t)}),t},tranfromInit(e){let t=(e,t)=>{let n=null;"fade"===t?n=e?0:1:(n=e?"-100%":"0","zoom-in"===t&&(n=e?.8:1),"zoom-out"===t&&(n=e?1.2:1),"slide-right"===t&&(n=e?"100%":"0"),"slide-bottom"===t&&(n=e?"100%":"0")),this.animation[this.animationMode()[t]](n)};return"string"==typeof this.mode?t(e,this.mode):this.mode.forEach(n=>{t(e,n)}),this.animation},animationType:e=>({fade:e?1:0,"slide-top":`translateY(${e?"0":"-100%"})`,"slide-right":`translateX(${e?"0":"100%"})`,"slide-bottom":`translateY(${e?"0":"100%"})`,"slide-left":`translateX(${e?"0":"-100%"})`,"zoom-in":`scaleX(${e?1:.8}) scaleY(${e?1:.8})`,"zoom-out":`scaleX(${e?1:1.2}) scaleY(${e?1:1.2})`}),animationMode:()=>({fade:"opacity","slide-top":"translateY","slide-right":"translateX","slide-bottom":"translateY","slide-left":"translateX","zoom-in":"scale","zoom-out":"scale"}),toLine:e=>e.replace(/([A-Z])/g,"-$1").toLowerCase()}},[["render",function(t,n,o,a,r,i){return r.isShow?(e.openBlock(),e.createElementBlock("view",{key:0,ref:"ani",animation:r.animationData,class:e.normalizeClass(o.customClass),style:e.normalizeStyle(i.transformStyles),onClick:n[0]||(n[0]=(...e)=>i.onClick&&i.onClick(...e))},[e.renderSlot(t.$slots,"default")],14,["animation"])):e.createCommentVNode("",!0)}]]);const bm=Gn({name:"uv-overlay",emits:["click"],mixins:[Wd,mm,{props:{show:{type:Boolean,default:!1},zIndex:{type:[String,Number],default:10070},duration:{type:[String,Number],default:300},opacity:{type:[String,Number],default:.5},...null==(s=null==(i=uni.$uv)?void 0:i.props)?void 0:s.overlay}}],watch:{show(e){}},computed:{overlayStyle(){const e={position:"fixed",top:0,left:0,right:0,zIndex:this.zIndex,bottom:0,"background-color":`rgba(0, 0, 0, ${this.opacity})`};return this.$uv.deepMerge(e,this.$uv.addStyle(this.customStyle))}},methods:{clickHandler(){this.$emit("click")},clear(){}}},[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("uv-transition"),wm);return e.openBlock(),e.createBlock(s,{show:t.show,mode:"fade","custom-class":"uv-overlay",duration:t.duration,"custom-style":i.overlayStyle,onClick:i.clickHandler,onTouchmove:e.withModifiers(i.clear,["stop","prevent"])},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["show","duration","custom-style","onClick","onTouchmove"])}],["__scopeId","data-v-c913fd43"]]);const xm=Gn({name:"uv-status-bar",mixins:[Wd,mm,{props:{bgColor:{type:String,default:"transparent"}}}],data:()=>({}),computed:{style(){const e={};return e.height=this.$uv.addUnit(this.$uv.sys().statusBarHeight,"px"),this.bgColor&&(this.bgColor.indexOf("gradient")>-1?e.backgroundImage=this.bgColor:e.background=this.bgColor),this.$uv.deepMerge(e,this.$uv.addStyle(this.customStyle))}}},[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("view",{style:e.normalizeStyle([i.style]),class:"uv-status-bar"},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}],["__scopeId","data-v-655ea666"]]);const Sm=Gn({name:"uv-safe-bottom",mixins:[Wd,mm],data:()=>({safeAreaBottomHeight:0,isNvue:!1}),computed:{style(){return this.$uv.deepMerge({},this.$uv.addStyle(this.customStyle))}},mounted(){}},[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uv-safe-bottom",[!r.isNvue&&"uv-safe-area-inset-bottom"]]),style:e.normalizeStyle([i.style])},null,6)}],["__scopeId","data-v-cccce249"]]),Nm={"uvicon-level":"e68f","uvicon-checkbox-mark":"e659","uvicon-folder":"e694","uvicon-movie":"e67c","uvicon-star-fill":"e61e","uvicon-star":"e618","uvicon-phone-fill":"e6ac","uvicon-phone":"e6ba","uvicon-apple-fill":"e635","uvicon-backspace":"e64d","uvicon-attach":"e640","uvicon-empty-data":"e671","uvicon-empty-address":"e68a","uvicon-empty-favor":"e662","uvicon-empty-car":"e657","uvicon-empty-order":"e66b","uvicon-empty-list":"e672","uvicon-empty-search":"e677","uvicon-empty-permission":"e67d","uvicon-empty-news":"e67e","uvicon-empty-history":"e685","uvicon-empty-coupon":"e69b","uvicon-empty-page":"e60e","uvicon-empty-wifi-off":"e6cc","uvicon-reload":"e627","uvicon-order":"e695","uvicon-server-man":"e601","uvicon-search":"e632","uvicon-more-dot-fill":"e66f","uvicon-scan":"e631","uvicon-map":"e665","uvicon-map-fill":"e6a8","uvicon-tags":"e621","uvicon-tags-fill":"e613","uvicon-eye":"e664","uvicon-eye-fill":"e697","uvicon-eye-off":"e69c","uvicon-eye-off-outline":"e688","uvicon-mic":"e66d","uvicon-mic-off":"e691","uvicon-calendar":"e65c","uvicon-trash":"e623","uvicon-trash-fill":"e6ce","uvicon-play-left":"e6bf","uvicon-play-right":"e6b3","uvicon-minus":"e614","uvicon-plus":"e625","uvicon-info-circle":"e69f","uvicon-info-circle-fill":"e6a7","uvicon-question-circle":"e622","uvicon-question-circle-fill":"e6bc","uvicon-close":"e65a","uvicon-checkmark":"e64a","uvicon-checkmark-circle":"e643","uvicon-checkmark-circle-fill":"e668","uvicon-setting":"e602","uvicon-setting-fill":"e6d0","uvicon-heart":"e6a2","uvicon-heart-fill":"e68b","uvicon-camera":"e642","uvicon-camera-fill":"e650","uvicon-more-circle":"e69e","uvicon-more-circle-fill":"e684","uvicon-chat":"e656","uvicon-chat-fill":"e63f","uvicon-bag":"e647","uvicon-error-circle":"e66e","uvicon-error-circle-fill":"e655","uvicon-close-circle":"e64e","uvicon-close-circle-fill":"e666","uvicon-share":"e629","uvicon-share-fill":"e6bb","uvicon-share-square":"e6c4","uvicon-shopping-cart":"e6cb","uvicon-shopping-cart-fill":"e630","uvicon-bell":"e651","uvicon-bell-fill":"e604","uvicon-list":"e690","uvicon-list-dot":"e6a9","uvicon-zhifubao-circle-fill":"e617","uvicon-weixin-circle-fill":"e6cd","uvicon-weixin-fill":"e620","uvicon-qq-fill":"e608","uvicon-qq-circle-fill":"e6b9","uvicon-moments-circel-fill":"e6c2","uvicon-moments":"e6a0","uvicon-car":"e64f","uvicon-car-fill":"e648","uvicon-warning-fill":"e6c7","uvicon-warning":"e6c1","uvicon-clock-fill":"e64b","uvicon-clock":"e66c","uvicon-edit-pen":"e65d","uvicon-edit-pen-fill":"e679","uvicon-email":"e673","uvicon-email-fill":"e683","uvicon-minus-circle":"e6a5","uvicon-plus-circle":"e603","uvicon-plus-circle-fill":"e611","uvicon-file-text":"e687","uvicon-file-text-fill":"e67f","uvicon-pushpin":"e6d1","uvicon-pushpin-fill":"e6b6","uvicon-grid":"e68c","uvicon-grid-fill":"e698","uvicon-play-circle":"e6af","uvicon-play-circle-fill":"e62a","uvicon-pause-circle-fill":"e60c","uvicon-pause":"e61c","uvicon-pause-circle":"e696","uvicon-gift-fill":"e6b0","uvicon-gift":"e680","uvicon-kefu-ermai":"e660","uvicon-server-fill":"e610","uvicon-coupon-fill":"e64c","uvicon-coupon":"e65f","uvicon-integral":"e693","uvicon-integral-fill":"e6b1","uvicon-home-fill":"e68e","uvicon-home":"e67b","uvicon-account":"e63a","uvicon-account-fill":"e653","uvicon-thumb-down-fill":"e628","uvicon-thumb-down":"e60a","uvicon-thumb-up":"e612","uvicon-thumb-up-fill":"e62c","uvicon-lock-fill":"e6a6","uvicon-lock-open":"e68d","uvicon-lock-opened-fill":"e6a1","uvicon-lock":"e69d","uvicon-red-packet":"e6c3","uvicon-photo-fill":"e6b4","uvicon-photo":"e60d","uvicon-volume-off-fill":"e6c8","uvicon-volume-off":"e6bd","uvicon-volume-fill":"e624","uvicon-volume":"e605","uvicon-download":"e670","uvicon-arrow-up-fill":"e636","uvicon-arrow-down-fill":"e638","uvicon-play-left-fill":"e6ae","uvicon-play-right-fill":"e6ad","uvicon-arrow-downward":"e634","uvicon-arrow-leftward":"e63b","uvicon-arrow-rightward":"e644","uvicon-arrow-upward":"e641","uvicon-arrow-down":"e63e","uvicon-arrow-right":"e63c","uvicon-arrow-left":"e646","uvicon-arrow-up":"e633","uvicon-skip-back-left":"e6c5","uvicon-skip-forward-right":"e61f","uvicon-arrow-left-double":"e637","uvicon-man":"e675","uvicon-woman":"e626","uvicon-en":"e6b8","uvicon-twitte":"e607","uvicon-twitter-circle-fill":"e6cf"},Cm={name:"uv-icon",emits:["click"],mixins:[Wd,mm,{props:{name:{type:String,default:""},color:{type:String,default:"#606266"},size:{type:[String,Number],default:"16px"},bold:{type:Boolean,default:!1},index:{type:[String,Number],default:null},hoverClass:{type:String,default:""},customPrefix:{type:String,default:"uvicon"},label:{type:[String,Number],default:""},labelPos:{type:String,default:"right"},labelSize:{type:[String,Number],default:"15px"},labelColor:{type:String,default:"#606266"},space:{type:[String,Number],default:"3px"},imgMode:{type:String,default:""},width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},top:{type:[String,Number],default:0},stop:{type:Boolean,default:!1},...null==(c=null==(l=uni.$uv)?void 0:l.props)?void 0:c.icon}}],data:()=>({colorType:["primary","success","info","error","warning"]}),computed:{uClasses(){let e=[];return e.push(this.customPrefix),e.push(this.customPrefix+"-"+this.name),this.color&&this.colorType.includes(this.color)&&e.push("uv-icon__icon--"+this.color),e},iconStyle(){let e={};return e={fontSize:this.$uv.addUnit(this.size),lineHeight:this.$uv.addUnit(this.size),fontWeight:this.bold?"bold":"normal",top:this.$uv.addUnit(this.top)},this.color&&!this.colorType.includes(this.color)&&(e.color=this.color),e},isImg(){const e=this.name.indexOf("data:")>-1&&this.name.indexOf("base64")>-1;return-1!==this.name.indexOf("/")||e},imgStyle(){let e={};return e.width=this.width?this.$uv.addUnit(this.width):this.$uv.addUnit(this.size),e.height=this.height?this.$uv.addUnit(this.height):this.$uv.addUnit(this.size),e},icon(){const e=Nm["uvicon-"+this.name];return e?unescape(`%u${e}`):["uvicon"].indexOf(this.customPrefix)>-1?this.name:""}},methods:{clickHandler(e){this.$emit("click",this.index),this.stop&&this.preventEvent(e)}}};const _m=Gn(Cm,[["render",function(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uv-icon",["uv-icon--"+t.labelPos]]),onClick:n[0]||(n[0]=(...e)=>i.clickHandler&&i.clickHandler(...e))},[i.isImg?(e.openBlock(),e.createElementBlock("image",{key:0,class:"uv-icon__img",src:t.name,mode:t.imgMode,style:e.normalizeStyle([i.imgStyle,t.$uv.addStyle(t.customStyle)])},null,12,["src","mode"])):(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass(["uv-icon__icon",i.uClasses]),style:e.normalizeStyle([i.iconStyle,t.$uv.addStyle(t.customStyle)]),"hover-class":t.hoverClass},e.toDisplayString(i.icon),15,["hover-class"])),""!==t.label?(e.openBlock(),e.createElementBlock("text",{key:2,class:"uv-icon__label",style:e.normalizeStyle({color:t.labelColor,fontSize:t.$uv.addUnit(t.labelSize),marginLeft:"right"==t.labelPos?t.$uv.addUnit(t.space):0,marginTop:"bottom"==t.labelPos?t.$uv.addUnit(t.space):0,marginRight:"left"==t.labelPos?t.$uv.addUnit(t.space):0,marginBottom:"top"==t.labelPos?t.$uv.addUnit(t.space):0})},e.toDisplayString(t.label),5)):e.createCommentVNode("",!0)],2)}],["__scopeId","data-v-843a5998"]]),Em={name:"uv-popup",components:{},mixins:[Wd,mm],emits:["change","maskClick"],props:{mode:{type:String,default:"center"},duration:{type:[String,Number],default:300},zIndex:{type:[String,Number],default:10075},bgColor:{type:String,default:"#ffffff"},safeArea:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},overlayOpacity:{type:[Number,String],default:.4},overlayStyle:{type:[Object,String],default:""},safeAreaInsetBottom:{type:Boolean,default:!0},safeAreaInsetTop:{type:Boolean,default:!1},closeable:{type:Boolean,default:!1},closeIconPos:{type:String,default:"top-right"},zoom:{type:Boolean,default:!0},round:{type:[Number,String],default:0}},watch:{type:{handler:function(e){this.config[e]&&this[this.config[e]](!0)},immediate:!0},isDesktop:{handler:function(e){this.config[e]&&this[this.config[this.mode]](!0)},immediate:!0},showPopup(e){}},data(){return{ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},transitionStyle:{position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupClass:this.isDesktop?"fixforpc-top":"top"}},computed:{isDesktop(){return this.popupWidth>=500&&this.popupHeight>=500},bg(){return""===this.bgColor||"none"===this.bgColor||this.$uv.getPx(this.round)>0?"transparent":this.bgColor},contentStyle(){const e={};if(this.bgColor&&(e.backgroundColor=this.bg),this.round){const t=this.$uv.addUnit(this.round);e.backgroundColor=this.bgColor,"top"===this.mode?(e.borderBottomLeftRadius=t,e.borderBottomRightRadius=t):"bottom"===this.mode?(e.borderTopLeftRadius=t,e.borderTopRightRadius=t):"center"===this.mode&&(e.borderRadius=t)}return this.$uv.deepMerge(e,this.$uv.addStyle(this.customStyle))}},unmounted(){this.setH5Visible()},created(){this.messageChild=null,this.clearPropagation=!1},methods:{setH5Visible(){},closeMask(){this.maskShow=!1},clear(e){e.stopPropagation(),this.clearPropagation=!0},open(e){if(this.showPopup)return;if(e&&-1!==["top","center","bottom","left","right","message","dialog","share"].indexOf(e)||(e=this.mode),!this.config[e])return this.$uv.error(`缺少类型:${e}`);this[this.config[e]](),this.$emit("change",{show:!0,type:e})},close(e){this.showTrans=!1,this.$emit("change",{show:!1,type:this.mode}),clearTimeout(this.timer),this.timer=setTimeout(()=>{this.showPopup=!1},300)},touchstart(){this.clearPropagation=!1},onTap(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.closeOnClickOverlay&&this.close())},top(e){this.popupClass=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transitionStyle={position:"fixed",zIndex:this.zIndex,left:0,right:0,backgroundColor:this.bg},e||(this.showPopup=!0,this.showTrans=!0,this.$nextTick(()=>{this.messageChild&&"message"===this.mode&&this.messageChild.timerClose()}))},bottom(e){this.popupClass="bottom",this.ani=["slide-bottom"],this.transitionStyle={position:"fixed",zIndex:this.zIndex,left:0,right:0,bottom:0,backgroundColor:this.bg},e||(this.showPopup=!0,this.showTrans=!0)},center(e){this.popupClass="center",this.ani=this.zoom?["zoom-in","fade"]:["fade"],this.transitionStyle={position:"fixed",zIndex:this.zIndex,display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center"},e||(this.showPopup=!0,this.showTrans=!0)},left(e){this.popupClass="left",this.ani=["slide-left"],this.transitionStyle={position:"fixed",zIndex:this.zIndex,left:0,bottom:0,top:0,backgroundColor:this.bg,display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)},right(e){this.popupClass="right",this.ani=["slide-right"],this.transitionStyle={position:"fixed",zIndex:this.zIndex,bottom:0,right:0,top:0,backgroundColor:this.bg,display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)}}};const Im=Gn(Em,[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("uv-overlay"),bm),l=w(e.resolveDynamicComponent("uv-status-bar"),xm),c=w(e.resolveDynamicComponent("uv-safe-bottom"),Sm),u=w(e.resolveDynamicComponent("uv-icon"),_m),d=w(e.resolveDynamicComponent("uv-transition"),wm);return r.showPopup?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uv-popup",[r.popupClass,i.isDesktop?"fixforpc-z-index":""]]),style:e.normalizeStyle([{zIndex:o.zIndex}])},[e.createElementVNode("view",{onTouchstart:n[2]||(n[2]=(...e)=>i.touchstart&&i.touchstart(...e))},[r.maskShow&&o.overlay?(e.openBlock(),e.createBlock(s,{key:"1",show:r.showTrans,duration:o.duration,"custom-style":o.overlayStyle,opacity:o.overlayOpacity,zIndex:o.zIndex,onClick:i.onTap},null,8,["show","duration","custom-style","opacity","zIndex","onClick"])):e.createCommentVNode("",!0),e.createVNode(d,{key:"2",mode:r.ani,name:"content","custom-style":r.transitionStyle,duration:o.duration,show:r.showTrans,onClick:i.onTap},{default:e.withCtx(()=>[e.createElementVNode("view",{class:e.normalizeClass(["uv-popup__content",[r.popupClass]]),style:e.normalizeStyle([i.contentStyle]),onClick:n[1]||(n[1]=(...e)=>i.clear&&i.clear(...e))},[o.safeAreaInsetTop?(e.openBlock(),e.createBlock(l,{key:0})):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),o.safeAreaInsetBottom?(e.openBlock(),e.createBlock(c,{key:1})):e.createCommentVNode("",!0),o.closeable?(e.openBlock(),e.createElementBlock("view",{key:2,onClick:n[0]||(n[0]=e.withModifiers((...e)=>i.close&&i.close(...e),["stop"])),class:e.normalizeClass(["uv-popup__content__close",["uv-popup__content__close--"+o.closeIconPos]]),"hover-class":"uv-popup__content__close--hover","hover-stay-time":"150"},[e.createVNode(u,{name:"close",color:"#909399",size:"18",bold:""})],2)):e.createCommentVNode("",!0)],6)]),_:3},8,["mode","custom-style","duration","show","onClick"])],32)],6)):e.createCommentVNode("",!0)}],["__scopeId","data-v-9d898be0"]]),Dm={name:"uv-picker",emits:["confirm","cancel","close","change"],mixins:[Wd,mm,{props:{showToolbar:{type:Boolean,default:!0},title:{type:String,default:""},columns:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},itemHeight:{type:[String,Number],default:44},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确定"},cancelColor:{type:String,default:"#909193"},confirmColor:{type:String,default:"#3c9cff"},color:{type:String,default:""},activeColor:{type:String,default:""},visibleItemCount:{type:[String,Number],default:5},keyName:{type:String,default:"text"},closeOnClickOverlay:{type:Boolean,default:!0},closeOnClickConfirm:{type:Boolean,default:!0},defaultIndex:{type:Array,default:()=>[]},immediateChange:{type:Boolean,default:!1},...null==(d=null==(u=uni.$uv)?void 0:u.props)?void 0:d.picker}}],computed:{textStyle(){return(e,t)=>{const n={display:"block"};return this.color&&(n.color=this.color),this.activeColor&&t===this.innerIndex[e]&&(n.color=this.activeColor),n}}},data:()=>({lastIndex:[],innerIndex:[],innerColumns:[],columnIndex:0}),watch:{defaultIndex:{immediate:!0,handler(e){this.setIndexs(e,!0)}},columns:{immediate:!0,handler(e){this.setColumns(e)}}},methods:{open(){this.$refs.pickerPopup.open()},close(){this.$refs.pickerPopup.close()},popupChange(e){e.show||this.$emit("close")},getItemText(e){return this.$uv.test.object(e)?e[this.keyName]:e},cancel(){this.$emit("cancel"),this.close()},confirm(){this.$emit("confirm",{indexs:this.innerIndex,value:this.innerColumns.map((e,t)=>e[this.innerIndex[t]]),values:this.innerColumns}),this.closeOnClickConfirm&&this.close()},changeHandler(e){const{value:t}=e.detail;let n=0,o=0;for(let r=0;r<t.length;r++){let e=t[r];if(e!==(this.lastIndex[r]||0)){o=r,n=e;break}}this.columnIndex=o;const a=this.innerColumns;this.setLastIndex(t),this.setIndexs(t),this.$emit("change",{value:this.innerColumns.map((e,n)=>e[t[n]]),index:n,indexs:t,values:a,columnIndex:o})},setIndexs(e,t){this.innerIndex=this.$uv.deepClone(e),t&&this.setLastIndex(e)},setLastIndex(e){this.lastIndex=this.$uv.deepClone(e)},setColumnValues(e,t){this.innerColumns.splice(e,1,t);let n=this.$uv.deepClone(this.innerIndex);for(let o=0;o<this.innerColumns.length;o++)o>this.columnIndex&&(n[o]=0);this.setIndexs(n)},getColumnValues(e){return(async()=>{await this.$uv.sleep()})(),this.innerColumns[e]},setColumns(e){this.innerColumns=this.$uv.deepClone(e),0===this.innerIndex.length&&(this.innerIndex=new Array(e.length).fill(0))},getIndexs(){return this.innerIndex},getValues(){return(async()=>{await this.$uv.sleep()})(),this.innerColumns.map((e,t)=>e[this.innerIndex[t]])}}};const Vm=Gn(Dm,[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("uv-toolbar"),pm),l=w(e.resolveDynamicComponent("uv-loading-icon"),vm),c=w(e.resolveDynamicComponent("uv-popup"),Im);return e.openBlock(),e.createBlock(c,{ref:"pickerPopup",mode:"bottom","close-on-click-overlay":t.closeOnClickOverlay,onChange:i.popupChange},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"uv-picker"},[t.showToolbar?(e.openBlock(),e.createBlock(s,{key:0,cancelColor:t.cancelColor,confirmColor:t.confirmColor,cancelText:t.cancelText,confirmText:t.confirmText,title:t.title,onCancel:i.cancel,onConfirm:i.confirm},null,8,["cancelColor","confirmColor","cancelText","confirmText","title","onCancel","onConfirm"])):e.createCommentVNode("",!0),e.createElementVNode("picker-view",{class:"uv-picker__view",indicatorStyle:`height: ${t.$uv.addUnit(t.itemHeight)}`,value:r.innerIndex,immediateChange:t.immediateChange,style:e.normalizeStyle({height:`${t.$uv.addUnit(t.visibleItemCount*t.itemHeight)}`}),onChange:n[0]||(n[0]=(...e)=>i.changeHandler&&i.changeHandler(...e))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.innerColumns,(n,o)=>(e.openBlock(),e.createElementBlock("picker-view-column",{key:o,class:"uv-picker__view__column"},[t.$uv.test.array(n)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n,(n,a)=>(e.openBlock(),e.createElementBlock("text",{class:"uv-picker__view__column__item uv-line-1",key:a,style:e.normalizeStyle([{height:t.$uv.addUnit(t.itemHeight),lineHeight:t.$uv.addUnit(t.itemHeight),fontWeight:a===r.innerIndex[o]?"bold":"normal"},i.textStyle(o,a)])},e.toDisplayString(i.getItemText(n)),5))),128)):e.createCommentVNode("",!0)]))),128))],44,["indicatorStyle","value","immediateChange"]),t.loading?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uv-picker--loading"},[e.createVNode(l,{mode:"circle"})])):e.createCommentVNode("",!0)])]),_:1},8,["close-on-click-overlay","onChange"])}],["__scopeId","data-v-ee6d061d"]]),Bm={props:{value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},show:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},title:{type:String,default:""},mode:{type:String,default:"datetime"},maxDate:{type:Number,default:new Date((new Date).getFullYear()+10,0,1).getTime()},minDate:{type:Number,default:new Date((new Date).getFullYear()-10,0,1).getTime()},minHour:{type:Number,default:0},maxHour:{type:Number,default:23},minMinute:{type:Number,default:0},maxMinute:{type:Number,default:59},filter:{type:[Function,null],default:null},formatter:{type:[Function,null],default:null},loading:{type:Boolean,default:!1},itemHeight:{type:[String,Number],default:44},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"},cancelColor:{type:String,default:"#909193"},confirmColor:{type:String,default:"#3c9cff"},visibleItemCount:{type:[String,Number],default:5},closeOnClickOverlay:{type:Boolean,default:!0},closeOnClickConfirm:{type:Boolean,default:!0},...null==(p=null==(m=uni.$uv)?void 0:m.props)?void 0:p.datetimePicker}};var Tm,Pm,Am=Object.getOwnPropertyNames,Om=(Tm={"C:/Users/LP/Downloads/uvui-plus_3.1.27_example/node_modules/dayjs/dayjs.min.js"(e,t){!function(n,o){"object"==typeof e&&void 0!==t?t.exports=o():"function"==typeof define&&define.amd?define(o):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs=o()}(e,function(){var e=6e4,t=36e5,n="millisecond",o="second",a="minute",r="hour",i="day",s="week",l="month",c="quarter",u="year",d="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var o=String(e);return!o||o.length>=t?e:""+Array(t+1-o.length).join(n)+e},g={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),o=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+v(o,2,"0")+":"+v(a,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var o=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(o,l),r=n-a<0,i=t.clone().add(o+(r?-1:1),l);return+(-(o+(n-a)/(r?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:u,w:s,d:i,D:d,h:r,m:a,s:o,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",k={};k[y]=h;var w=function(e){return e instanceof N},b=function e(t,n,o){var a;if(!t)return y;if("string"==typeof t){var r=t.toLowerCase();k[r]&&(a=r),n&&(k[r]=n,a=r);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var s=t.name;k[s]=t,a=s}return!o&&a&&(y=a),a||!o&&y},x=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new N(n)},S=g;S.l=b,S.i=w,S.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var N=function(){function h(e){this.$L=b(e.locale,null,!0),this.parse(e)}var v=h.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var o=t.match(p);if(o){var a=o[2]-1||0,r=(o[7]||"0").substring(0,3);return n?new Date(Date.UTC(o[1],a,o[3]||1,o[4]||0,o[5]||0,o[6]||0,r)):new Date(o[1],a,o[3]||1,o[4]||0,o[5]||0,o[6]||0,r)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===m)},v.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return x(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<x(e)},v.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,c=!!S.u(t)||t,m=S.p(e),p=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return c?o:o.endOf(i)},f=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,v=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(m){case u:return c?p(1,0):p(31,11);case l:return c?p(1,v):p(0,v+1);case s:var k=this.$locale().weekStart||0,w=(h<k?h+7:h)-k;return p(c?g-w:g+(6-w),v);case i:case d:return f(y+"Hours",0);case r:return f(y+"Minutes",1);case a:return f(y+"Seconds",2);case o:return f(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var s,c=S.p(e),m="set"+(this.$u?"UTC":""),p=(s={},s[i]=m+"Date",s[d]=m+"Date",s[l]=m+"Month",s[u]=m+"FullYear",s[r]=m+"Hours",s[a]=m+"Minutes",s[o]=m+"Seconds",s[n]=m+"Milliseconds",s)[c],f=c===i?this.$D+(t-this.$W):t;if(c===l||c===u){var h=this.clone().set(d,1);h.$d[p](f),h.init(),this.$d=h.set(d,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[S.p(e)]()},v.add=function(n,c){var d,m=this;n=Number(n);var p=S.p(c),f=function(e){var t=x(m);return S.w(t.date(t.date()+Math.round(e*n)),m)};if(p===l)return this.set(l,this.$M+n);if(p===u)return this.set(u,this.$y+n);if(p===i)return f(1);if(p===s)return f(7);var h=(d={},d[a]=e,d[r]=t,d[o]=1e3,d)[p]||1,v=this.$d.getTime()+n*h;return S.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||m;var o=e||"YYYY-MM-DDTHH:mm:ssZ",a=S.z(this),r=this.$H,i=this.$m,s=this.$M,l=n.weekdays,c=n.months,u=function(e,n,a,r){return e&&(e[n]||e(t,o))||a[n].slice(0,r)},d=function(e){return S.s(r%12||12,e,"0")},p=n.meridiem||function(e,t,n){var o=e<12?"AM":"PM";return n?o.toLowerCase():o},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:u(n.monthsShort,s,c,3),MMMM:u(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:u(n.weekdaysMin,this.$W,l,2),ddd:u(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(r),HH:S.s(r,2,"0"),h:d(1),hh:d(2),a:p(r,i,!0),A:p(r,i,!1),m:String(i),mm:S.s(i,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:a};return o.replace(f,function(e,t){return t||h[e]||a.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,m){var p,f=S.p(d),h=x(n),v=(h.utcOffset()-this.utcOffset())*e,g=this-h,y=S.m(this,h);return y=(p={},p[u]=y/12,p[l]=y,p[c]=y/3,p[s]=(g-v)/6048e5,p[i]=(g-v)/864e5,p[r]=g/t,p[a]=g/e,p[o]=g/1e3,p)[f]||g,m?y:S.a(y)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return k[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),o=b(e,t,!0);return o&&(n.$L=o),n},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},h}(),C=N.prototype;return x.prototype=C,[["$ms",n],["$s",o],["$m",a],["$H",r],["$W",i],["$M",l],["$y",u],["$D",d]].forEach(function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),x.extend=function(e,t){return e.$i||(e(t,N,x),e.$i=!0),x},x.locale=b,x.isDayjs=w,x.unix=function(e){return x(1e3*e)},x.en=k[y],x.Ls=k,x.p={},x})}},function(){return Pm||(0,Tm[Am(Tm)[0]])((Pm={exports:{}}).exports,Pm),Pm.exports});const Mm=Om();const Lm={name:"uv-datetime-picker",emits:["close","cancel","confirm","input","change","update:modelValue"],mixins:[Wd,mm,Bm],data:()=>({columns:[],innerDefaultIndex:[],innerFormatter:(e,t)=>t}),watch:{propsChange(){this.init()}},computed:{propsChange(){const e=this.value||this.modelValue;return[this.mode,this.maxDate,this.minDate,this.minHour,this.maxHour,this.minMinute,this.maxMinute,this.filter,e]}},mounted(){this.init()},methods:{init(){this.getValue(),this.updateColumnValue(this.innerValue)},getValue(){const e=this.value||this.modelValue;this.innerValue=this.correctValue(e)},setFormatter(e){this.innerFormatter=e},open(){this.$refs.picker.open(),this.getValue(),this.updateColumnValue(this.innerValue)},close(){this.$emit("close")},cancel(){this.$emit("cancel")},confirm(){this.$emit("confirm",{value:this.innerValue,mode:this.mode}),this.$emit("input",this.innerValue),this.$emit("update:modelValue",this.innerValue)},intercept(e,t){let n=e.match(/\d+/g);return n.length>1?(this.$uv.error("请勿在过滤或格式化函数时添加数字"),0):t&&4==n[0].length?n[0]:n[0].length>2?(this.$uv.error("请勿在过滤或格式化函数时添加数字"),0):n[0]},change(e){const{indexs:t,values:n}=e;let o="";if("time"===this.mode)o=`${this.intercept(n[0][t[0]])}:${this.intercept(n[1][t[1]])}`;else{const e=parseInt(this.intercept(n[0][t[0]],"year")),a=parseInt(this.intercept(n[1][t[1]]));let r=parseInt(n[2]?this.intercept(n[2][t[2]]):1),i=0,s=0;const l=Mm(`${e}-${a}`).daysInMonth();"year-month"===this.mode&&(r=1),r=Math.min(l,r),"datetime"===this.mode&&(i=parseInt(this.intercept(n[3][t[3]])),s=parseInt(this.intercept(n[4][t[4]]))),o=Number(new Date(e,a-1,r,i,s))}o=this.correctValue(o),this.innerValue=o,this.updateColumnValue(o),this.$emit("change",{value:o,mode:this.mode})},updateColumnValue(e){this.innerValue=e,this.updateColumns(),this.updateIndexs(e)},updateIndexs(e){let t=[];const n=this.formatter||this.innerFormatter;if("time"===this.mode){const o=e.split(":");t=[n("hour",o[0]),n("minute",o[1])]}else t=[n("year",`${Mm(e).year()}`),n("month",this.$uv.padZero(Mm(e).month()+1))],"date"===this.mode&&t.push(n("day",this.$uv.padZero(Mm(e).date()))),"datetime"===this.mode&&t.push(n("day",this.$uv.padZero(Mm(e).date())),n("hour",this.$uv.padZero(Mm(e).hour())),n("minute",this.$uv.padZero(Mm(e).minute())));const o=this.columns.map((e,n)=>Math.max(0,e.findIndex(e=>e===t[n])));this.innerDefaultIndex=o},updateColumns(){const e=this.formatter||this.innerFormatter,t=this.getOriginColumns().map(t=>t.values.map(n=>e(t.type,n)));this.columns=t},getOriginColumns(){return this.getRanges().map(({type:e,range:t})=>{let n=function(e,t){let n=-1;const o=Array(e<0?0:e);for(;++n<e;)o[n]=t(n);return o}(t[1]-t[0]+1,n=>{let o=t[0]+n;return o="year"===e?`${o}`:this.$uv.padZero(o),o});return this.filter&&(n=this.filter(e,n)),{type:e,values:n}})},generateArray:(e,t)=>Array.from(new Array(t+1).keys()).slice(e),correctValue(e){const t="time"!==this.mode;if(t&&!this.$uv.test.date(e)?e=this.minDate:t||e||(e=`${this.$uv.padZero(this.minHour)}:${this.$uv.padZero(this.minMinute)}`),t)return e=Mm(e).isBefore(Mm(this.minDate))?this.minDate:e,e=Mm(e).isAfter(Mm(this.maxDate))?this.maxDate:e;{if(-1===String(e).indexOf(":"))return this.$uv.error("时间错误,请传递如12:24的格式");let[t,n]=e.split(":");return t=this.$uv.padZero(this.$uv.range(this.minHour,this.maxHour,Number(t))),n=this.$uv.padZero(this.$uv.range(this.minMinute,this.maxMinute,Number(n))),`${t}:${n}`}},getRanges(){if("time"===this.mode)return[{type:"hour",range:[this.minHour,this.maxHour]},{type:"minute",range:[this.minMinute,this.maxMinute]}];const{maxYear:e,maxDate:t,maxMonth:n,maxHour:o,maxMinute:a}=this.getBoundary("max",this.innerValue),{minYear:r,minDate:i,minMonth:s,minHour:l,minMinute:c}=this.getBoundary("min",this.innerValue),u=[{type:"year",range:[r,e]},{type:"month",range:[s,n]},{type:"day",range:[i,t]},{type:"hour",range:[l,o]},{type:"minute",range:[c,a]}];return"date"===this.mode&&u.splice(3,2),"year-month"===this.mode&&u.splice(2,3),u},getBoundary(e,t){const n=new Date(t),o=new Date(this[`${e}Date`]),a=Mm(o).year();let r=1,i=1,s=0,l=0;return"max"===e&&(r=12,i=Mm(n).daysInMonth(),s=23,l=59),Mm(n).year()===a&&(r=Mm(o).month()+1,Mm(n).month()+1===r&&(i=Mm(o).date(),Mm(n).date()===i&&(s=Mm(o).hour(),Mm(n).hour()===s&&(l=Mm(o).minute())))),{[`${e}Year`]:a,[`${e}Month`]:r,[`${e}Date`]:i,[`${e}Hour`]:s,[`${e}Minute`]:l}}}};const jm=Gn(Lm,[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("uv-picker"),Vm);return e.openBlock(),e.createBlock(s,{ref:"picker",closeOnClickOverlay:t.closeOnClickOverlay,closeOnClickConfirm:t.closeOnClickConfirm,columns:r.columns,title:t.title,itemHeight:t.itemHeight,showToolbar:t.showToolbar,visibleItemCount:t.visibleItemCount,defaultIndex:r.innerDefaultIndex,cancelText:t.cancelText,confirmText:t.confirmText,cancelColor:t.cancelColor,confirmColor:t.confirmColor,onClose:i.close,onCancel:i.cancel,onConfirm:i.confirm,onChange:i.change},null,8,["closeOnClickOverlay","closeOnClickConfirm","columns","title","itemHeight","showToolbar","visibleItemCount","defaultIndex","cancelText","confirmText","cancelColor","confirmColor","onClose","onCancel","onConfirm","onChange"])}]]),Fm={setup(){const{isTxd:t}=tn(),n=e.ref(null),o=e.ref(0),a=e.ref("00:00");const r=e.computed(()=>{let e=o.value;return 1==e||3==e?"选择开始时间":"选择结束时间"}),i=e.ref({});function s(e){return+(e.slice(0,2)+e.slice(-2))}return C(async()=>{qn.commit("storeInfo/jxLoadingFn",!0),qn.getters["storeInfo/businessHours"]||await qn.dispatch("storeInfo/getOneStore",f("storeID")),i.value=qn.getters["storeInfo/businessHours"],qn.commit("storeInfo/jxLoadingFn",!1)}),{dateTimePicker:n,confirm:function(e){switch(o.value){case 1:i.value.timer1=e.value;break;case 2:i.value.timer2=e.value;break;case 3:i.value.timer3=e.value;break;case 4:i.value.timer4=e.value}},businessTime:i,timeActive:o,setTime:function(e){o.value=e;let t=i.value;switch(e){case 1:a.value=t.timer1;break;case 2:a.value=t.timer2;break;case 3:a.value=t.timer3;break;case 4:a.value=t.timer4}n.value.open()},timeTitle:r,saveBusinessTime:async function(){let e=i.value;if(s(e.timer1)>=s(e.timer2))return uni.jxAlert({title:"营业时间一",content:`开始时间不能大于结束时间,您可以修改为【${e.timer2}至${e.timer1}】`});if("00:00"!=e.timer3&&"00:00"!=e.timer4&&s(e.timer3)<s(e.timer2))return uni.jxAlert({title:"提示",content:`第二段营业时间不能小于第一段营业时间,您可以修改到【${e.timer2}】点之后`});if(s(e.timer3)>s(e.timer4))return uni.jxAlert({title:"营业时间二",content:`开始时间不能大于结束时间,您可以修改为【${e.timer3}至${e.timer4}】`});let n={storeID:f("storeID"),payload:JSON.stringify({openTime1:s(e.timer1),closeTime1:s(e.timer2),openTime2:s(e.timer3),closeTime2:s(e.timer4)})};!async function(e){if(t()){let t={vendorOrgCode:34402634,txdStores:JSON.stringify({flag:[2],txdStoreID:`JX${f("storeID")}`,startTime:e.timer1,endTime:e.timer2})};await un.update_txd_store(t)}else k("log","at subPages/merchantChild/setBusinessTime/setBusinessTime.ts:158","此店铺暂无淘鲜达店铺")}(e);let o=await un.update_store(n);0==o.code?uni.jxAlert({title:"提示",content:"修改成功,请返回下拉刷新",success:()=>{uni.navigateBack()}}):uni.jxAlert({title:"操作提示",content:`提示:${o.desc}`,success:()=>{uni.navigateBack()}})},timeIng:a}}};const Um=Gn(Fm,[["render",function(t,n,o,a,r,i){const s=e.resolveComponent("uni-title"),l=w(e.resolveDynamicComponent("uv-datetime-picker"),jm);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"info"},[e.createVNode(s,{type:"h3",title:"配送站点营业时间 00:00-24:00"}),e.createElementVNode("view",null,"● 门店营业时间需在配送站点营业时间内才会有骑手配送"),e.createElementVNode("view",null,"● 如需在此时间范围外营业,请咨询业务经理调整配送方式"),e.createElementVNode("view",null,"● 第二段营业时间需要在第一段营业时间之后"),e.createElementVNode("view",null,"● 淘先达仅使用营业时间一")]),e.createElementVNode("view",{class:"time-root"},[e.createVNode(s,{type:"h3",title:"营业时间一"}),e.createElementVNode("view",{class:"time one"},[e.createElementVNode("view",{class:e.normalizeClass(["left",{"time-active":1==t.timeActive}]),onClick:n[0]||(n[0]=e=>t.setTime(1))},e.toDisplayString(t.businessTime.timer1),3),e.createElementVNode("text",{class:"middle"},"至"),e.createElementVNode("view",{class:e.normalizeClass(["right",{"time-active":2==t.timeActive}]),onClick:n[1]||(n[1]=e=>t.setTime(2))},e.toDisplayString(t.businessTime.timer2),3)]),e.createVNode(s,{type:"h2",title:"营业时间二(非必选)"}),e.createElementVNode("view",{class:"tip"},"提示:不需要第二段时间设置为【00:00至00:00】即可"),e.createElementVNode("view",{class:"time two"},[e.createElementVNode("view",{class:e.normalizeClass(["left",{"time-active":3==t.timeActive}]),onClick:n[2]||(n[2]=e=>t.setTime(3))},e.toDisplayString(t.businessTime.timer3),3),e.createElementVNode("text",{class:"middle"},"至"),e.createElementVNode("view",{class:e.normalizeClass(["right",{"time-active":4==t.timeActive}]),onClick:n[3]||(n[3]=e=>t.setTime(4))},e.toDisplayString(t.businessTime.timer4),3)])]),e.createElementVNode("view",{class:"button",onClick:n[4]||(n[4]=(...e)=>t.saveBusinessTime&&t.saveBusinessTime(...e))},[e.createElementVNode("view",null,"确认修改")]),e.createVNode(l,{title:t.timeTitle,confirmColor:"#4eb331",modelValue:t.timeIng,"onUpdate:modelValue":n[5]||(n[5]=e=>t.timeIng=e),ref:"dateTimePicker",mode:"time",onConfirm:t.confirm},null,8,["title","modelValue","onConfirm"])],64)}],["__scopeId","data-v-ff1e3f51"]]),$m={setup(){const t=e.ref([{id:1,name:"营业"},{id:0,name:"临时休息"},{id:-1,name:"休息"}]),n=e.ref({}),o=e.ref(1),a=e.ref(""),r=e.ref(),i=e.ref(["休息到明天","休息到后天"]),s=e.ref(0),l=e.ref(""),c=e.ref("https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png"),{isTxd:u}=tn();C(async()=>{qn.commit("storeInfo/jxLoadingFn",!0),"jxgy"===f("terrace")?c.value="https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg":"gblm"===f("terrace")&&(c.value="https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg"),await m(),qn.commit("storeInfo/jxLoadingFn",!1)});const d=e.computed(()=>{if(a.value){let e=+new Date(Et(+new Date)),t=+new Date(Et(a.value))-e;if(t<0)return"营业时间错误请联系运营";{let e=t/1e3/3600/24;return e<1?"门店将在今天自动营业":e>=1&&e<2?"门店将在明天自动营业":e>=2&&e<3?"门店将在后天自动营业":`将在 ${Et(a.value)} 自动营业`}}return""});async function m(){await qn.dispatch("storeInfo/getOneStore",f("storeID"));const e=qn.state.storeInfo.allStoreInfo;l.value=e.name,o.value=e.status,a.value=e.autoEnableAt,n.value=qn.getters["storeInfo/businessHours"]}async function p(e){if(u()){let t={vendorOrgCode:34402634,txdStores:JSON.stringify({flag:[1],txdStoreID:`JX${f("storeID")}`,status:e})};await un.update_txd_store(t)}let t=qn.state.storeInfo.allStoreInfo.StoreMaps.map(e=>{if(e.isSync)return e.vendorID+""});if(t=t.filter(e=>"9"!==e),t.length>0){let n={storeID:f("storeID"),vendorIDs:t.join(","),status:e};await un.update_vendors_store_states(n)}}return{businessStatusList:t,businessHours:n,businessStatus:o,switchOpenTime:d,setTime:function(){uni.navigateTo({url:"/subPages/merchantChild/setBusinessTime/setBusinessTime"})},setStatus:function(e){e.id!==o.value&&(1===e.id?uni.jxConfirm({title:"提示",content:"确定要将此门店设置为营业吗?",success:async()=>{let e={storeID:f("storeID"),payload:JSON.stringify({status:1})};await un.update_store(e),p(1),a.value="",V("操作成功",1),await m()}}):0===e.id?r.value.open():-1===e.id&&uni.jxConfirm({title:"提示",content:"确定要将此门店设置为休息吗?",success:async()=>{let e={storeID:f("storeID"),payload:JSON.stringify({status:-1})};await un.update_store(e),p(-1),a.value="",V("操作成功",1),await m()}}))},popupTime:r,dayList:i,currentTime:s,storeRest:async function(){let e=s.value?Et(+new Date+1728e5):Et(+new Date+864e5),t={storeID:f("storeID"),payload:JSON.stringify({status:0,autoEnableAt:e})};await un.update_store(t),p(0),V("操作成功",1),r.value.close(),o.value=0,a.value=e,m()},radioChange:function(e){let t=i.value.findIndex(t=>t===e.detail.value);-1!==t&&(s.value=t)},storeName:l,logoUrl:c}}};const Rm=Gn($m,[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("jx-icon"),Yn),l=w(e.resolveDynamicComponent("uni-popup"),Ca),c=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"info"},[e.createElementVNode("image",{class:"logo",src:t.logoUrl,mode:"scaleToFill"},null,8,["src"]),e.createElementVNode("view",{class:"storeStatus"},[e.createElementVNode("view",{class:"title1"},e.toDisplayString(t.storeName)+":",1),e.createElementVNode("view",{class:"status"},[e.createElementVNode("view",null,e.toDisplayString(1===t.businessStatus?"营业中":0===t.businessStatus?"临时休息":-1===t.businessStatus?"休息":"禁用"),1),1===t.businessStatus?(e.openBlock(),e.createElementBlock("view",{key:0},"(门店正常营业)")):e.createCommentVNode("",!0),0===t.businessStatus?(e.openBlock(),e.createElementBlock("view",{key:1},"("+e.toDisplayString(t.switchOpenTime)+")",1)):e.createCommentVNode("",!0),-1===t.businessStatus?(e.openBlock(),e.createElementBlock("view",{key:2},"(门店已休息)")):e.createCommentVNode("",!0),-2===t.businessStatus?(e.openBlock(),e.createElementBlock("view",{key:3},"(门店已禁用)")):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"title2"},"营业时间:"),e.createElementVNode("view",{class:"timeInfo",onClick:n[0]||(n[0]=(...e)=>t.setTime&&t.setTime(...e))},["00:00"!=t.businessHours.timer1&&"00:00"!=t.businessHours.timer2?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString(t.businessHours.timer1)+"-"+e.toDisplayString(t.businessHours.timer2),1)):e.createCommentVNode("",!0),"00:00"!=t.businessHours.timer3&&"00:00"!=t.businessHours.timer4?(e.openBlock(),e.createElementBlock("view",{key:1,class:"timRange2"},e.toDisplayString(t.businessHours.timer3)+"-"+e.toDisplayString(t.businessHours.timer4),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"time"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.businessStatusList,(n,o)=>(e.openBlock(),e.createElementBlock("view",{key:o,class:e.normalizeClass(["timeItem",{disabledColor:t.businessStatus===n.id}]),onClick:e=>t.setStatus(n)},[t.businessStatus===n.id?(e.openBlock(),e.createBlock(s,{key:0,icon:"duihao",size:38,color:"#fff"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(1===n.id&&t.businessStatus===n.id&&0!==n.id?"营业中":n.name)+" ",1),-1===n.id?(e.openBlock(),e.createElementBlock("text",{key:1},"(不推荐)")):e.createCommentVNode("",!0)],10,["onClick"]))),128))]),e.createElementVNode("view",{class:"notice"},[e.createElementVNode("view",null,"临时休息:在休息一段时间后会自动恢复营业"),e.createElementVNode("view",null,"休息:在休息后,需要手动点击营业才会进行营业")])]),e.createVNode(l,{ref:"popupTime",type:"center"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("view",{class:"text"},"临时休息"),e.createElementVNode("view",{class:"ipt"},[e.createElementVNode("radio-group",{onChange:n[1]||(n[1]=(...e)=>t.radioChange&&t.radioChange(...e))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dayList,(n,o)=>(e.openBlock(),e.createElementBlock("label",{class:"uni-list-cell uni-list-cell-pd",key:o},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("radio",{value:n,checked:o===t.currentTime},null,8,["value","checked"]),e.createTextVNode(e.toDisplayString(n),1)])]))),128))],32)]),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-esc",onClick:n[2]||(n[2]=e=>t.popupTime.close())},"取消"),e.createElementVNode("view",{class:"btn-ok",onClick:n[3]||(n[3]=(...e)=>t.storeRest&&t.storeRest(...e))},"确定")])])]),_:1},512),e.createVNode(c)],64)}],["__scopeId","data-v-7596f173"]]),zm={setup(){const t=e.ref({invoice_contact:{person:"",phone:""},invoice_mode:"",invoice_material:"",invoice_class:""}),n=e.ref([{value:"empty",label:"无"},{value:"SYS_MANUAL",label:"人工开具"},{value:"OPEN_API",label:"开放平台"},{value:"FLASH_INVOICE",label:"闪电开票"},{value:"CODE_INVOICE",label:"扫码开票"},{value:"H5_REDIRECT",label:"H5植入"},{value:"OTHER",label:"其他形式"}]),o=e.ref(0),a=e.ref([{value:"empty",label:"无"},{value:"PAPER",label:"纸质"},{value:"ELECTRONIC",label:"电子"}]),r=e.ref(0),i=e.ref([{value:"empty",label:"无"},{value:"VAT_COMMON",label:"普通发票"},{value:"VAT_SPECIAL",label:"专用发票"},{value:"QUOTA",label:"定额发票"}]),s=e.ref(0),l=e.ref(""),c=e.ref(""),u=e.ref(""),d=e.ref({}),m=e.ref("https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png");async function p(){await qn.dispatch("storeInfo/getOneStore",f("storeID"));const e=qn.state.storeInfo.allStoreInfo;u.value=e.name}async function h(){let e=await na({vendorId:"3",vendorStoreID:d.value.vendorStoreID});if("0"===e.code){if(t.value=e.data[0].settings,t.value.invoice_mode){let e=n.value.findIndex(e=>e.value===t.value.invoice_mode);-1!==e&&(o.value=e)}if(t.value.invoice_material){let e=a.value.findIndex(e=>e.value===t.value.invoice_material);-1!==e&&(r.value=e)}if(t.value.invoice_class){let e=i.value.findIndex(e=>e.value===t.value.invoice_class);-1!==e&&(s.value=e)}}}return C(async()=>{qn.commit("storeInfo/jxLoadingFn",!0),"jxgy"===f("terrace")?m.value="https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg":"gblm"===f("terrace")&&(m.value="https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg"),await p(),qn.commit("storeInfo/jxLoadingFn",!1)}),e.watch(()=>qn.getters["storeInfo/platformInfo"],e=>{if(e&&e.length>0){let t=e.filter(e=>3===e.vendorID);t&&t.length>0&&(d.value=t[0],h())}}),E(async()=>{qn.commit("storeInfo/jxLoadingFn",!0),await p(),await h(),qn.commit("storeInfo/jxLoadingFn",!1)}),{invoiceInfo:t,invoice_contact_name:l,invoice_contact_phone:c,invoice_mode_array:n,invoice_mode_index:o,invoice_material_array:a,invoice_material_index:r,invoice_class_array:i,invoice_class_index:s,bindPickerChange:function(e,t){"invoice_mode"===t&&(o.value=e.detail.value),"invoice_material"===t&&(r.value=e.detail.value),"invoice_class"===t&&(s.value=e.detail.value)},saveInvoiceInfo:async function(){try{let e=qn.getters["storeInfo/platformInfo"].filter(e=>3===e.vendorID);if(0===e.length)return V("未绑定饿百门店",2);+o.value&&(t.value.invoice_mode=n.value[o.value].value),+r.value&&(t.value.invoice_material=a.value[r.value].value),+s.value&&(t.value.invoice_class=i.value[s.value].value);let l=await ta({vendorId:"3",vendorStoreID:e[0].vendorStoreID,payload:JSON.stringify(t.value)});l.success.length>0&&!l.success[0].msg?V("修改成功",1):V("修改失败",2),uni.hideLoading()}catch(e){throw uni.hideLoading(),e}},storeName:u,logoUrl:m}}};const Hm=Gn(zm,[["render",function(t,n,o,a,r,i){const s=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"info"},[e.createElementVNode("image",{class:"logo",src:t.logoUrl,mode:"scaleToFill"},null,8,["src"]),e.createElementVNode("view",{class:"storeStatus"},[e.createElementVNode("view",{class:"title1"},e.toDisplayString(t.storeName),1),e.createElementVNode("view",{style:{"margin-top":"40rpx"}},[e.createElementVNode("view",{class:"item"},[e.createTextVNode(" 联系人:"),e.withDirectives(e.createElementVNode("input",{class:"uni-input",style:{"margin-left":"18rpx"},"onUpdate:modelValue":n[0]||(n[0]=e=>t.invoiceInfo.invoice_contact.person=e),placeholder:"发票联系人"},null,512),[[e.vModelText,t.invoiceInfo.invoice_contact.person]])]),e.createElementVNode("view",{class:"item"},[e.createTextVNode(" 联系电话:"),e.withDirectives(e.createElementVNode("input",{class:"uni-input","onUpdate:modelValue":n[1]||(n[1]=e=>t.invoiceInfo.invoice_contact.phone=e),placeholder:"联系电话"},null,512),[[e.vModelText,t.invoiceInfo.invoice_contact.phone]])]),e.createElementVNode("view",{class:"item"},[e.createTextVNode(" 开具方式: "),e.createElementVNode("picker",{onChange:n[2]||(n[2]=e=>t.bindPickerChange(e,"invoice_mode")),value:t.invoice_mode_index,range:t.invoice_mode_array,"range-key":"label"},[e.createElementVNode("view",{class:"uni-input"},e.toDisplayString(t.invoice_mode_array[t.invoice_mode_index].label),1)],40,["value","range"])]),e.createElementVNode("view",{class:"item"},[e.createTextVNode(" 发票材质: "),e.createElementVNode("picker",{onChange:n[3]||(n[3]=e=>t.bindPickerChange(e,"invoice_material")),value:t.invoice_material_index,range:t.invoice_material_array,"range-key":"label"},[e.createElementVNode("view",{class:"uni-input"},e.toDisplayString(t.invoice_material_array[t.invoice_material_index].label),1)],40,["value","range"])]),e.createElementVNode("view",{class:"item"},[e.createTextVNode(" 发票种类: "),e.createElementVNode("picker",{onChange:n[4]||(n[4]=e=>t.bindPickerChange(e,"invoice_class")),value:t.invoice_class_index,range:t.invoice_class_array,"range-key":"label"},[e.createElementVNode("view",{class:"uni-input"},e.toDisplayString(t.invoice_class_array[t.invoice_class_index].label),1)],40,["value","range"])]),e.createElementVNode("view",{class:"save_button",onClick:n[5]||(n[5]=(...e)=>t.saveInvoiceInfo&&t.saveInvoiceInfo(...e))},"保存")])])]),e.createVNode(s)],64)}],["__scopeId","data-v-8f375741"]]),qm=e.defineComponent({__name:"index",setup(t){const n=e.ref({}),o=e.ref([{id:1,name:"营业"},{id:-1,name:"休息"},{id:-2,name:"下线"}]);C(e=>{n.value=JSON.parse(e.vendorInfo),1===n.value.vendorID&&(o.value=o.value.filter(e=>-2!==e.id))});const a=e.computed(()=>Nt.serveInfo.vendorName);return(t,r)=>{const i=w(e.resolveDynamicComponent("jx-icon"),Yn),s=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"logo"},[e.createElementVNode("view",{class:"vendor"},[e.createElementVNode("text",{class:e.normalizeClass(`icon icon-${n.value.vendorID}`)},null,2)])]),e.createElementVNode("view",{class:"vendorName"},e.toDisplayString(a.value[n.value.vendorID]?a.value[n.value.vendorID]:"未知平台"),1),e.createElementVNode("view",{class:"onlineStatus"},[e.createElementVNode("view",{class:"title",style:{"font-weight":"bold"}},"营业状态"),e.createElementVNode("view",{style:{"margin-top":"20rpx"}},"(该状态表示第三方平台的营业状态)")]),e.createElementVNode("view",{class:"time"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,t=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["timeItem",{disabledColor:n.value.status===t.id}]),onClick:e=>async function(e){if(e.id===n.value.status)return;let t={storeID:f("storeID"),vendorIDs:n.value.vendorID+"",status:e.id};await un.update_vendors_store_states(t),await un.update_store_vendor_map({storeID:f("storeID"),vendorID:n.value.vendorID,payload:{status:e.id}}),await qn.dispatch("storeInfo/getOneStore",f("storeID")),n.value.status=e.id,V("操作成功",1)}(t)},[n.value.status===t.id?(e.openBlock(),e.createBlock(i,{key:0,icon:"duihao",size:38,color:"#fff"})):e.createCommentVNode("",!0),e.createElementVNode("text",null,e.toDisplayString(t.name),1)],10,["onClick"]))),256))]),e.createElementVNode("view",{class:"notice"},[e.createElementVNode("text",{class:"text"},"该操作仅更新第三方平台("+e.toDisplayString(a.value[n.value.vendorID]?a.value[n.value.vendorID]:"未知")+")的营业状态",1)])]),e.createVNode(s)],64)}}}),Gm=Gn(qm,[["__scopeId","data-v-baa91906"]]);function Wm(){function t(){l.value=0,u.value=0,o.value=[]}const n=e.ref(!1);C(async()=>{await p()});const o=e.ref([]),a=e.ref(!1),r=e.ref(""),i=e.ref(0),s=e.ref(1),l=e.ref(0),c=e.ref(30),u=e.ref(0),d=e.ref([]),m=e.ref("");async function p(){b.value=!0;let e={storeID:f("storeID"),isFocus:a.value,keyword:r.value,fromStatus:i.value,toStatus:s.value,offset:l.value,pageSize:c.value,status:-1,categoryID:m.value};!function(e){for(let t in e)""+e[t]!=""&&""+e[t]!=null||delete e[t]}(e);let n=await Ka(e);if(0==n.code){let e=[];u.value=n.data.totalCount,p=n.data.skuNames||[],e=p.map(e=>(e.price=(e.unitPrice/100).toFixed(2),e.skuNameCheckedStatus=!1,e.skus=e.skus.map(t=>({...t,price:"份"===e.unit?(h(e.price,t)/100).toFixed(2):e.price})),e)),d.value.forEach(t=>{let n=e.filter(e=>e.id===t.nameID);n.length>0&&(n[0].skuNameCheckedStatus=!0)}),o.value=o.value.concat(e)}else t();var p;b.value=!1}function h(e,t){let n=Math.round(100*e),o=t.specQuality,a=t.specUnit.toLowerCase();return"kg"!==a&&"l"!==a||(o*=1e3),Math.round(n*o/500)}const v=e.ref(!1),g=e.ref({});const y=e.ref(null);let k=null;const w=e.ref(!1);const b=e.ref(!1);let x=[];const S=e.ref(0);const N=e.ref(null);return e.onBeforeUnmount(()=>{Mt()}),{dafauleData:[{categoryID:"all",children:[],level:1,name:"所有分类"}],oneMenuClick:function(e){"all"==e?(n.value=!1,m.value="",t(),p()):(n.value=!0,m.value=e,t(),p())},skuNames:o,isFocus:a,totalCount:u,updateTowFilter:function(e){a.value=0!=e,r.value="",N.value.createSuccess(),t(),p()},serachShopping:function(e){t(),r.value=e,p()},clearInpu:function(){t(),r.value="",p()},scanCode:async function(e){let t={keyword:e,status:-1},n=await Qa(t),o={};if(n.data.skuNames){const e=n.data.skuNames[0],t=e.skus[0];o.originalName=function(e,t){let n="";e.prefix&&(n+=`[${e.prefix}]`);n+=e.name,"份"===e.unit&&(n+="约");n+=+t.specQuality,n+=t.specUnit,n+="/"+e.unit,t.comment&&(n+=`(${t.comment})`);return n}(e,t),o.name=e.name,o.imgList=[e.img],o.upcCode=e.Upc,o.specQuality=t.specQuality,o.specUnit=t.specUnit,o.unit=e.unit,o.weight=t.weight,o.isJx=!0,v.value=!0}else{let t={upcCode:e};const n=await tr(t);null!=n.data?(o=n.data[0],o.isJx=!1,v.value=!0):uni.jxAlert({title:"提示",content:"未查询到商品,请联系运营创建"})}g.value=o},refresherrefresh:function(){w.value=!0,clearTimeout(k),k=setTimeout(()=>{w.value=!1,y.value.GetStoreCategoryMap(),t(),p()},1e3)},triggered:w,leftBarRef:y,scrolltolower:function(){if(l.value++,c.value*(l.value-1)>u.value||u.value<c.value)b.value=!1;else{if(b.value)return;p()}},isLoad:b,newCreateGoods:function(e){S.value=e.length,x=e},newGoodsNum:S,handleFocus:async function(e){if(0==S.value)return V("未选择商品");uni.jxConfirm({title:"提示",content:`本次操作一共${a.value?"删除":"创建"}《${S.value}》个商品,确定操作吗`,success:async()=>{if(1==e){let e={storeIDs:JSON.stringify([f("storeID")]),payload:JSON.stringify(x)};0==(await Ga(e)).code?(a.value?V("删除成功",1):V("创建成功,请等待审核",1),x=[],N.value.createSuccess(),S.value=0,t(),p()):a.value?V("删除失败",2):V("创建失败",2)}}})},rightMainRef:N,isSearchGoods:v,scanData:g,scanGoodConfirm:async function(e){v.value=!1;let t={...e,storeID:f("storeID")};0==(await nr(t)).code?uni.jxAlert({title:"提示",content:"创建成功"}):uni.jxAlert({title:"提示",content:"创建失败,请联系运营进行创建"})}}}const Jm=e.defineComponent({__name:"create-goods-search",emits:["serachShopping","clearInpu","scanCode"],setup(t,{emit:n}){const o=n;function a(e){o("serachShopping",e.value)}function r(e){i(e)}const i=Vt(e=>{o("serachShopping",e)},1e3);function s(e){o("clearInpu",e.value)}function l(){let e=f("permissionList");e&&e.scanCodeToCreateGood?uni.scanCode({onlyFromCamera:!1,scanType:["qrCode","barCode"],success:({result:e})=>{o("scanCode",e)},fail:e=>{V("取消扫码",2)}}):uni.jxConfirm({title:"相机/相册权限说明",content:"便于您使用该功能扫描商品上的条形码,快速识别并创建商品",success(){h("permissionList",{scanCodeToCreateGood:!0}),uni.scanCode({onlyFromCamera:!1,scanType:["qrCode","barCode"],success:({result:e})=>{o("scanCode",e)},fail:e=>{V("取消扫码",2)}})}})}return(t,n)=>{const o=w(e.resolveDynamicComponent("uni-search-bar"),za),i=w(e.resolveDynamicComponent("jx-icon"),Yn);return e.openBlock(),e.createElementBlock("view",{class:"search-root"},[e.createVNode(o,{cancelButton:"none",clearButton:"auto",placeholder:"请输入关键字 例如:土豆",onConfirm:a,onInput:r,onClear:s}),e.createElementVNode("view",{class:"add-shopping",onClick:l},[e.createVNode(i,{icon:"ziyuan",color:"#fff",size:60})])])}}}),Xm=Gn(Jm,[["__scopeId","data-v-f5bfd579"]]),Km=e.defineComponent({__name:"create-goods-filter",props:{totalCount:{}},emits:["updateTowFilter"],setup(t,{emit:n}){const o=n,a=e.ref(0);function r(e){a.value!=e&&i(e)}const i=Bt({time:2500,success:e=>{a.value=e,o("updateTowFilter",e)},fail:()=>{V("老板要点慢点哦")}});return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"filter-root"},[e.createElementVNode("view",{class:e.normalizeClass(["item",{active:0==a.value}]),onClick:n[0]||(n[0]=e=>r(0))},[e.createTextVNode("未创建"),0==a.value?(e.openBlock(),e.createElementBlock("text",{key:0},"("+e.toDisplayString(t.totalCount)+")",1)):e.createCommentVNode("",!0)],2),e.createElementVNode("view",{class:e.normalizeClass(["item",{active:1==a.value}]),onClick:n[1]||(n[1]=e=>r(1))},[e.createTextVNode("已创建"),1==a.value?(e.openBlock(),e.createElementBlock("text",{key:0},"("+e.toDisplayString(t.totalCount)+")",1)):e.createCommentVNode("",!0)],2)]))}}),Ym=Gn(Km,[["__scopeId","data-v-92cf8ba3"]]),Zm=Gn(e.defineComponent({__name:"searchGoods",props:{scanData:{}},emits:["cancel","confirm"],setup(t,{emit:n}){const o=t,a=e.ref({});a.value=o.scanData;const r=e.ref(null),i=e.ref(null);e.onMounted(async()=>{let e={storeIDs:JSON.stringify([f("storeID")]),isFocus:!0,keyword:a.value.upcCode,isGetOpRequest:!0,isBySku:!1,isAct:!1,isHighPrice:!1},t=await un.get_stores_skus(e);0!=t.data.totalCount&&(i.value=t.data.skuNames[0])});const s=n;function l(){s("cancel")}function c(){if(!r.value)return V("请输入商品价格");let e={payload:JSON.stringify(a.value),price:Math.round(100*r.value)};s("confirm",e)}async function u(){let e={};const t=await tr(a.value.upcCode);t.data.length>0?(e=t.data[0],e.isJx=!1,a.value=e):uni.jxAlert({title:"提示",content:"未查询到商品,请联系运营创建"})}return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"big-modal"},[e.createElementVNode("view",{class:"modal-bg"},[i.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"have-goods"}," 该商品已存在 - ¥"+e.toDisplayString(i.value.unitPrice/100)+"/"+e.toDisplayString(i.value.unit),1)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"modal-content"},[e.createElementVNode("image",{class:"img",src:a.value.imgList[0],alt:""},null,8,["src"]),e.createElementVNode("view",{class:"original-name"},e.toDisplayString(a.value.originalName),1),e.createElementVNode("view",{class:"upc-code"},"商品码: "+e.toDisplayString(a.value.upcCode),1),e.createElementVNode("view",null,[e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[0]||(n[0]=e=>r.value=e),placeholder:"请输入价格",type:"digit"},null,512),[[e.vModelText,r.value]])])]),e.createElementVNode("view",{class:"big-modal-btn-group"},[e.createElementVNode("view",{onClick:l,class:"btn btn-cancel"},"取消"),e.withDirectives(e.createElementVNode("view",{onClick:u,class:"btn btn-correct"},"纠正",512),[[e.vShow,a.value.isJx]]),e.createElementVNode("view",{onClick:c,class:"btn btn-create"},"创建")])])]))}}),[["__scopeId","data-v-5333b211"]]);const Qm=e.defineComponent({__name:"right-main",props:{skuNames:{},isFocus:{type:Boolean}},emits:["newCreateGoods"],setup(t,{expose:n,emit:o}){const a=t,r=o;n({createSuccess:function(){c.value=[],r("newCreateGoods",c.value)}});const{updateSaleStatus:i,priceBlur:s,priceChange:l,focusArr:c,removeGoods:u}=function(t,n){function o(e,t){let n=Math.round(100*e),o=t.specQuality,a=t.specUnit.toLowerCase();return"kg"!==a&&"l"!==a||(o*=1e3),Math.round(n*o/500)}const a=e.ref([]);function r(e){if(!a.value.find(t=>t.nameID===e.id)){let o=[];e.skus.forEach(e=>{e.storeSkuStatus&&o.push({skuID:e.id,isSale:1})}),t.isFocus?a.value.push({nameID:e.id,isFocus:t.isFocus?-1:1}):a.value.push({nameID:e.id,unitPrice:Math.round(100*e.price),isFocus:t.isFocus?-1:1,skus:o}),n("newCreateGoods",a.value)}}function i(e){a.value.find(t=>t.nameID===e.id)&&(a.value=a.value.filter(t=>t.nameID!==e.id),n("newCreateGoods",a.value))}const s=Vt((e,t)=>{t.skus=t.skus.map(n=>({...n,price:"份"===t.unit?(o(e.detail.value,n)/100).toFixed(2):Number(e.detail.value).toFixed(2)}));let n=a.value.find(e=>e.nameID===t.id);n&&(e.detail.value?n.unitPrice=Math.round(100*e.detail.value):n.unitPrice=1)},500);return{updateSaleStatus:function(e,n){if(!t.isFocus){r(e),n.storeSkuStatus=n.storeSkuStatus?0:1;let t=a.value.find(t=>t.nameID===e.id);t&&(n.storeSkuStatus?t.skus.push({skuID:n.id,isSale:1}):t.skus=t.skus.filter(e=>e.skuID!==n.id),0==t.skus.length&&i(e))}},priceBlur:function(e){e.price<=0&&(e.price=.01,e.skus=e.skus.map(e=>({...e,price:.01})))},priceChange:function(e,t){s(e,t)},focusArr:a,removeGoods:function(e,t){0==e.detail.value.length?i(t):r(t)}}}(a,r),{previewImage:d}=tn();return(t,n)=>{const o=w(e.resolveDynamicComponent("jx-price"),ka);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.skuNames,(a,r)=>(e.openBlock(),e.createElementBlock("view",{class:"skuName-cell-focus",key:r,id:"g"+a.id},[e.createElementVNode("view",{class:"skuName"},[e.createElementVNode("view",{class:"skuName-img",onClick:e=>function(e){let t=[e.img,e.img2,e.img3,e.img4,e.img5].filter(e=>e&&e.length>0);d(t)}(a)},[e.createElementVNode("image",{class:"imglabel",mode:"scaleToFill","lazy-load":"",src:a.img},null,8,["src"])],8,["onClick"]),e.createElementVNode("view",{class:"skuName-info"},[e.createElementVNode("view",{class:"skuName-name"},e.toDisplayString(a.prefix?"["+a.prefix+"]":"")+e.toDisplayString(a.name),1),e.createElementVNode("view",{class:"skuName-price"},[e.createElementVNode("text",{class:"icon-money"},"¥"),t.isFocus?(e.openBlock(),e.createElementBlock("text",{key:0,class:"num"},e.toDisplayString(a.price),1)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"num-input",onClick:n[0]||(n[0]=e.withModifiers(()=>{},["stop"]))},[e.withDirectives(e.createElementVNode("input",{type:"digit","onUpdate:modelValue":e=>a.price=e,onInput:t=>e.unref(l)(t,a),onBlur:t=>e.unref(s)(a)},null,40,["onUpdate:modelValue","onInput","onBlur"]),[[e.vModelText,a.price]])])),e.createElementVNode("text",{class:"unit"},"/ "+e.toDisplayString("份"===a.unit?"斤":a.unit),1)]),e.withDirectives(e.createElementVNode("view",{class:"check-display"},[e.createTextVNode(e.toDisplayString(t.isFocus?"":"新建")+"审核中价格: ",1),e.createVNode(o,{price:a.auditUnitPrice},null,8,["price"])],512),[[e.vShow,a.auditUnitPrice]])])]),t.isFocus?(e.openBlock(),e.createElementBlock("view",{key:0,class:"skus2"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.skus,(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["sku-cell-forfocus",{"sku-cell-forfocus-green":t.storeSkuStatus}]),key:n},[e.createTextVNode(e.toDisplayString(t.specQuality)+e.toDisplayString(t.specUnit)+" ",1),"份"===a.unit?(e.openBlock(),e.createElementBlock("text",{key:0},"约")):e.createCommentVNode("",!0),e.createTextVNode("¥"+e.toDisplayString(t.price)+"("+e.toDisplayString(t.storeSkuStatus?"可售":"不可售")+") ",1)],2))),128)),e.createElementVNode("view",{class:"checkbox"},[e.createElementVNode("checkbox-group",{onChange:t=>e.unref(u)(t,a)},[e.createElementVNode("label",null,[e.createElementVNode("checkbox",{color:"#4eb331",style:{transform:"scale(0.8)"}}),e.createTextVNode("选中商品 ")])],40,["onChange"])])])):e.createCommentVNode("",!0),t.isFocus?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:1,class:"skus"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.skus,(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,class:"sku-cell",onClick:n=>e.unref(i)(a,t)},[e.createElementVNode("view",{class:e.normalizeClass(["sku-root",{"sku-root-active":""==t.comment}])},[e.createElementVNode("view",{class:"sku-left"},[e.createElementVNode("view",{class:"sku-spec"},e.toDisplayString(t.specQuality)+e.toDisplayString(t.specUnit),1),e.createElementVNode("view",{class:"sku-price"},[e.createElementVNode("text",null,"¥"),e.createTextVNode(e.toDisplayString(t.price),1)])]),e.createElementVNode("view",{class:e.normalizeClass(["sku-right",{isSale:1===t.storeSkuStatus}])},e.toDisplayString(1===t.storeSkuStatus?"可售":"不可售"),3)],2),t.comment?(e.openBlock(),e.createElementBlock("view",{key:0,class:"sku-bottom"},e.toDisplayString(t.comment?t.comment:""),1)):e.createCommentVNode("",!0)],8,["onClick"]))),128))]))],8,["id"]))),128)}}}),ep=Gn(Qm,[["__scopeId","data-v-b16f29d2"]]),tp=Gn(e.defineComponent({__name:"createGoods",setup(t){const{dafauleData:n,oneMenuClick:o,skuNames:a,isFocus:r,totalCount:i,updateTowFilter:s,serachShopping:l,clearInpu:c,scanCode:u,refresherrefresh:d,triggered:m,leftBarRef:p,scrolltolower:f,isLoad:h,newCreateGoods:v,newGoodsNum:g,handleFocus:y,rightMainRef:k,isSearchGoods:b,scanData:x,scanGoodConfirm:S}=Wm();return(t,N)=>{const C=w(e.resolveDynamicComponent("jx-empty"),Jn),_=w(e.resolveDynamicComponent("jx-load-more"),ya),E=w(e.resolveDynamicComponent("jx-loading"),Wn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",null,[e.createVNode(Xm,{class:"shopping-cel",onSerachShopping:e.unref(l),onClearInpu:e.unref(c),onScanCode:e.unref(u)},null,8,["onSerachShopping","onClearInpu","onScanCode"])]),e.createElementVNode("view",{class:"main-center-root"},[e.createElementVNode("view",{class:"left-bar-root"},[e.createElementVNode("scroll-view",{"scroll-y":"",style:{height:"calc(100vh - 92rpx)"}},[e.createVNode(ar,{ref_key:"leftBarRef",ref:p,dafauleData:e.unref(n),onOneMenuClick:e.unref(o)},null,8,["dafauleData","onOneMenuClick"])])]),e.createElementVNode("view"),e.createElementVNode("view",{class:"right-center"},[e.createVNode(Ym,{onUpdateTowFilter:e.unref(s),totalCount:e.unref(i)},null,8,["onUpdateTowFilter","totalCount"]),e.createElementVNode("scroll-view",{"scroll-y":"",style:{height:"calc(100vh - 272rpx)"},"refresher-enabled":"","refresher-triggered":e.unref(m),onRefresherrefresh:N[0]||(N[0]=(...t)=>e.unref(d)&&e.unref(d)(...t)),onScrolltolower:N[1]||(N[1]=(...t)=>e.unref(f)&&e.unref(f)(...t))},[e.createVNode(ep,{skuNames:e.unref(a),isFocus:e.unref(r),onNewCreateGoods:e.unref(v),ref_key:"rightMainRef",ref:k},null,8,["skuNames","isFocus","onNewCreateGoods"]),e.withDirectives(e.createVNode(C,{title:"此分类暂无商品"},null,512),[[e.vShow,0==e.unref(i)]]),e.withDirectives(e.createVNode(_,{isLoad:e.unref(h),tip:"没有更多商品了"},null,8,["isLoad"]),[[e.vShow,e.unref(i)>=4]])],40,["refresher-triggered"]),e.createElementVNode("view",{class:"bottom-filter"},[e.unref(r)?(e.openBlock(),e.createElementBlock("view",{key:1,class:"item",onClick:N[3]||(N[3]=t=>e.unref(y)(1))},"删除("+e.toDisplayString(e.unref(g))+")",1)):(e.openBlock(),e.createElementBlock("view",{key:0,class:"item",onClick:N[2]||(N[2]=t=>e.unref(y)(1))}," 创建("+e.toDisplayString(e.unref(g))+") ",1))])])]),e.unref(b)?(e.openBlock(),e.createBlock(Zm,{key:0,scanData:e.unref(x),onCancel:N[4]||(N[4]=e=>b.value=!1),onConfirm:e.unref(S)},null,8,["scanData","onConfirm"])):e.createCommentVNode("",!0),e.createVNode(E)],64)}}}),[["__scopeId","data-v-372d8ae4"]]),{analyEmoji:np}=tn(),op=Ld(),ap=function(){const t=e.ref([]),n=e.ref(),o=e.ref(""),a=e.ref(!1),r=e.ref(),i=e.ref(!1);let s={},l={};async function c(){let e=qn.state.storeInfo.vendorStoreIDS,t={appID:1===s.vendorID?e.appID:l.vendorOrgCode,vendorStoreID:1===s.vendorID?e.MT:l.vendorStoreID,vendorID:""+s.vendorID,orderID:""+s.orderID?s.orderID:"0",userID:s.userID};await Fc(t)}C(e=>{let a=f("vendorUserInfo");if("{}"===JSON.stringify(e))s={userID:a.userID,NewMessageNum:0,orderDesc:` #${a.orderSeq}`,vendorID:a.vendorID,orderID:a.venderOrderID};else{let t=JSON.parse(e.data);s=t}qn.state.storeInfo.allStoreInfo.StoreMaps&&qn.state.storeInfo.allStoreInfo.StoreMaps.length>0&&(l=qn.state.storeInfo.allStoreInfo.StoreMaps.find(e=>3===e.vendorID)),uni.setNavigationBarTitle({title:1==s.vendorID?`【美团${s.orderDesc}】${"0"===s.userID?"群发消息":s.userID}`:`【饿了么】${s.userID}`}),async function(){let e=qn.state.storeInfo.vendorStoreIDS,a={payLoad:JSON.stringify([{vendorStoreID:1===s.vendorID?e.MT:l.vendorStoreID,vendorID:""+s.vendorID,appID:1===s.vendorID?e.appID:l.vendorOrgCode,userID:s.userID}])},r=await jc(a);if(0==r.code){let a=[];if(1===s.vendorID){o.value=e.appID,(r.data[`${e.appID}:${e.MT}:${s.vendorID}:${s.userID}`]||[]).forEach(e=>{let t=Lt(e),n=1==t.msgContent.msg_type?np(Tt(t.msgContent.msg_content,o.value)):Tt(t.msgContent.msg_content,o.value);if(4==t.msgContent.msg_type&&(n=t.msgContent.app_spu_codes),null!=t.msgContent){let e={sendType:t.sendType,...t.msgContent,msg_content:n};a.push(e)}})}else{(r.data[`${l.vendorOrgCode}:${l.vendorStoreID}:${s.vendorID}:${s.userID}`]||[]).map((e,n)=>{let o=Lt(e);if(null!=o.msgContent){o.msgContent.payload&&(o.msgContent.payLoad=o.msgContent.payload);let e=JSON.parse(o.msgContent.payLoad.content);e.text&&(e.text=e.text.replace(/^["']|["']$/g,""),o.msgContent.payLoad.contentType=1);let r="";if(1==o.msgContent.payLoad.contentType)r=e.text;else if(2==o.msgContent.payLoad.contentType||3==o.msgContent.payLoad.contentType||4==o.msgContent.payLoad.contentType)!async function(e,n){let o=await Lc(e);0===t.value[n].msg_content.length&&(t.value[n].msg_content="0"===o.code?o.data:"")}({mediaID:e.mediaId,platformShopID:""+l.vendorStoreID},n),r="";else if(e.elements&&e.elements.length){let t=e.elements.filter(e=>1===e.elementType);r=t&&t.length>0?JSON.parse(t[0].elementContent).text.replace("@商家",""):""}let i={sendType:o.sendType,...o.msgContent,msg_content:1===o.msgContent.payLoad.contentType||"8"===o.msgContent.payLoad.contentType?np(r):r,msg_source:"jx"===o.sendType?1:2,msg_type:"8"===o.msgContent.payLoad.contentType?1:o.msgContent.payLoad.contentType};a.push(i)}})}t.value=a,u.value=!0,n.value="msg"+(t.value.length-1)}else V("获取聊天信息异常")}()}),x(async()=>{0!=s.NewMessageNum&&await c()});const u=e.ref(!1);async function d(a){let r=1===s.vendorID?qn.state.storeInfo.vendorStoreIDS:l.vendorOrgCode,i={sendType:1===s.vendorID?"mt":"elm",app_id:1===s.vendorID?r.appID:l.vendorOrgCode,app_poi_code:1===s.vendorID?r.MT:l.vendorStoreID,cts:Math.round((new Date).getTime()/1e3).toString(),msg_content:1===a.type?np(a.msg):a.msg,msg_id:Math.round((new Date).getTime()).toString(),msg_source:1,msg_type:a.type,open_user_id:s.userID,order_id:0,app_spu_codes:""};t.value.push(i),e.nextTick(()=>{n.value="msg"+(t.value.length-1)});let u={};if(1===s.vendorID)u={vendorOrgCode:o.value,sendData:JSON.stringify({vendorID:1,data:{msg_content:Pt(a.msg,o.value),msg_type:+a.type,app_poi_code:""+r.MT,msg_id:+Math.round((new Date).getTime()).toString()+184572,app_id:+r.appID,msg_source:1,order_id:s.orderID,cts:+Math.round((new Date).getTime()/1e3).toString(),open_user_id:+s.userID}})};else{let e=t.value.filter(e=>2===e.msg_source);u={platformShopId:e[0].platformShopId,subBizType:"SEND_MESSAGE",bizType:"IM",payload:{receiverIds:e[0].payLoad.receiverIds,groupId:e[0].payLoad.groupId,msgId:""+Math.round((new Date).getTime()).toString()+184572,contentType:""+a.type,content:1==a.type?JSON.stringify({text:a.msg}):JSON.stringify({mediaId:a.msg,fileType:0,size:1})}},u={vendorOrgCode:l.vendorOrgCode,sendData:JSON.stringify({vendorID:s.vendorID,data:{...u}})}}let d=await Uc(u);0==d.code||uni.jxAlert({title:"提示",content:`发送失败:${d.desc||d.data}`,success:()=>{t.value.pop()}}),c()}function m(){i.value=!1}return e.watch(()=>qn.state.storeInfo.imMessage,a=>{let r=JSON.parse(a);if(r.open_user_id!=s.userID)return!1;r.sendType="mt",o.value&&(r.msg_content=Tt(r.msg_content,o.value)),t.value.push(r),e.nextTick(()=>{n.value="msg"+(t.value.length-1)})}),e.onBeforeUnmount(async()=>{0!=s.NewMessageNum&&await c()}),{scrollToView:n,chatData:t,isItem:u,isShowEmoji:a,onEditorReady:function(){uni.createSelectorQuery().select("#editor").context(e=>{r.value=e.context}).exec()},onInput:function(e){},onBlur:function(e){k("log","at subPages/messageChild/msgChat/msgChat.ts:251","失去焦点",e.detail.delta.ops)},onFocus:function(e){k("log","at subPages/messageChild/msgChat/msgChat.ts:260","查看编辑器是否聚焦",e),a.value=!1},selectImg:function(){if(3===s.vendorID)return V("暂不支持该功能");uni.chooseImage({success:e=>{e.tempFiles.forEach(e=>{!async function(e){let t={suffix:-1===e.indexOf(".png")?".jpg":".png"},n=await un.get_qiniu_upload_token(t);if(0==n.code){let t=e;op.upload(t,e=>{d({msg:"https://image.jxc4.com/"+e.key,type:2})},e=>{V("上传失败,请重试",2)},{uploadURL:"https://up-z2.qiniup.com/",key:n.data.fileName,uptoken:n.data.token})}else V("上传失败",2)}(e.path)})}})},openEmoji:function(){i.value=!0,a.value=!0},closeEmoji:function(){a.value=!1,m()},selectEmoji:function(e){r.value.insertImage({src:`https://www.jxc4.com/emoji/${e.symbol}.png`,alt:e.text,width:"20px",height:"20px",nowrap:!0});const t=setTimeout(()=>{m(),clearTimeout(t)},2e3)},sendMessage:function(){r.value.getContents({complete(e){if("getContents:ok"===e.errMsg){let t="";e.delta.ops.forEach(e=>{let n=typeof e.insert;t+="string"===n?e.insert:e.attributes.alt}),t=t.replace(/\n/g,""),t.length>0&&(d({msg:t,type:1}),r.value.clear(),m())}}})},readOnly:i,closeReadOnly:m}},rp=Gn(e.defineComponent({__name:"chat-item",props:{item:{}},setup(t){const{previewImage:n}=tn(),{orderDetail:o}=aa(),a=t,r=e.computed(()=>1==a.item.msg_source?"https://image.jxc4.com/image/70143fcf48aefe74537533f35a0a8153.jpg":"mt"==a.item.sendType?"https://image.jxc4.com/image/75654ab606494a0efdb0cf7d7ad060d9.png":"https://image.jxc4.com/image/6c2f1dfd95890df8ef5e27bde15c4e7f.png"),i=e.ref(null),s=e.ref({img:"https://image.jxc4.com/image/5c506c8db41719fe4c433979498eb1e7.png",name:"三方平台创建商品",unit:"",unitPrice:"",skus:[{id:"",mtwmPrice:""}]}),l=e.ref(!1),c=uni.createInnerAudioContext();return(t,a)=>{const u=w(e.resolveDynamicComponent("jx-icon"),Yn),d=w(e.resolveDynamicComponent("jx-price"),ka),m=w(e.resolveDynamicComponent("uni-popup"),Ca);return e.openBlock(),e.createElementBlock("view",{class:"chat-item"},[e.createElementVNode("view",{class:e.normalizeClass({"chat-container":!0,"chat-location-me":1==t.item.msg_source})},[e.createElementVNode("view",{class:"chat-icon-container"},[e.createElementVNode("image",{class:"chat-icon",src:r.value,mode:"aspectFill"},null,8,["src"])]),e.createElementVNode("view",{class:"chat-content-container"},[e.createElementVNode("text",{class:e.normalizeClass({"chat-user-name":!0,"chat-location-me":1==t.item.msg_source}),onClick:a[0]||(a[0]=e=>async function(e){if(!e)return;let t=await ho({vendorOrderID:e});"0"===t.code&&o(t.data.data[0].vendorOrderID,t.data.data[0].vendorID)}(t.item.order_id))},e.toDisplayString(2==t.item.msg_source?t.item.order_id?t.item.sendType.toUpperCase()+"客户("+t.item.order_id+")":t.item.sendType.toUpperCase()+"客户":e.unref(f)("storeName")),3),e.createElementVNode("view",{style:e.normalizeStyle({display:"flex","justify-content":1===t.item.msg_source?"flex-end":"flex-start","margin-right":1===t.item.msg_source?"20rpx":"0rpx"})},[1===t.item.msg_type||11==t.item.msg_type?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass([{"chat-text-container":!0,"chat-text-container-me":1==t.item.msg_source},"emoji-box"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.msg_content,(n,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},["text"===n.type?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({"char-text":!0,"char-text-me":1==t.item.msg_source}),"user-select":"",selectable:""},e.toDisplayString(n.text),3)):"emoji"===n.type&&n.emoji.includes("unknown:")?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({"char-text":!0,"char-text-me":1==t.item.msg_source}),"user-select":"",selectable:""},e.toDisplayString(n.emoji.substring(8)),3)):(e.openBlock(),e.createElementBlock("image",{key:2,src:`https://www.jxc4.com/emoji/${n.emoji}.png`,alt:"",style:{width:"20px",height:"20px"}},null,8,["src"]))],64))),128))],2)):2==t.item.msg_type||12==t.item.msg_type?(e.openBlock(),e.createElementBlock("view",{key:1,class:e.normalizeClass({"chat-text-container-img":!0,"chat-text-container-me-img":1==t.item.msg_source})},[e.createElementVNode("image",{onClick:a[1]||(a[1]=o=>e.unref(n)(t.item.msg_content)),src:t.item.msg_content,mode:"widthFix"},null,8,["src"])],2)):3==t.item.msg_type||13==t.item.msg_type?(e.openBlock(),e.createElementBlock("view",{key:2,class:e.normalizeClass(["chat-text-container yuyin",{isVoice:l.value}]),onClick:a[2]||(a[2]=e=>function(e){if("android"!=uni.getSystemInfoSync().platform)return V("ios系统不支持");V("正在播放音频"),l.value=!0,c.src=e,c.stop(),c.play(),c.onEnded(()=>{l.value=!1})}(t.item.msg_content))},[e.createVNode(u,{icon:"yuyin",size:42})],2)):4==t.item.msg_type||14==t.item.msg_type?(e.openBlock(),e.createElementBlock("view",{key:3,class:"chat-text-container",onClick:a[4]||(a[4]=e=>{return n=t.item.msg_content,void uni.setClipboardData({data:n,success(){V("复制成功",1)},fail(){V("复制失败")}});var n})},[e.createTextVNode(" skuid:"+e.toDisplayString(t.item.msg_content)+" ",1),e.createElementVNode("text",{style:{color:"rgb(64, 158, 255)","text-decoration":"underline"},onClick:a[3]||(a[3]=e.withModifiers(e=>async function(e){if(k("log","at subPages/messageChild/msgChat/msgChatChild/chat-item.vue:219",e,"skuid",s.value),e==s.value.skus[0].id)return i.value.open();let t={storeIDs:JSON.stringify([f("storeID")]),isFocus:!0,skuIDs:JSON.stringify([+e])},n=await un.get_stores_skus(t);k("log","at subPages/messageChild/msgChat/msgChatChild/chat-item.vue:228","走到下面了吗",n),"0"===n.code&&1===n.data.totalCount&&(s.value=n.data.skuNames[0]),i.value.open()}(t.item.msg_content),["stop"]))},"查看商品")])):5==t.item.msg_type&&t.item.msg_content?(e.openBlock(),e.createElementBlock("view",{key:4,class:"chat-text-container order-car",onClick:a[5]||(a[5]=n=>e.unref(o)(JSON.parse(t.item.msg_content).order_view_id,"1"))},[e.createElementVNode("view",{class:"top"},e.toDisplayString(JSON.parse(t.item.msg_content).food_desc),1),e.createElementVNode("view",{class:"bottom"},[e.createElementVNode("view",{class:"status"},e.toDisplayString(JSON.parse(t.item.msg_content).status_desc),1),e.createElementVNode("view",null,[e.createTextVNode("订单详情"),e.createVNode(u,{icon:"gengduo",color:"#6e6e6e"})])])])):(e.openBlock(),e.createElementBlock("view",{key:5,class:"chat-text-container"}," 【未知信息】 "))],4)])],2),e.createVNode(m,{ref_key:"popup",ref:i,type:"center"},{default:e.withCtx(()=>[e.createElementVNode("view",{class:"jx-popup-update"},[e.createElementVNode("view",{class:"text"},"查看商品信息"),e.createElementVNode("view",null,[e.createElementVNode("image",{src:s.value.img},null,8,["src"])]),e.createElementVNode("view",{class:"goodCard_name"},e.toDisplayString(s.value.name),1),s.value.unitPrice?(e.openBlock(),e.createBlock(d,{key:0,price:s.value.skus[0].mtwmPrice,color:"#ef5757"},null,8,["price"])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"btn-root"},[e.createElementVNode("view",{class:"btn-ok",onClick:a[6]||(a[6]=e=>i.value.close())},"关闭")])])]),_:1},512)])}}}),[["__scopeId","data-v-2ce2f1e2"]]),ip=Gn(e.defineComponent({__name:"msgChat",setup(t){const{scrollToView:n,chatData:o,isItem:a,isShowEmoji:r,onEditorReady:i,onInput:s,onBlur:l,onFocus:c,selectImg:u,openEmoji:d,closeEmoji:m,selectEmoji:p,sendMessage:f,readOnly:h,closeReadOnly:v}=ap();return(t,g)=>{const y=w(e.resolveDynamicComponent("jx-icon"),Yn);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("scroll-view",{onClick:g[0]||(g[0]=(...t)=>e.unref(m)&&e.unref(m)(...t)),"scroll-y":"",style:e.normalizeStyle({height:e.unref(r)?"calc(100vh - 510rpx)":"calc(100vh - 110rpx)"}),"scroll-with-animation":"","scroll-into-view":e.unref(n)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createBlock(rp,{id:"msg"+n,item:t,key:n},null,8,["id","item"])):e.createCommentVNode("",!0)],64))),256))],12,["scroll-into-view"]),e.createElementVNode("view",{class:"chat-input-bar"},[e.createElementVNode("view",{class:"xc-icon",onClick:g[1]||(g[1]=(...t)=>e.unref(u)&&e.unref(u)(...t))},[e.createVNode(y,{icon:"xiangce",size:55,color:"#888888"})]),e.createElementVNode("view",{class:"chat-input-root",onClick:g[6]||(g[6]=(...t)=>e.unref(v)&&e.unref(v)(...t))},[e.createElementVNode("editor",{id:"editor",class:"ql-container","read-only":e.unref(h),placeholder:"请输入内容...",onReady:g[2]||(g[2]=(...t)=>e.unref(i)&&e.unref(i)(...t)),onInput:g[3]||(g[3]=(...t)=>e.unref(s)&&e.unref(s)(...t)),onBlur:g[4]||(g[4]=(...t)=>e.unref(l)&&e.unref(l)(...t)),onFocus:g[5]||(g[5]=(...t)=>e.unref(c)&&e.unref(c)(...t))},null,40,["read-only","placeholder"])]),e.createElementVNode("view",{class:"chat-emoji-border",onTouchend:g[7]||(g[7]=e.withModifiers((...t)=>e.unref(d)&&e.unref(d)(...t),["prevent"]))},[e.createElementVNode("image",{class:"chat-emoji",src:"https://image.jxc4.com/image/0465edd3e027eab221c3d37ee7a063f9.png",alt:""})],32),e.createElementVNode("view",{class:"chat-input-send",onClick:g[8]||(g[8]=(...t)=>e.unref(f)&&e.unref(f)(...t))},[e.createElementVNode("text",{class:"chat-input-send-text"},"发送")])]),e.createElementVNode("view",{class:"emoji-select",style:e.normalizeStyle({height:e.unref(r)?"400rpx":"0rpx"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(en),(t,n)=>(e.openBlock(),e.createElementBlock("view",{key:n,class:"emoji-border",onTouchend:e.withModifiers(n=>e.unref(p)(t),["prevent"])},[e.createElementVNode("view",{class:e.normalizeClass(["emoji-"+t.symbol,"emoji-display"])},null,2)],40,["onTouchend"]))),128))],4)],64)}}}),[["__scopeId","data-v-b366b66f"]]);__definePage("pages/merchant/index",ga),__definePage("pages/goods-manager/main",Sr),__definePage("pages/order-manager/main",zr),__definePage("pages/message/index",Rc),__definePage("subPages/login/addAuth/addAuth",qc),__definePage("subPages/login/index",tu),__definePage("subPages/login/bindSNS/bindSNS",ou),__definePage("subPages/login/wxLogin/wxLogin",iu),__definePage("subPages/agreement/jxcs",su),__definePage("subPages/agreement/updateVersion",lu),__definePage("subPages/switchStore/switchStore",du),__definePage("subPages/orderChild/getPhone/getPhone",mu),__definePage("subPages/orderChild/orderDetail/orderDetail",Cu),__definePage("subPages/orderChild/deliverManager/deliverManager",Du),__definePage("subPages/orderChild/afterSalesOrderDetail/afterSalesOrderDetail",Bu),__definePage("subPages/orderChild/createAfterSales/createAfterSales",Pu),__definePage("subPages/orderChild/seeMap/seeMap",Au),__definePage("subPages/orderChild/complaint/complaint",Mu),__definePage("subPages/merchantChild/helpCenter/helpCenter",Lu),__definePage("subPages/merchantChild/orderRealTime/orderRealTime",Fu),__definePage("subPages/merchantChild/orderRealTimeJxgy/orderRealTimeJxgy",$u),__definePage("subPages/merchantChild/platformM/platformM",Ru),__definePage("subPages/merchantChild/modifyPrice/modifyPrice",Hu),__definePage("subPages/merchantChild/bill/bill",Gu),__definePage("subPages/merchantChild/billDetaile/billDetaile",Wu),__definePage("subPages/merchantChild/evaluateM/evaluateM",Ku),__definePage("subPages/merchantChild/storeScore/storeScore",Yu),__definePage("subPages/merchantChild/storeScoreDetaile/storeScoreDetaile",Zu),__definePage("subPages/merchantChild/waitGoods/waitGoods",Qu),__definePage("subPages/merchantChild/waitGoodsDetaile/waitGoodsDetaile",od),__definePage("subPages/merchantChild/shareStore/shareStore",_d),__definePage("subPages/merchantChild/enterGroupChat/enterGroupChat",Ed),__definePage("subPages/merchantChild/message/message",Id),__definePage("subPages/merchantChild/messageDetail/messageDetail",Vd),__definePage("subPages/merchantChild/activity/activity",Bd),__definePage("subPages/merchantChild/setUp/setUp",Pd),__definePage("subPages/merchantChild/printerSetUp/printerSetUp",Od),__definePage("subPages/merchantChild/businessLicense/businessLicense",Fd),__definePage("subPages/merchantChild/backstageApp/backstageApp",Ud),__definePage("subPages/merchantChild/useInfo/useInfo",$d),__definePage("subPages/merchantChild/payeeInfo/payeeInfo",Rd),__definePage("subPages/merchantChild/invoice/invoice",Hd),__definePage("subPages/merchantChild/accountBalance/accountBalance",qd),__definePage("subPages/merchantChild/setNotice/setNotice",Gd),__definePage("subPages/merchantChild/setBusinessTime/setBusinessTime",Um),__definePage("subPages/merchantChild/setBusinessStatus/setBusinessStatus",Rm),__definePage("subPages/merchantChild/setInvoiceEB/setInvoiceEB",Hm),__definePage("subPages/merchantChild/platformDetail/index",Gm),__definePage("subPages/shoppingChild/createGoods/createGoods",tp),__definePage("subPages/messageChild/msgChat/msgChat",ip);const sp={getLink(e){let t="/components/dialog/dialogCom";if(e){let n="";for(let t in e)n+=`&${t}=${e[t]}`;n&&(t+=`?${n.substr(1)}`)}return t},dialog(e={},t){uni.navigateTo({url:this.getLink(e),success(e){uni.$off("jx_dialog"),uni.$on("jx_dialog",e=>{t&&t(e)})}})},alert(e={},t,n){let o=Object.assign({type:"alert",isCloseBtn:"0",isMaskClose:"0"},e);this.dialog(o,e=>{"confirm"==e?t&&t():n&&n()})},confirm(e={},t,n){let o=Object.assign({type:"confirm",isCloseBtn:"0",isMaskClose:"0"},e);this.dialog(o,e=>{"confirm"==e?t&&t():"cancel"==e&&n&&n()})}},lp={alert(e){"android"==uni.getSystemInfoSync().platform?sp.alert({content:e.content,title:e.title,confirmText:e.confirmText||"确定",isReturn:e.isReturn||0},e.success):uni.showModal({title:e.title,content:e.content,confirmText:e.confirmText||"确定",showCancel:!1,confirmColor:"#51b535",success:e.success})},confirm(e){"android"==uni.getSystemInfoSync().platform?sp.confirm({content:e.content,title:e.title,confirmText:e.confirmText||"确定",cancelText:e.cancelText||"取消",isReturn:e.isReturn||0},e.success,e.fail):uni.showModal({content:e.content,title:e.title,confirmText:e.confirmText||"确定",cancelText:e.cancelText||"取消",confirmColor:"#51b535",success:t=>{t.confirm?e.success&&e.success():t.cancel&&e.fail&&e.fail()},fail:e=>{k("log","at components/dialog/dialogUtil.ts:56",e,"自定义弹窗发生错误")}})}};function cp(){const e=new Ut,{setPrinterStatus:t}=tn(),{bluetoothPrinter:n,orderDetail:o}=aa();let a=null;function r(e){switch(e){case"京东到家":return 0;case"美团外卖":return 1;case"饿了么":return 2;case"饿百新零售":return 3;case"京东商城":return 5;case"京西菜市":return 9;case"微盟":return 11;case"抖音小时购":return 14;case"淘鲜达":return 16;default:return-1}}x(async()=>{f("deviceName")&&(a=setTimeout(async()=>{await e.reconnect(),clearTimeout(a)},1e3))});let i=[];let s=!1;const l=e=>{if(k("log","at App.ts:246",s,"isWait",e),!s&&e){const t=uni.createInnerAudioContext();t.src=e,t.volume=1,s=!0,t.play(),t.onEnded(()=>{s=!1,i.shift(),i.length>0&&l(`/static/audio/${i[0].msg_type}.mp3`)})}};let c=null;return{SystemInfo:async function(){uni.getSystemInfo({success(e){h("brand",e.brand||"pc"),qn.commit("serveInfo/setSystemInfo",JSON.stringify(e))}})},onNetWorkStatusChange:function(){uni.onNetworkStatusChange(e=>{0==e.isConnected?uni.createPushMessage({title:"网络提示",content:"网络被断开,请检查网络设置"}):plus.push.clear(),qn.commit("serveInfo/setIsNetWorkS",e.isConnected)})},appKeepAlive:function(){let e=uni.getSystemInfoSync();switch(e.platform){case"android":if(y("J-FrontService").startFrontService({title:"京西菜市",content:"京西菜市正在运行"}),"oppo"==e.brand||"oneplus"==e.brand||"pacm00"==e.brand){const e=y("DCloud-PushSound");e.setCustomPushChannel({soundName:"neworder",channelId:"10110",channelDesc:"订单类通知提醒",enableLights:!0,enableVibration:!0,importance:4,lockscreenVisibility:1}),e.setCustomPushChannel({soundName:"msg",channelId:"10111",channelDesc:"顾客IM信息提示",enableLights:!0,enableVibration:!0,importance:4,lockscreenVisibility:1})}case"ios":k("log","at App.ts:102","iOS不支持此功能");break;case"harmonyos":k("log","at App.ts:105","harmonyos不支持此功能")}},listenMsg:function(){plus.push.getClientInfoAsync(e=>{let t=e.clientid;h("cid",t)},()=>{}),uni.onPushMessage(e=>{if("receive"==e.type){let t=e.data.payload;if(t.store_title==f("storeName")&&i.push(t),"newOrder"==t.msg_type){let e=f("commitBTDevCharact");Gt.notifyBLEState(e.deviceId,e.serviceId,e.uuid).then(e=>{if(12==e){if(t.store_title!=f("storeName"))return;n(t.vendor_order_id)}})}if(t.store_title!=f("storeName"))return;if("newImMsg"==t.msg_type?(qn.commit("storeInfo/setImMessage",t.context),uni.createPushMessage({title:t.store_title,content:"有新的顾客信息,请及时查看",icon:"./static/image/global/message.png",payload:{page:"/pages/message/index",storeID:t.store_id,storeName:t.store_title,type:"message"}}),uni.showTabBarRedDot({index:2})):(qn.commit("serveInfo/setUpdateOrder",Date.now()),uni.createPushMessage({title:t.store_title,content:`${t.context}(${t.vendor_name}#${t.order_sqs}号订单)`,icon:"./static/image/global/newOrder.png",payload:{page:"/subPages/orderChild/orderDetail/orderDetail",vendorOrderID:""+t.vendor_order_id,vendorID:r(t.vendor_name),type:"order"}})),1===+f("defaultOrderReminder")||""===f("defaultOrderReminder")){let e=`/static/audio/${t.msg_type}.mp3`;l(e)}}if("click"==e.type){let t=e.data.payload;"order"===t.type?o(t.vendorOrderID,t.vendorID):t.storeID&&(h("storeID",t.storeID),h("storeName",t.storeName),h("storeMessge","message"),uni.switchTab({url:t.page}))}})},onPrinterChange:async function(){f("deviceName")&&(t(),c=setTimeout(async()=>{await e.reconnect(),clearTimeout(c)},1e3))}}}function up(e){uni.navigateTo({url:`/components/globalAlert/globalAlert?data=${JSON.stringify(e.data)}`,success(t){uni.$off("jx_dialog"),uni.$on("jx_dialog",()=>{e.fn&&e.fn(e.data)})}})}const dp=e.defineComponent({__name:"App",setup(e){cp();const{watchVersion:t}=tn(),{SystemInfo:n,onNetWorkStatusChange:o,onPrinterChange:a}=cp();return N(()=>{n(),uni.jxAlert=lp.alert,uni.jxConfirm=lp.confirm,o(),a(),uni.globalAlert=up,t(e=>{e&&uni.globalAlert({data:{type:3}})}),f("terrace")||h("terrace","jxcs"),qn.dispatch("serveInfo/get_services")}),x(()=>{k("log","at App.vue:52","App Show")}),S(()=>{k("log","at App.vue:55","App Hide")}),()=>{}}});const{app:mp,Vuex:pp,Pinia:fp}={app:e.createVueApp(dp)};uni.Vuex=pp,uni.Pinia=fp,mp.provide("__globalStyles",__uniConfig.styles),mp._component.mpType="app",mp._component.render=()=>{},mp.mount("#app")}(Vue,uni.VueShared);
|