1import{getAddressBookSaveInfo as F,isAddressDifferent as N}from"./DRS1yyxY.js";import{accAdd as S}from"./4GUHPYD4.js";import E from"./C7p8Hu9P.js";import{usePickTimeService as R}from"./Dj4Ymrv-.js";import{useProducts as x}from"./DDw20Y1v.js";import{u as M}from"./ClFr-QFI.js";import{u as v}from"./BewIruy6.js";import{q as C,y as I,s as L}from"./DRCXwoMJ.js";import{u as U}from"./CwHw_Aqh.js";import{u as D}from"./CToaizCp.js";import"./B76jYBZg.js";function K(){const i=M(),d=v(),p=C(),f=U(),{loadProducts:c}=x(),{senderReceivers:s,validateLineUnobstructed:e}=E(),{getPickTimeList:r}=R(),{checkRealName:m}=O(),y=I({couponPrice:null,discountFee:null,originalTotalPrice:null,totalPrice:null});L(s,async(t,l)=>{const n=t?t.sender||{}:{},a=l?l.sender||{}:{};N(n,a)&&r(t),n.phoneNumber!==a.phoneNumber&&m(n.phoneNumber),P(t)});function P(t){if(!t||!t.receivers||t.receivers.length===0){Object.assign(y,{couponPrice:null,discountFee:null,originalTotalPrice:null,totalPrice:null});return}let l=0,n=0,a=0,g=0;t.receivers.forEach(T=>{if(T&&T.activeProduct){const{couponPrice:k,discountFee:A,originalTotalPrice:w,totalPrice:h}=T.activeProduct;k&&(l=S(l,k)),A&&(n=S(n,A)),w?a=S(a,w):h&&(a=S(a,h)),h&&(g=S(g,h))}}),Object.assign(y,{couponPrice:l,discountFee:n,originalTotalPrice:a,totalPrice:g})}function b(t,l){if(l.isSaveSender){const n=F(t.sender);n.addressType=1;try{f.createAddress(n)}catch(a){}}l.isSaveReceivers&&t.receivers.forEach(n=>{const a=F(n);a.addressType=2;try{f.createAddress(a)}catch(g){}})}async function o(){if(p.mobile)try{const t=await d.checkRealNameByMobile({mobile:p.mobile});d.setIsAccountRealName(!!t)}catch(t){}}async function u(){try{return await i.getApolloConfig({keys:["mobileReg","isShowSpring","springMsg","springUrl","cityForbiddenGoods"]})}catch(t){return null}}return{loadProducts:c,saveToAddressBook:b,checkAccountRealName:o,getPickTimeList:r,validateLineUnobstructed:e,getApolloConfig:u,totalPriceObj:y}}function O(){const i=v();async function d(c){if(c)try{const s=await i.checkRealNameByMobile({mobile:c});i.setIsShowRealNameTip(!0),i.setIsSenderRealName(!!s)}catch(s){}}async function p(c){try{const s=await i.verifyVirtualMobile({virtualMobileList:[c]});return!!(s&&s[0]&&s[0].isVirtualMobile)}catch(s){return!1}}async function f(c){if(!c)return{isForbidden:!1,data:[]};const s=c.map(e=>({goodsCode:null,goodsName:e}));try{const e=await i.getGoodsDetail({goodsDetailList:s});if(e&&e.length){const r=e.map(m=>m.goodsConsignType);return{isForbidden:r.includes(1),data:r}}else return{isForbidden:!1,data:[]}}catch(e){return{isForbidden:!1,data:[]}}}return{checkRealName:d,verifyVirtualMobile:p,checkGoodsForbidden:f}}function Q(){const i=v(),d=D();async function p(e){const r=await f();return!r||!r.uploadToken||!r.appId?{success:!1,error:new Error("è·åä¸ä¼ token失败")}:c(e,r)}async function f(){try{const e=await i.getZfsUploadToken({scene:"TOC_SYSTEM_SUPPORT"});return e||null}catch(e){return null}}async function c(e,r){const m=Date.parse(new Date)/1e3,y="".concat(parseInt(Math.random()*4e8,10)),P=d.sha1Fuc([r.uploadToken,m,y].sort().join("")).toUpperCase(),b=e.name.split("."),o=new FormData;o.append("ext",b.pop()),o.append("group","private"),o.append("appid",r.appId),o.append("signature",P),o.append("nonce",y),o.append("timestamp",m),o.append("upload_token",r.uploadToken),o.append("expires",720*3600),o.append("uploadfile",e);try{const u=await i.uploadExcel(o);return u&&u.status&&u.result?await s(u.result):{success:!1,error:new Error("ä¸ä¼ Excelæä»¶å¤±è´¥")}}catch(u){return{success:!1,error:u}}}async function s(e){try{const r=await i.analysisExcelAddress({dfsFileName:e.fileName});return r?{success:!0,data:r}:{success:!1,error:new Error("æªè§£æå°å°åä¿¡æ¯")}}catch(r){return{success:!1,error:r}}}return{uploadAnalysisExcel:p}}export{K as default,Q as useAnalysisExcelService,O as useSendService};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.