PageSourceSearch

https://flyttfabriken.vercel.app/_next/static/chunks/62991.0157150cc6c4c5ff.js

js flyttfabriken.vercel.app collected 2026-10-03 06:59:00 UTC 8,173 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[62991],{5917:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(71847).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},11010:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(71847).A)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},33700:(e,t,l)=>{function s(e){let t=String(e||"").trim();if(!t)return"";let l=t.replace(/[\s\-().]/g,"").replace(/\D/g,""),s=/^07\d{8}$/.test(l)?l:/^467\d{8}$/.test(l)?"0".concat(l.slice(2)):/^00467\d{8}$/.test(l)?"0".concat(l.slice(4)):null;return s?"".concat(s.slice(0,3),"-").concat(s.slice(3,6)," ").concat(s.slice(6,8)," ").concat(s.slice(8)):t}function n(e){let t=String(e||"").trim();if(!t)return"";let l=t.replace(/[\s\-().]/g,""),s=l.replace(/\D/g,"");return s?l.startsWith("+")?"+".concat(s):s.startsWith("00")?"+".concat(s.slice(2)):s.startsWith("46")?"+".concat(s):s.startsWith("07")?"+46".concat(s.slice(1)):s:t}l.d(t,{AO:()=>i,Vf:()=>s,tw:()=>n});let r=(e,t)=>{let l=e.slice(t);return/^\+\s*46[\s\-().]*7/.test(l)?11:/^0046[\s\-().]*7/.test(l)?13:/^46[\s\-().]*7/.test(l)?11:/^0[\s\-().]*7/.test(l)?10:null},a=e=>{let t=e.trim().replace(/^[,;/|\s]+|[,;/|\s]+$/g,"");return{raw:t,display:s(t),href:n(t)}};function i(e){let t=String(e||"").trim();if(!t)return[];let l=[],s=0;for(;s<t.length;){let e=r(t,s);if(!e){s+=1;continue}let n="",a=s;for(let l=s;l<t.length;l+=1){let s=t[l];if(/\d/.test(s))n+=s;else if("+"!==s&&!/[\s\-().]/.test(s))break;if(a=l+1,n.length===e)break}if(n.length===e){l.push({start:s,end:a,raw:t.slice(s,a)}),s=a;continue}s+=1}if(l.length>1)return l.map(e=>a(e.raw));if(1===l.length){let e=l[0];if(!"".concat(t.slice(0,e.start)," ").concat(t.slice(e.end)).replace(/[,;/|\s-]+/g,"").trim())return[a(e.raw)]}return[a(t)]}},62991:(e,t,l)=>{l.r(t),l.d(t,{CustomerViewModal:()=>m});var s=l(95155),n=l(89030),r=l(33700),a=l(5917),i=l(65229),c=l(11010),o=l(12115),d=l(47650),u=l(70064);let m=e=>{var t,l,m,x,f,h,p,y,v,g,b,j,N,w,k,C,_,A,S,M;let{customer:D,isOpen:P,onClose:T,onEdit:$}=e,{dictionary:z}=(0,n.o)(),E=(0,u.k)(),W=P&&E,[O,F]=(0,o.useState)(null),H=(0,r.AO)((null==D?void 0:D.phone)||""),V=!!String((null==D?void 0:D.company_name)||(null==D?void 0:D.org_number)||"").trim();if((0,o.useEffect)(()=>{if(!W)return;let e=document.documentElement,t=document.body,l=window.scrollY,s=e.style.overflow,n=t.style.overflow,r=t.style.position,a=t.style.top,i=t.style.width;return e.style.overflow="hidden",t.style.overflow="hidden",t.style.position="fixed",t.style.top="-".concat(l,"px"),t.style.width="100%",()=>{e.style.overflow=s,t.style.overflow=n,t.style.position=r,t.style.top=a,t.style.width=i,window.scrollTo(0,l)}},[W]),!W||!D)return null;let Y=async(e,t)=>{try{await navigator.clipboard.writeText(e),F(t),setTimeout(()=>F(null),2e3)}catch(e){console.error("Failed to copy text: ",e)}},q=e=>{var t,l;let{text:n,fieldName:r}=e,i=null!=n?String(n):"";return i?(0,s.jsxs)("button",{type:"button",onClick:()=>Y(i,r),className:"inline-flex items-center gap-2 text-white transition-colors hover:text-cyan-400 hover:underline",title:(null==z||null==(t=z.common)?void 0:t.clickToCopy)||"Klicka f\xf6r att kopiera",children:[(0,s.jsx)("span",{children:i}),O===r&&(0,s.jsx)(a.A,{className:"h-4 w-4 text-green-400"})]}):(0,s.jsx)("span",{className:"text-white",children:null==z||null==(l=z.common)?void 0:l.na})};return(0,d.createPortal)((0,s.jsx)("div",{className:"fixed inset-0 z-[100000002] flex items-center justify-center bg-black/70 p-4",onClick:T,style:{position:"fixed",top:0,left:0,right:0,bottom:0},children:(0,s.jsxs)("div",{className:"relative z-[100000003] w-full max-w-md rounded-xl border border-gray-700 bg-[#0f172a] p-6 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"mb-6 flex items-start justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-xl font-semibold text-white",children:(null==z||null==(t=z.customers)?void 0:t.viewTitle)||"Customer Details"}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-gray-400",children:[(null==z||null==(m
1=z.customers)||null==(l=m.table)?void 0:l.createdAt)||"Skapad"," \xb7 ",(e=>{try{let t=new Date(e),l=e=>String(e).padStart(2,"0");return"".concat(l(t.getDate()),"/").concat(l(t.getMonth()+1),"/").concat(t.getFullYear(),", ").concat(l(t.getHours()),":").concat(l(t.getMinutes()))}catch(e){return""}})(D.created_at)]})]}),(0,s.jsx)("button",{onClick:T,className:"rounded-full p-1 text-gray-400 transition-colors hover:bg-gray-700 hover:text-white",children:(0,s.jsx)(i.A,{className:"h-5 w-5"})})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-gray-400",children:null==z||null==(f=z.customers)||null==(x=f.table)?void 0:x.id}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(q,{text:String(D.id),fieldName:"id"})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-gray-400",children:null==z||null==(p=z.customers)||null==(h=p.table)?void 0:h.name}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(q,{text:D.name,fieldName:"name"})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-gray-400",children:null==z||null==(v=z.customers)||null==(y=v.table)?void 0:y.email}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(q,{text:D.email||null,fieldName:"email"})})]}),D.partner&&(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-gray-400",children:(null==z||null==(b=z.customers)||null==(g=b.table)?void 0:g.partner)||"Partner"}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(q,{text:D.partner,fieldName:"partner"})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-gray-400",children:null==z||null==(N=z.customers)||null==(j=N.table)?void 0:j.phone}),(0,s.jsx)("div",{className:"flex flex-col items-end gap-1",children:H.length>0?H.map((e,t)=>(0,s.jsx)(q,{text:e.display,fieldName:"phone-".concat(t)},"".concat(e.href||e.raw,"-").concat(t))):(0,s.jsx)(q,{text:null,fieldName:"phone"})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-gray-400",children:V?(null==z||null==(k=z.customers)||null==(w=k.table)?void 0:w.orgNumber)||"Organization Number":(null==z||null==(_=z.customers)||null==(C=_.table)?void 0:C.personNo)||"Personal Number"}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(q,{text:V?D.org_number||null:D.personal_number||null,fieldName:V?"orgNumber":"personNo"})})]}),D.company_name&&(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-gray-400",children:(null==z||null==(S=z.customers)||null==(A=S.table)?void 0:A.companyName)||"Company Name"}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(q,{text:D.company_name,fieldName:"companyName"})})]})]}),$&&(0,s.jsx)("div",{className:"mt-6 border-t border-gray-700 pt-4",children:(0,s.jsxs)("button",{onClick:()=>{$(D.id),T()},className:"w-full inline-flex items-center justify-center gap-2 rounded-md border border-cyan-500/30 bg-cyan-600/20 px-4 py-2.5 text-sm font-semibold text-cyan-300 transition-colors hover:border-cyan-400 hover:bg-cyan-600/30 hover:text-cyan-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-500 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-900",children:[(0,s.jsx)(c.A,{className:"h-4 w-4"}),(null==z||null==(M=z.customers)?void 0:M.editCustomer)||"Redigera kund"]})})]})}),document.body)}},70064:(e,t,l)=>{l.d(t,{$:()=>a,k:()=>i});var s=l(95155),n=l(12115);let r=(0,n.createContext)(!0);function a(e){let{active:t,children:l}=e;return(0,s.jsx)(r.Provider,{value:t,children:l})}function i(){return(0,n.useContext)(r)}}}]);

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.