PageSourceSearch

https://seekmake.com/public/chunk-3CHEXXYZ.js

js seekmake.com collected 2026-09-24 19:03:09 UTC 22,196 bytes, 1 lines download raw bytes

1import{a as C,i as U}from"./chunk-W3IPEXVC.js";import{a as D,b as Nt}from"./chunk-5UCL3E2T.js";import{c as _}from"./chunk-65LYDK6C.js";import{a as R}from"./chunk-7WSQ5KYK.js";import{A as st,Aa as ft,E as nt,G as T,H as it,I as G,J as ot,Ta as N,U as ct,V as ut,_ as at,d as Z,ea as H,i as u,j as tt,k as y,ka as p,l as O,la as lt,ma as ht,n as $,o as z,q as et,r as E,t as g,v as rt,va as dt,ya as pt}from"./chunk-MKXFTTAK.js";import{i as A}from"./chunk-6SVRVETT.js";import{Ba as Q}from"./chunk-7ZXJIYIL.js";import{$ as w,A as At,Aa as j,G as F,Ia as vt,Jd as bt,K as M,Ka as x,Kd as W,Ld as Et,P as Ct,Ua as v,_a as Ut,ba as yt,d as mt,da as It,fa as I,h as L,i as gt,ia as J,k as q,ma as f,o as m,p as St,sa as h,t as B,ta as a}from"./chunk-BALSBZOM.js";import{a as P,d as V}from"./chunk-TWZW5B45.js";function Y(s){s||(j(Y),s=a(x));let c=new mt(t=>s.onDestroy(t.next.bind(t)));return t=>t.pipe(It(c))}function Mt(s,c){!c?.injector&&j(Mt);let t=c?.injector??a(vt),e=new gt(1),r=Et(()=>{let n;try{n=s()}catch(i){W(()=>e.error(i));return}W(()=>e.next(n))},{injector:t,manualCleanup:!0});return t.get(x).onDestroy(()=>{r.destroy(),e.complete()}),e.asObservable()}function K(s,c){let t=!c?.manualCleanup;t&&!c?.injector&&j(K);let e=t?c?.injector?.get(x)??a(x):null,r=xt(c?.equal),n;c?.requireSync?n=v({kind:0},{equal:r}):n=v({kind:1,value:c?.initialValue},{equal:r});let i=s.subscribe({next:o=>n.set({kind:1,value:o}),error:o=>{if(c?.rejectErrors)throw o;n.set({kind:2,error:o})}});if(c?.requireSync&&n().kind===0)throw new J(601,!1);return e?.onDestroy(i.unsubscribe.bind(i)),bt(()=>{let o=n();switch(o.kind){case 1:return o.value;case 2:throw o.error;case 0:throw new J(601,!1)}},{equal:c?.equal})}function xt(s=Object.is){return(c,t)=>c.kind===1&&t.kind===1&&s(c.value,t.value)}var Rt=(()=>{class s{constructor(t,e){this.browserStorageService=t,this.http=e,this.env=a(C)}setUser(t){this.user=t}syncUser(t){t&&(this.user=t,this.browserStorageService.localStorage.setItem("user",JSON.stringify(t)))}getUserId(){return this.user?._id?this.user?._id:JSON.parse(this.browserStorageService.localStorage.getItem("user"))._id||""}getUserById(t){let e=t||this.getUserId();return this.http.get(y+T+p+"/"+e).pipe(I(r=>{console.log("tapping: ",r),this.syncUser(r)}))}getDailyLimitCount(){return this.http.get(`${y}/user/daily-limit/count`)}incrementDailyLimitCount(){return this.http.post(`${y}/user/daily-limit/increment`,{})}static{this.\u0275fac=function(e){return new(e||s)(h(R),h(A))}}static{this.\u0275prov=f({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var Tt=(()=>{class s{constructor(t,e){this.userService=t,this.http=e,this.env=a(C),this.currentAccountId="",this.statusStateFetchedAt=0}setCurrentAccountId(t){this.currentAccountId=t}updateStatus(t){return this.update({status:t})}getBusiness(t=this.currentAccountId){let e=u+p+"/"+t;return this.http.get(e,{}).pipe(M(r=>m(null)))}getShippingMethods(t=this.currentAccountId){let e=u+lt+"/"+t;return this.http.get(e,{}).pipe(M(r=>m(null)))}getManufacturerInfo(){let t=this.userService.getUserId(),e=u+g+T+"/"+t+"/"+this.currentAccountId;return this.http.get(e,{}).pipe(I(r=>{this.userService.syncUser(r.data)}))}getManufacturerInfoById(t,e){let r=u+g+T+"/"+t+"/"+e;return this.http.get(r,{})}updateSocialMediaLinks(t,e){let r=u+g+p+ot+"/"+e;return this.http.put(r,t)}getStats(t={}){let e=u+g+p+it+"/"+this.currentAccountId;return this.http.get(e,{params:t})}getBusinessSourceStats(t,e={}){let r=u+g+"/business/source/stats/"+t;return this.http.get(r,{params:e})}getSubscriptionInvoices(t=1,e=10){let r=`${tt}${p}${nt}/${this.currentAccountId}?page=${t}&limit=${e}`;return this.http.get(r)}getDemands(t=1,e=20){let r=new URL(u+g+p+pt+ft+"/"+this.currentAccountId);return r.searchParams.append("pageSize",e.toString()),r.searchParams.append("page",t.toString()),r.searchParams.append("demandType","normal"),r.searchParams.append("demandType","express"),r.searchParams.append("isManufacturer","true"),r.searchParams.append("exceptTestDemands","true"),this.http.get(r.toString())}getAverage(t,e){return Math.ceil(t/(e||1))}responseText(t){return{d:"ACHIEVEMENTS.DAY",h:"ACHIEVEMENTS.HOUR",m:"ACHIEVEMENTS.MINUTE",s:"ACHIEVEMENTS.SECOND"}[t]||""}calculateAverage(t){if(!t||t.number<=0||t.day===0&&t.hour===0&&t.min===0&&t.sec===0)return`6 ${this.responseText("h")}`;let{number:e,total:r}=t,n=r/(e>0?e:1),i="",o=0;n>=24*60*60?(i="h",o=24):n>=60*60?(i="h",o=Math.ceil(n/(60*60))):n>=60?(i="m",o=Math.ceil(n/60)):(i="s",o=Math.ceil(n));let d=this.responseText(i);return`${o} ${d}`}update(t,e=!0){if(!this.userService.user)return m({});let r=this.userService.user._id,n=this.currentAccountId,i=u+g+"/"+r+"/"+n;return this.http.put(i,t).pipe(I(o=>{e&&this.userService.syncUser(o)}))}updateDemand(t,e){return this.http.put(u+E+"/"+t,e)}updateDemandWithOptions(t,e,r={}){return this.http.put(u+E+"/"+t,e,r)}updateDraft(t,e){return this.http.put(u+G+"/"+t,e)}getMachines(){let t=u+rt+p+at+"/"+this.currentAccountId;return this.http.get(t,{})}checkMaterials(t){let e=!1;for(let r of t)r.materials&&Array.isArray(r.materials)&&r.materials.length>0&&(e=!0);return e}getBusinesTax(t,e){let r=u+E+"/business/tax/"+t;return this.http.post(r,e).pipe(M(()=>m({amount:0,taxId:""})))}getBusinessClientDistance(t,e){let r=u+E+ht+"/"+t;return this.http.post(r,e)}getGuideInputFromStepsState(t){let e=[];(!t.hasProfilePic||!t.hasCoords)&&e.push("company"),t.hasMachines||e.push("machine"),t.hasMaterials||e.push("material"),t.hasGalleryPic||e.push("gallery");let r=[t.hasProfilePic,t.hasMaterials,t.hasGalleryPic];return{steps:this.formatStepsNotCompleteResponse(r),guide:e}}getStatusState(t){let e=`${u}${g}${st}/${t}`;return this.http.get(e)}static{this.STATUS_STATE_TTL_MS=6e4}getStatusStateCached(t){let e=Date.now()-this.statusStateFetchedAt<s.STATUS_STATE_TTL_MS;return this.statusState$&&this.statusStateBusinessId===t&&e?this.statusState$:(this.statusStateBusinessId=t,this.statusStateFetchedAt=Date.now(),this.statusState$=this.getStatusState(t).pipe(M(r=>(this.invalidateStatusState(),St(()=>r))),w({bufferSize:1,refCount:!1})),this.statusState$)}invalidateStatusState(){this.statusState$=void 0,this.statusStateBusinessId=void 0,this.statusStateFetchedAt=0}formatStepsNotCompleteResponse(t){return{nbNotComplete:t.reduce((r,n)=>r+(n?0:1),0),stepsNotComplete:t}}removeQueryParams(t){try{let e=new URL(t);return e.search="",e.toString()}catch(e){return console.error("Invalid URL:",e),t}}getBusinessFileAccess(t){let{fileLink:e,conversationId:r}=t;if(!e)return m([{url:""}]);let n=e?.includes(`/${_()?.PUBLIC_STORAGE_SECURE_CONTAINER_NAME||this.env.getConfig().PUBLIC_STORAGE_SECURE_CONTAINER_NAME}/`);if(e&&(Pt(e)&&!Ot(e)||!n))return m([{url:e||""}]);let i=new URL(u+p+"/access-storage");return e&&i.searchParams.append("fileLink",this.removeQueryParams(e)),r&&i.searchParams.append("conversationId",r),this.http.get(i.toString())}refreshDraftFilesAccess(t){return this.http.get(u+G+"/refresh-file-access/"+t)}getFileAccess(t){let{fileLink:e,demandId:r}=t;if(!e&&!r)return m([{url:""}]);let n=e?.includes(`/${_()?.PUBLIC_STORAGE_SECURE_CONTAINER_NAME||this.env.getConfig().PUBLIC_STORAGE_SECURE_CONTAINER_NAME}/`);if(e&&(Pt(e)&&!Ot(e)||!n))return m([{url:e||""}]);let i=new URL(u+E+"/file/access-file/");return e&&i.searchParams.append("filePath",this.removeQueryParams(e)),r&&i.searchParams.append("demandId",r),this.http.get(i.toString())}updateNetworkVisibility(t,e){let r=`${u}${g}/network-visibility/${t}`;return this.http.patch(r,{isVisibleOnNetwork:e})}sendFollowUp(t,e){let r=`${u}/draft/follow-up/${t}`;return this.http.post(r,e)}static{this.\u0275fac=function(e){return new(e||s)(h(Rt),h(A))}}static{this.\u0275prov=f({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})(),kt=["sig","Signature","X-Amz-Signature"];function Pt(s){try{let c=new URL(s).searchParams;return kt.some(t=>!!c.get(t))}catch{return!1}}function Ot(s){try{let c=new URL(s),t=$t(c),e;if(t==="azure"){let r=c.searchParams.get("se");if(!r)return!1;
1e=new Date(r)}else if(t==="google"){let r=c.searchParams.get("Expires");if(!r)return!1;e=new Date(parseInt(r,10)*1e3)}else return!1;return isNaN(e.getTime())?(console.error("[isFileExpired] Invalid expiry date for:",s),!1):new Date>e}catch{return console.error("[isFileExpired] Failed to parse URL:",s),!1}}function $t(s){return s.searchParams.has("sig")&&s.searchParams.has("sv")?"azure":s.searchParams.has("Signature")&&s.searchParams.has("Expires")?"google":"unknown"}var _t=(()=>{class s{constructor(t,e){this.browserStorageService=t,this.http=e,this.env=a(C),this.countriesRequest$=null}orderCountries(t,e){return t.long_name>e.long_name?1:t.long_name<e.long_name?-1:0}getCountries(){let t=this.browserStorageService.localStorage.getItem("countries"),e=null;try{e=t?JSON.parse(t):null}catch{e=null}let r=e?.[0]?.continent,n=e?.[0]?.continent_code,i=o=>o.sort((d,b)=>d.long_name.localeCompare(b.long_name));if(e&&r&&n)return m(i(e));if(!this.countriesRequest$){let o=O+ct+ut;this.countriesRequest$=this.http.get(o).pipe(I(d=>{let b=i(d);this.browserStorageService.localStorage.setItem("countries",JSON.stringify(b))}),B(d=>i(d)),w({bufferSize:1,refCount:!1}))}return this.countriesRequest$}uploadOneFile(t,e){let r=new FormData;r.append("file",t);let n=t.size>2e5;return this.http.post(O+$+z,r,{params:P({setOptimized:n},e)})}uploadMultipleFiles(t,e){let r=new FormData;t.forEach(i=>{r.append("files",i)});let n=t.some(i=>i.size>2e5);return this.http.post(O+$+et,r,{params:P({setOptimized:n},e)})}fileUpload(t,e){return this.http.post(O+$+z,t,{params:P({},e)})}convertToPdf(t,e){let r=`data:application/pdf;base64,${t}`,n=document.createElement("a");n.href=r,n.download=e,n.click()}static{this.\u0275fac=function(e){return new(e||s)(h(R),h(A))}}static{this.\u0275prov=f({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var Lt=(()=>{class s{constructor(){this.platformId=a(Ut),Q(this.platformId)?(this.visibilityState$=At(document,"visibilitychange").pipe(yt(null),B(()=>document.visibilityState==="visible"),w({bufferSize:1,refCount:!0})),this.tabVisible$=this.visibilityState$.pipe(F(t=>t),B(()=>{}))):(this.visibilityState$=q,this.tabVisible$=q)}isTabVisible(){return Q(this.platformId)?document.visibilityState==="visible":!1}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=f({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var S=function(s){return s.MANUFACTURER="MANUFACTURER",s.CURRENT_ACCOUNT="CURRENT_ACCOUNT",s.SETTINGS_POPUP="SETTINGS_POPUP",s.LOCATION="LOCATION",s}(S||{}),Bt=(()=>{class s{constructor(){this.msUtilService=a(_t),this.currentCountry=v(null),this.lastCountryUpdatedBy=v(null),this.countryList=v([]),this.pendingCountryName=null,this.priorityOrder=[S.CURRENT_ACCOUNT,S.SETTINGS_POPUP,S.MANUFACTURER,S.LOCATION],Promise.resolve().then(()=>this.getCountries())}get country(){return this.currentCountry.asReadonly()}setCountry(t,e){let r=this.priorityOrder.indexOf(this.lastCountryUpdatedBy()),n=this.priorityOrder.indexOf(e);(r===-1||n<=r)&&(this.pendingCountryName=null,this.currentCountry.set(t),this.lastCountryUpdatedBy.set(e))}setCountryByName(t,e){if(!t)return;let r=this.priorityOrder.indexOf(this.lastCountryUpdatedBy()),n=this.priorityOrder.indexOf(e);(r===-1||n<=r)&&(this.lastCountryUpdatedBy.set(e),this.pendingCountryName=t,this.resolvePendingCountry())}resolvePendingCountry(){if(!this.pendingCountryName)return;let t=this.countryList().find(e=>e.long_name==this.pendingCountryName);t&&(this.currentCountry.set(t),this.pendingCountryName=null)}getCountries(){this.msUtilService.getCountries().subscribe({next:t=>{this.countryList.set(t),this.resolvePendingCountry()}})}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=f({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var l=function(s){return s.PERSONAL="PERSONAL",s.BUSINESS="BUSINESS",s}(l||{}),Ye=(()=>{class s{constructor(t,e,r){this.manufacturerService=t,this.http=e,this.browserStorageService=r,this.env=a(C),this.visibilityService=a(Lt),this.userAccounts$=new L(null),this.currentAccount$=new L(null),this.haveBusiness$=new L(!1),this.currentStateService=a(Bt),this._init$=new L(this.computeInitState()),this.initialized$=this._init$.asObservable(),this.nullAccount={_id:"",name:"",photoUrl:"./assets/images/user.svg",photoUrlOptimized:"",type:l.PERSONAL,accountLink:U()+"/dashboard/client/",data:{},permissions:Nt},this.currentAccountSignal=K(this.currentAccount$.pipe(F(n=>n!==null)),{initialValue:this.nullAccount}),this.visibilityService.tabVisible$.pipe(Y(),Ct(1e3)).subscribe(()=>{console.log("### SESSION ### Tab is visible! Restarting data polling..."),this.checkAndUpdateStateFromStorage()}),this.inspectWebsiteDomain(),setTimeout(()=>{this.inspectWebsiteDomain()},5e3),this.init()}inspectWebsiteDomain(){console.groupCollapsed("%c[PUBLIC_APP_URL INSPECTION]","color:#e53935;font-weight:bold"),console.log("FROM this.env.getConfig():",this.env.getConfig()?.PUBLIC_APP_URL),console.log("getWebsiteDomain:",U()),console.log("FROM getCachedEnv():",_()?.PUBLIC_APP_URL),console.log("FROM APP_CONFIG_ENV:",Z?.PUBLIC_APP_URL),console.groupEnd()}isEmbedMode(){return new URLSearchParams(window.location.search).get("isEmbed")==="true"}checkAndUpdateStateFromStorage(){let t=this.getLocalConfig(),e=this.currentAccount?._id;if(!t&&e){if(console.groupCollapsed("%c[NAV] window.location.reload() \u2014 checkAndUpdateStateFromStorage","color:#2e7d32;font-weight:bold"),console.log("Trigger: localConfig is null/undefined but currentAppAccountId exists"),console.log("currentAppAccountId:",e),console.log("localConfig:",t),console.log("Caller stack:",new Error().stack),console.groupEnd(),this.isEmbedMode()){console.log("[EMBED] Skipping reload \u2014 isEmbed=true detected in URL");return}window.location.reload();return}if(t&&e!==t.currentAccount._id){if(console.groupCollapsed("%c[NAV] switchToAccount() \u2014 checkAndUpdateStateFromStorage","color:#2e7d32;font-weight:bold"),console.log("Trigger: currentAppAccountId does not match localConfig.currentAccount._id"),console.log("currentAppAccountId (in-memory):",e),console.log("localConfig.currentAccount._id (storage):",t.currentAccount._id),console.log("localConfig.currentAccount:",t.currentAccount),console.log("Caller stack:",new Error().stack),console.groupEnd(),!this.getAccountById(t.currentAccount._id)){console.warn("[NAV] Skipping switchToAccount \u2014 stored account does not belong to this session:",t.currentAccount._id);return}this.switchToAccount(t.currentAccount._id);return}}init(){let t=JSON.parse(this.browserStorageService.localStorage.getItem("user"));if(t){let e=t.businessAccounts.every(r=>typeof r!="string");this.haveBusiness=Array.from(t?.businessAccounts||[]).length>0,e?(this.userAccounts=this.extractAccountsFromUser(t),this.currentAccount=this.getCurrenctAccount()):(this.userAccounts=this.extractAccountsFromBusinessIds(t),this.currentAccount=this.getBusinessAccount()),this.defaultAccount=this.getDefaultUserAccount()}else{let e=this.getLocalConfig();this.userAccounts=e?.userAccounts||[],this.currentAccount=e?.currentAccount||this.nullAccount,this.defaultAccount=this.getDefaultUserAccount(),this.haveBusiness=e?.haveBusiness||!1}this.currentStateService.setCountryByName(this.currentAccount.data.country,S.CURRENT_ACCOUNT),this.emitNewValues(),this.setLocalConfig(),this.manufacturerService.setCurrentAccountId(this.getCurrentAccountID()),this._init$.next(this.computeInitState())}computeInitState(){let t=JSON.parse(this.browserStorageService.localStorage.getItem("user"));return!t||!Array.isArray(t.businessAccounts)?!1:t.businessAccounts.every(e=>typeof e!="string")}refreshInitState(){this._init$.next(this.computeInitState())}emitNewValues(){this.userAccounts$.next(this.userAccounts),this.currentAccount$.next(this.currentAccount),this.userAccounts$.next(this.userAccounts)}syncAccountsWithLocalUser(){let t=JSON.parse(this.browserStorageService.localStorage.getItem("user"));t&&(this.haveBusiness=Array.from(t?.businessAccounts||[]).length>0,this.userAccounts=this.extractAccountsFromUser(t),this.currentAccount=this.getCurrenctAccount(),this.currentStateService.setCountryByName(this.currentAccount.data.country,S.CURRENT_ACCOUNT),this.defaultAccount=this.getDefaultUserAccount(),this.emitNewValues(),this.setLocalConfig(),this.manufacturerService.setCurrentAccountId(this.getCurrentAccountID()))}setAccount(t,e={withRedirection:!0,redirectionRoute:"",overrideRedirection:!1}){let r=this.currentAccount.type!==t.type;if(this.currentAccount=t,this.currentStateService.setCountryByName(this.currentAccount.data.country,S.CURRENT_ACCOUNT),this.setLocalConfig(),this.emitNewValues(),e?.withRedirection||r&&!e?.overrideRedirection){let n=this.currentAccount.accountLink+(e.redirectionRoute||"");if(console.groupCollapsed("%c[NAV] window.location.href redirect \u2014 setAccount()","color:#2e7d32;font-weight:bold"),console.log("Trigger condition \u2014 options.withRedirection:",e?.withRedirection),console.log("Trigger condition \u2014 redirectionIsNeeded:",r),console.log("Trigger condition \u2014 options.overrideRedirection:",e?.overrideRedirection),console.log("Previous account type:",this.currentAccount.type,"| New account type:",t.type),console.log("options received:",e),console.log("Target account:",t),console.log("Redirecting to:",n),console.log("Caller stack:",new Error().stack),console.groupEnd(),this.isEmbedMode()){console.log("[NAV] Skipping redirect \u2014 isEmbed=true detected in URL");return}window.location.href=n}}getAvalableAccounts(){return this.userAccounts}getCurrentAccount(){return this.currentAccount}getCurrentAccountData(){return this.currentAccount.data}setCurrentAccontStatusLocal(t){this.currentAccount.data.status=t}getCurrentAccountID(){return this.currentAccount._id}getPersonalAccount(){return this.userAccounts.find(t=>t.type===l.PERSONAL)}getBusinessAccount(){return this.userAccounts.find(t=>t.type===l.BUSINESS)}getDefaultUserAccount(){let t=JSON.parse(this.browserStorageService.localStorage.getItem("user"));if(!t)return this.nullAccount;let e=t?.defaultAccount,r=t?.defaultAccountType==="business"?l.BUSINESS:l.PERSONAL;return this.userAccounts.find(n=>n._id===e&&n.type===r)||this.nullAccount}switchToDefaultAccount(t){this.setAccount(this.defaultAccount,{withRedirection:t?.redirect??!0,redirectionRoute:t?.redirectionRoute||""})}switchToAccount(t){let e=this.getAccountById(t);if(!e){console.warn("[NAV] switchToAccount \u2014 unknown account:",t);return}this.setAccount(e)}getAccountById(t){return this.userAccounts.find(e=>e._id===t)}switchOtherAccount(){if(this.currentAccount?.type==l.BUSINESS){let t=this.getPersonalAccount();t&&this.setAccount(t)}else{let t=this?.userAccounts.find(e=>e.type===l.BUSINESS);t&&this.setAccount(t)}this.emitNewValues()}createBusinessAccountFromUser(t){let e=y+H+p+"/"+this.currentAccount?._id;return this.http.post(e,t?.country?t:{})}extractAccountsFromUser(t){let i=t,{businessAccounts:e}=i,r=V(i,["businessAccounts"]),n=[];return n.push({_id:r?._id||"",name:`${r.firstName} ${r.lastName}`,photoUrl:r?.photoUrl||"./assets/images/user.svg",photoUrlOptimized:r?.photoUrlOptimized||"",type:l.PERSONAL,accountLink:U()+"/dashboard/client/",data:r,permissions:[D.ADMIN]}
1),Array.from(e||[]).forEach(o=>{let d;o?.staff&&(d=o?.staff.find(b=>b?.userId?._id===r?._id)?.permission),n.push({_id:o?._id||"",name:`${o?.companyName||o.profileName}`,photoUrl:o?.photoUrl||"./assets/images/user.png",photoUrlOptimized:o?.photoUrlOptimized||"",type:l.BUSINESS,accountLink:U()+"/dashboard/manufacturer/",data:o,permissions:d||[]})}),n}getCurrenctAccount(){let t,e=this.getLocalConfig();if(e?.currentAccount)t=this.userAccounts.find(r=>r._id===e.currentAccount?._id&&r.type===e.currentAccount?.type),t||(t=this.getPersonalAccount());else{let r=window.location.href.includes("client");this.haveBusiness&&(t=this.userAccounts.find(n=>n.type===l.BUSINESS)),(r||!t)&&(t=this.getPersonalAccount())}return t}extractAccountsFromBusinessIds(t){let i=t,{businessAccounts:e}=i,r=V(i,["businessAccounts"]),n=[];return n.push({_id:r?._id||"",name:`${r.firstName} ${r.lastName}`,photoUrl:r?.photoUrl||"./assets/images/user.png",photoUrlOptimized:r?.photoUrlOptimized||"",type:l.PERSONAL,accountLink:U()+"/dashboard/client/",data:r,permissions:[D.ADMIN]}),Array.from(e||[]).forEach(o=>{let d=[];n.push({_id:o,name:"",photoUrl:"./assets/images/user.png",photoUrlOptimized:"",type:l.BUSINESS,accountLink:U()+"/dashboard/manufacturer/",data:{},permissions:d||[D.ADMIN]})}),console.log("extractAccountsFromUser",n),n}sendLangToBe(t){let e=this.getCurrenctAccount();if(!e)return;let r={id:e._id,lang:t,isBusiness:!1};e.type===l.BUSINESS&&(r.isBusiness=!0,r.id=e._id),this.http.post(y+H+dt,r).subscribe(n=>{})}getLocalConfig(){return JSON.parse(this.browserStorageService.localStorage.getItem("accountsManagement"))}setLocalConfig(t){let e=t||{userAccounts:this.userAccounts,currentAccount:this.currentAccount,haveBusiness:this.haveBusiness,deffaultAccount:this.defaultAccount};console.log("setting accountsManagement in localStorage: ",e),this.browserStorageService.localStorage.setItem("accountsManagement",JSON.stringify(e))}clearConfig(){this.browserStorageService.localStorage.removeItem("accountsManagement")}checkPermissions(t){return this.currentAccountisAdmin()||t.every(e=>this.currentAccount.permissions.includes(e))}checkSomePermissions(t){return this.currentAccountisAdmin()||t.some(e=>this.currentAccount.permissions.includes(e))}currentAccountisAdmin(){return this.currentAccount.permissions.includes(D.ADMIN)}static{this.\u0275fac=function(e){return new(e||s)(h(Tt),h(A),h(R))}}static{this.\u0275prov=f({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();function tr(s,c){let t=window?.navigator?.language||window.navigator.languages?.[0],e=t?.split("-")?.[0]||t,r=new URLSearchParams(window.location.search).get("lang"),n=window.location.host.split(".")[1],i=N[String(r).toLowerCase()]||N[String(s).toLowerCase()]||N[String(c).toLowerCase()]||N[String(n).toLowerCase()]||N[e?.toLowerCase()]||"en";return r?i:localStorage.getItem("lang")||i}export{Y as a,Mt as b,K as c,Rt as d,Tt as e,Pt as f,Ot as g,_t as h,S as i,Bt as j,l as k,Ye as l,tr as m};

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.