1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4944],{4924:(e,t,a)=>{"use strict";a.d(t,{default:()=>l});var r=a(95155),i=a(12115),s=a(20063),o=a(13367),n=a(65229);function l(e){let{children:t}=e,[a,l]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),p=(0,s.usePathname)(),u=(0,s.useSearchParams)().toString();return((0,i.useEffect)(()=>{let e=window.matchMedia("(max-width: 767px)"),t=()=>{l(e.matches),c(!1)},a=()=>c(!0);return t(),e.addEventListener("change",t),window.addEventListener("openAppNavigation",a),()=>{e.removeEventListener("change",t),window.removeEventListener("openAppNavigation",a)}},[]),(0,i.useEffect)(()=>c(!1),[p,u]),a)?(0,r.jsx)(o.bL,{open:d,onOpenChange:c,children:(0,r.jsxs)(o.ZL,{children:[(0,r.jsx)(o.hJ,{className:"fixed inset-0 z-[100] bg-black/50"}),(0,r.jsxs)(o.UC,{id:"mobile-app-navigation",className:"fixed inset-y-0 left-0 z-[101] w-[280px] overflow-y-auto bg-[#010409]",onCloseAutoFocus:e=>{var t;e.preventDefault(),null==(t=document.getElementById("open-app-navigation"))||t.focus()},children:[(0,r.jsx)(o.hE,{className:"sr-only",children:"Menu aplikacji"}),(0,r.jsx)(o.VY,{className:"sr-only",children:"Oferty, kosztorysy, klienci i pozostaÅe narzÄdzia."}),(0,r.jsx)(o.bm,{className:"absolute right-2 top-2 z-10 p-2 text-white","aria-label":"Zamknij menu",children:(0,r.jsx)(n.A,{className:"h-5 w-5"})}),(0,r.jsx)("div",{onClick:e=>{e.target.closest("a")&&c(!1)},children:t})]})]})}):(0,r.jsx)("div",{className:"hidden md:block",children:t})}},9280:(e,t,a)=>{"use strict";a.d(t,{CR:()=>g,HK:()=>l,Nu:()=>y,UD:()=>d,WV:()=>x,XF:()=>o,Zp:()=>r,_g:()=>k,ay:()=>b,kI:()=>p,kz:()=>j,qd:()=>w,qf:()=>h,v4:()=>f,vA:()=>i,vL:()=>s});let r=999,i=999,s=999999,o=["free","starter","professional","business","enterprise"],n={free:0,pay_per_project:1,starter:2,professional:3,business:4,enterprise:5},l={free:{projectsPerMonth:1,pagesPerProject:20,aiCreditsPerMonth:30,exports:["pdf","xlsx","norma"],radarDays:1,priceCatalogItems:0,inProgressProjectsPerMonth:0},starter:{projectsPerMonth:5,pagesPerProject:100,aiCreditsPerMonth:200,exports:["pdf","xlsx","norma"],radarDays:7,priceCatalogItems:100,inProgressProjectsPerMonth:0},professional:{projectsPerMonth:20,pagesPerProject:500,aiCreditsPerMonth:1e3,exports:["pdf","xlsx","norma"],radarDays:30,priceCatalogItems:999999,inProgressProjectsPerMonth:2},business:{projectsPerMonth:999,pagesPerProject:2e3,aiCreditsPerMonth:5e3,exports:["pdf","xlsx","email","norma","csv"],radarDays:999,priceCatalogItems:999999,inProgressProjectsPerMonth:999},enterprise:{projectsPerMonth:999,pagesPerProject:999,aiCreditsPerMonth:1e5,exports:["pdf","xlsx","email","norma","csv","api"],radarDays:999,priceCatalogItems:999999,inProgressProjectsPerMonth:999},pay_per_project:{projectsPerMonth:1,pagesPerProject:100,aiCreditsPerMonth:120,exports:["pdf","xlsx","norma"],radarDays:1,priceCatalogItems:0,inProgressProjectsPerMonth:0}},d={free:"Darmowy",starter:"Starter",professional:"Professional",business:"Business",enterprise:"Enterprise",pay_per_project:"1 projekt"},c={starter:"Starter - 249 PLN/mies. netto",professional:"Professional - 399 PLN/mies. netto",business:"Business - 699 PLN/mies. netto",pay_per_project:"1 projekt - 89 PLN netto / 30 dni"};[{id:"starter",name:"Starter",desc:"Regularne oferty dla maÅej firmy instalacyjnej",priceMonthly:249,supportLabel:"E-mail",exportsLabel:"PDF + Excel + ATH (beta)",catalogLabel:"100 pozycji"},{id:"professional",name:"Professional",desc:"Oferty, prywatne cenniki i kontrola 2 realizacji",priceMonthly:399,supportLabel:"E-mail",exportsLabel:"PDF + Excel + ATH (beta)",catalogLabel:"Bez limitu",featured:!0},{id:"business",name:"Business",desc:"Oferty, zakupy i realizacje firmy bez limitu projekt\xf3w",priceMonthly:699,supportLabel:"Telefon + 4h",exportsLabel:"PDF + Excel + ATH + e-mail",catalogLabel:"Bez limitu"},{id:"enterprise",name:"Enterprise",desc:"Integracje, automatyzacje i obsÅuga wielu oddziaÅ\xf3w",priceMonthly:null,supportLabel:"Dedykowany",exportsLabel:"API + integracje + SLA",catalogLabel:"Bez limitu"}].map(e=>({id:e.id,name:e.name,shortDesc:e.desc,priceMonthly:e.priceMonthly,limits:l[e.id]}));let p=[{key:"labor_catalog",label:"WÅasny cennik robocizny (Twoje usÅugi i stawki)",kind:"limit",minimumPlan:"free"},{key:"labor_catalog_import",label:"Import cennika robocizny CSV / XLSX",kind:"boolean",minimumPlan:"professional"},{key:"pricing_profile",label:"WÅasny profil stawek i zbiorcze przeliczanie",kind:"boolean",minimumPlan:"professional"},{key:"document_ai_analysis",label:"Analiza dokumentacji AI",kind:"boolean",minimumPlan:"free"},{key:"project_ai_agent",label:"Agent AI w projekcie",kind:"boolean",minimumPlan:"free"},{key:"export_pdf",label:"Eksport PDF",kind:"boolean",minimumPlan:"free"},{key:"export_excel",label:"Eksport Excel",kind:"boolean",minimumPlan:"free"},{key:"price_catalog",label:"Prywatne cenniki",kind:"limit",minimumPlan:"starter"},{key:"radar_permits",label:"Radar CRM - Pozwolenia RWDZ",kind:"limit",minimumPlan:"free"},{key:"radar_tenders",label:"Radar CRM - Baza Przetarg\xf3w",kind:"limit",minimumPlan:"free"},{key:"radar_companies",label:"Kartoteka firm",kind:"limit",minimumPlan:"free"},{key:"radar_new",label:"Nowa reguÅa Radaru",kind:"limit",minimumPlan:"free"},{key:"in_progress",label:"W realizacji (zarzÄ
dzanie projektami)",kind:"limit",minimumPlan:"professional"},{key:"budget_margin_alerts",label:"Alerty marży i budżetu",kind:"boolean",minimumPlan:"business"},{key:"quote_email_send",label:"WysyÅka zapytaÅ e-mailem",kind:"boolean",minimumPlan:"business"},{key:"export_norma_ath",label:"Eksport NORMA / ATH",kind:"boolean",minimumPlan:"free"}
1,{key:"export_csv_contextual",label:"Eksport CSV w wybranych moduÅach",kind:"text",values:{free:"wybr.",starter:"wybr.",professional:"tak",business:"tak",enterprise:"tak"}},{key:"ai_assistant",label:"Wsparcie AI (menu gÅ\xf3wne)",kind:"boolean",minimumPlan:"business"},{key:"phone_support_4h",label:"Wsparcie telefoniczne 4h",kind:"boolean",minimumPlan:"business"},{key:"dedicated_manager",label:"Dedykowany opiekun",kind:"boolean",minimumPlan:"enterprise"},{key:"sla_priority_support",label:"SLA + priorytetowe wsparcie",kind:"boolean",minimumPlan:"enterprise"},{key:"api_integration",label:"WÅasna integracja API",kind:"boolean",minimumPlan:"enterprise"}],u=p.reduce((e,t)=>(e[t.key]=t,e),{});function m(e){return e&&e in l?e:"free"}function b(e){return l[m(e)]}function x(e){return d[m(e)]}function f(e){return b(e).projectsPerMonth}function h(e){return c[m(e)]||x(e)}function w(e,t){return n[m(e)]>=n[t]}function j(e){return e<=0?"NiedostÄpny":e>=s?"Bez limitu":"".concat(e," pozycji")}function g(e){var t,a;return null!=(a=null==(t=u[e])?void 0:t.minimumPlan)?a:null}function y(e,t){let a=m(e),r=b(a),i=u[t];if(!i)return!1;switch(t){case"labor_catalog":case"export_csv_contextual":return!0;case"price_catalog":return r.priceCatalogItems>0;case"radar_permits":case"radar_tenders":case"radar_companies":case"radar_new":return r.radarDays>0;case"in_progress":return r.inProgressProjectsPerMonth>0;default:return!!i.minimumPlan&&w(a,i.minimumPlan)}}function k(e,t){let a=m(e),r=b(a),o=u[t];if(!o)return!1;switch(t){case"labor_catalog":return null===("free"===m(a)?5:null)?"Bez limitu usÅug":"".concat(5," usÅug");case"price_catalog":if(r.priceCatalogItems<=0)return!1;return r.priceCatalogItems>=s?"â":String(r.priceCatalogItems);case"radar_permits":case"radar_tenders":case"radar_companies":case"radar_new":return r.radarDays>=999?"â":"".concat(r.radarDays,"d");case"in_progress":if(r.inProgressProjectsPerMonth<=0)return!1;return r.inProgressProjectsPerMonth>=i?"â":"".concat(r.inProgressProjectsPerMonth,"/mies.");case"export_csv_contextual":var n;return(null==(n=o.values)?void 0:n[a])||"-";default:return y(a,t)}}},28324:(e,t,a)=>{"use strict";a.d(t,{default:()=>E});var r=a(95155),i=a(12115),s=a(87066),o=a(18042),n=a(85710),l=a(46398),d=a(19408),c=a(90889),p=a(78192),u=a(65229),m=a(52987),b=a(20063),x=a(89715),f=a(80534),h=a(20639),w=a(62356);function j(e){let{show:t,onClose:a}=e,o=(0,b.useRouter)();if((0,i.useEffect)(()=>{t&&(0,w.v)({eventType:"goal_picker_viewed"})},[t]),!t)return null;let n=[{id:"estimate",icon:x.A,title:"ZrobiÄ pierwszÄ
ofertÄ",description:"Utw\xf3rz projekt, dodaj dokumentacjÄ i wyciÄ
gnij zestawienie materiaÅ\xf3w.",href:"/projects/new",startTour:!0,accent:"text-[#3fb950]",bg:"bg-[#3fb950]/10",border:"border-[#3fb950]/25",label:"Najkr\xf3tsza Åcieżka"},{id:"radar",icon:c.A,title:"ZnaleÅºÄ nowe inwestycje",description:"Przejdź do Radaru CRM i sprawdź pozwolenia oraz przetargi.",href:"/radar/permits",startTour:!1,accent:"text-[#58a6ff]",bg:"bg-[#2f81f7]/10",border:"border-[#2f81f7]/25",label:"Lead generation"},{id:"catalog",icon:f.A,title:"UÅożyÄ wÅasne ceny",description:"Prywatny cennik jest dostÄpny od Starter: do 100 pozycji.",href:"/cennik",startTour:!1,accent:"text-[#e3b341]",bg:"bg-[#e3b341]/10",border:"border-[#e3b341]/25",label:"Baza cen"},{id:"execution",icon:s.A,title:"ProwadziÄ realizacjÄ",description:"Od Professional: zam\xf3wienia, dostawy, faktury i kontrola koszt\xf3w.",href:"/in-progress",startTour:!1,accent:"text-[#f78166]",bg:"bg-[#f78166]/10",border:"border-[#f78166]/25",label:"Po wygranej ofercie"}];return(0,r.jsx)("div",{className:"app-modal-overlay z-[100] animate-fadeIn",children:(0,r.jsxs)("div",{className:"app-modal-shell max-w-3xl",role:"dialog","aria-modal":"true","aria-labelledby":"welcome-popup-title",children:[(0,r.jsxs)("div",{className:"app-modal-header",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"app-modal-icon",children:(0,r.jsx)(h.A,{className:"h-4 w-4"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{id:"welcome-popup-title",className:"app-modal-title",children:"Pomoc w rozpoczÄciu pracy"}),(0,r.jsx)("p",{className:"app-modal-subtitle",children:"Wybierz moduÅ, kt\xf3rego obsÅugÄ chcesz poznaÄ."})]})]}),(0,r.jsx)("button",{onClick:()=>a(!1),className:"app-modal-close","aria-label":"Zamknij onboarding",children:(0,r.jsx)(u.A,{className:"h-4 w-4"})})]}),(0,r.jsxs)("div",{className:"app-modal-body app-scrollbar space-y-2.5",children:[(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:n.map(e=>{let t=e.icon;return(0,r.jsx)("button",{type:"button",onClick:()=>(function(e){let t=localStorage.getItem("kosztorysant_onboarding_goal");localStorage.setItem("kosztorysant_onboarding_goal",e.id),(0,w.v)({eventType:t?"goal_changed":"goal_selected",goal:e.id,metadata:{previous_goal:t,destination:e.href}}),a(e.startTour),o.push(e.href)})(e),className:"group rounded-md border ".concat(e.border," bg-[#161b22] p-2.5 text-left transition-colors hover:bg-[#1f2630]"),children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border ".concat(e.bg," ").concat(e.border),children:(0,r.jsx)(t,{className:"h-4 w-4 ".concat(e.accent)})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"mb-1 flex flex-wrap items-center gap-2",children:[(0,r.jsx)("h3",{className:"text-[12px] font-bold text-white",children:e.title}),(0,r.jsx)("span",{className:"rounded border border-[#30363d] bg-[#0d1117] px-1.5 py-0.5 text-[9px] font-bold text-[#8b949e]",children:e.label})]}),(0,r.jsx)("p",{className:"text-[10.5px] leading-snug text-[#b7c0cc]",children:e.description})]})]})},e.id)})}),(0,r.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-md border border-[#d4a843]/35 bg-[#0f1318] p-2.5 md:flex-row md:items-center",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 flex-1",children:[(0,r.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-[#d4a843]/25 bg-[#d4a843]/10",children:(0,r.jsx)(h.A,{className:"h-4 w-4 text-[#D4A843]"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-[12px] font-black text-white",children:"1 projekt testowy"}),(0,r.jsx)("p",{className:"mt-0.5 text-[10.5px] text-[#b7c0cc]",children:"Zakres darmowego dostÄpu i dostÄpne pakiety sprawdzisz w Planie i limitach."})]})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{a(!1),o.push("/subscription")},className:"brand-gradient-cta inline-flex items-center justify-center gap-2 rounded-md px-3 py-1.5 text-[11px] font-black transition-colors",children:["Zobacz plany",(0,r.jsx)(m.A,{className:"w-3.5 h-3.5"})]})]})]})]})})}var g=a(47650),y=a(90368),k=a(61362);let v="kosztorysant_onboarding_v2",z="rgba(1, 4, 9, 0.76)",N={offers:"/dashboard",realizations:"/in-progress",catalogs:"/cennik",suppliers:"/suppliers",clients:"/clients",radar:"/radar/permits",assistant:"/assistant"},P=(e,t)=>!t||("/projects/[id]"===t?e.startsWith("/projects/")&&"/projects/new"!==e:e===t||e.startsWith("".concat(t,"/"))),_=[{id:"offers",label:"Oferty",routeMatch:e=>"/dashboard"===e||e.startsWith("/projects"),steps:[{id:"offers-dashboard",eyebrow:"Start pracy",title:"Oferta idzie po kolejnych krokach",description:"Ten pasek pokazuje, co realnie jest już zrobione: dokumenty, analiza, zestawienie, ceny, zapytania i gotowa oferta dla klienta.",targetSelector:'[data-tour="dashboard-onboarding"]',route:"/dashboard",side:"bottom",nextLabel:"Pokaż start oferty"},{id:"offers-new-project",eyebrow:"Nowa oferta",title:"Tutaj zakÅadasz kolejnÄ
wycenÄ",description:"Nowa oferta tworzy roboczy projekt. Potem możesz dodaÄ dokumentacjÄ i pracowaÄ na pozycjach zamiast przepisywaÄ wszystko rÄcznie.",targetSelector:'[data-tour="nav-new-project"]',route:"/dashboard",side:"bottom",nextRoute:"/projects/new",nextLabel:"Przejdź do formularza"},{id:"offers-project-form",eyebrow:"Dane projektu",title:"Najpierw prawdziwe dane inwestycji",description:"Nazwa, lokalizacja, typ obiektu i zakres sÄ
bazÄ
dla dokument\xf3w, zapytaÅ i p\xf3źniejszej realizacji. Im mniej pustych p\xf3l, tym mniej chaosu dalej.",targetSelector:'[data-tour="new-project-form"]',route:"/projects/new",side:"right",nextLabel:"Dalej"},{id:"offers-upload",eyebrow:"Dokumentacja",title:"Dokumenty zasilajÄ
zestawienie",description:"Po utworzeniu projektu wr\xf3Ä tu z PDF, XLSX albo innym źr\xf3dÅem. Aplikacja nie udaje danych: bez pliku lub pozycji pokaże brak zasilenia.",targetSelector:'[data-tour="upload-section"]',route:"/projects/[id]",side:"top",nextLabel:"Pokaż materiaÅy"},{id:"offers-materials",eyebrow:"Zestawienie",title:"MateriaÅy sÄ
gÅ\xf3wnym stoÅem pracy",description:"W tej zakÅadce sprawdzasz pozycje, iloÅci, ceny, źr\xf3dÅa i zapytania do dostawc\xf3w. To nie jest dekoracja, tylko baza kosztorysu.",targetSelector:'[data-tour="tab-materials"]',route:"/projects/[id]",side:"bottom"},{id:"offers-prices",eyebrow:"Wycena",title:"Ceny muszÄ
mieÄ Åºr\xf3dÅo",description:"Przycisk cen prowadzi do pracy na marży, cenach zakupu i źr\xf3dÅach cennikowych. Braki trzeba uzupeÅniÄ, a nie przykryÄ fikcyjnÄ
wartoÅciÄ
.",targetSelector:'[data-tour="materials-ceny-btn"]',route:"/projects/[id]",side:"bottom"},{id:"offers-agent",eyebrow:"Wsparcie",title:"Asystent pomaga, ale nie zastÄpuje źr\xf3deÅ",description:"Używaj go do analizy opis\xf3w, brak\xf3w i ryzyk. Gdy brakuje danych, odpowied
1ź ma to pokazaÄ wprost.",targetSelector:'[data-tour="tab-agent"]',route:"/projects/[id]",side:"bottom",nextLabel:"ZakoÅcz"}]},{id:"realizations",label:"Realizacje",requiresActiveAccess:!0,routeMatch:e=>e.startsWith("/in-progress"),steps:[{id:"realizations-entry",eyebrow:"Po zakupie",title:"Realizacje otwierajÄ
pracÄ po wygranej",description:"Tu trafia oferta, gdy przechodzi do wykonania. ModuÅ prowadzi zam\xf3wienia, dostawy, faktury i kontrolÄ kosztu projektu.",targetSelector:'[data-tour="nav-in-progress"]',side:"right"},{id:"realizations-workflow",eyebrow:"Kontrola etapu",title:"NagÅ\xf3wek pokazuje stan budowy",description:"Widzisz aktywne realizacje, zam\xf3wienia, wartoÅÄ, limit planu i ostrzeżenia budżetowe, jeÅli plan ma tÄ funkcjÄ.",targetSelector:'[data-tour="realizations-workflow"]',route:"/in-progress",side:"bottom"},{id:"realizations-filters",eyebrow:"Rejestr",title:"Filtry pomagajÄ
szybko znaleÅºÄ ryzyko",description:"Szukaj realizacji po nazwie lub lokalizacji i filtruj te, kt\xf3re wymagajÄ
dziaÅania: zam\xf3wienia, ryzyka budżetu albo braki pozycji.",targetSelector:'[data-tour="realizations-filters"]',route:"/in-progress",side:"bottom"},{id:"realizations-table",eyebrow:"WejÅcie w projekt",title:"KlikniÄcie wiersza otwiera operacje",description:"Po wejÅciu do realizacji pracujesz na materiaÅach, zam\xf3wieniach, dostawach, fakturach i por\xf3wnaniu cen.",targetSelector:'[data-tour="realizations-table"]',route:"/in-progress",side:"top",nextLabel:"ZakoÅcz"}]},{id:"catalogs",label:"Cenniki",requiresActiveAccess:!0,routeMatch:e=>e.startsWith("/cennik"),steps:[{id:"catalogs-workflow",eyebrow:"Źr\xf3dÅa cen",title:"Cennik jest zasilany importami i ofertami",description:"Tu kontrolujesz prawdziwe pozycje, źr\xf3dÅa, aktualnoÅÄ i pokrycie cen. Status nie powinien udawaÄ importu, kt\xf3rego nie byÅo.",targetSelector:'[data-tour="catalogs-workflow"]',route:"/cennik",side:"bottom"},{id:"catalogs-import",eyebrow:"Import",title:"Wgraj realny plik dostawcy",description:"CSV, XLSX lub PDF trafiajÄ
najpierw do odczytu i podglÄ
du. Zapis do cennika powinien byÄ ÅwiadomÄ
decyzjÄ
po sprawdzeniu danych.",targetSelector:'[data-tour="catalogs-import-actions"]',route:"/cennik",side:"left",nextLabel:"ZakoÅcz"}]},{id:"suppliers",label:"Dostawcy",requiresActiveAccess:!0,routeMatch:e=>e.startsWith("/suppliers"),steps:[{id:"suppliers-workflow",eyebrow:"Kartoteka dostawc\xf3w",title:"Dostawca musi mieÄ dane do użycia",description:"Kartoteka zbiera kontakty, preferencje, źr\xf3dÅa cen i braki. DziÄki temu zapytanie i cennik opierajÄ
siÄ na realnej relacji zakupowej.",targetSelector:'[data-tour="suppliers-workflow"]',route:"/suppliers",side:"bottom"},{id:"suppliers-actions",eyebrow:"DziaÅanie",title:"Najpierw dodaj albo uzupeÅnij dostawcÄ",description:"Przycisk dodania oraz filtr brak\xf3w prowadzÄ
do danych, kt\xf3re faktycznie przydadzÄ
siÄ w ofertach i zakupach.",targetSelector:'[data-tour="suppliers-actions"]',route:"/suppliers",side:"left",nextLabel:"ZakoÅcz"}]},{id:"clients",label:"Klienci",requiresActiveAccess:!0,routeMatch:e=>e.startsWith("/clients"),steps:[{id:"clients-workflow",eyebrow:"Kartoteka klient\xf3w",title:"Odbiorca oferty powinien byÄ jednoznaczny",description:"Tu porzÄ
dkujesz NIP, kontakt, adres i powiÄ
zania z projektami. Dane klienta p\xf3źniej wracajÄ
w ofertach i dokumentach.",targetSelector:'[data-tour="clients-workflow"]',route:"/clients",side:"bottom"},{id:"clients-filters",eyebrow:"Kontrola brak\xf3w",title:"Filtry pokazujÄ
, co trzeba uzupeÅniÄ",description:"Szybko znajdziesz klient\xf3w bez NIP, kontaktu lub gotowoÅci do użycia w ofercie.",targetSelector:'[data-tour="clients-filters"]',route:"/clients",side:"bottom",nextLabel:"ZakoÅcz"}]},{id:"radar",label:"Radar CRM",requiresActiveAccess:!0,routeMatch:e=>e.startsWith("/radar"),steps:[{id:"radar-nav",eyebrow:"Radar CRM",title:"To moduÅ pracy na leadach",description:"Pozwolenia i przetargi sÄ
osobnymi źr\xf3dÅami. Jeżeli źr\xf3dÅo nie dziaÅa, aplikacja ma pokazaÄ blokadÄ albo brak aktualizacji, a nie faÅszywy wynik.",targetSelector:'[data-tour="nav-radar"]',side:"right"},{id:"radar-workflow",eyebrow:"Lista lead\xf3w",title:"Wybierz wpis i przejdź do oceny",description:"Tabela i filtry sÅużÄ
do selekcji realnych rekord\xf3w. Dalej możesz oznaczaÄ status, kontakt i przejÅcie do oferty.",targetSelector:'[data-tour="radar-workflow"]',route:"/radar",side:"bottom",nextLabel:"ZakoÅcz"}]},{id:"assistant",label:"Wsparcie AI",requiresActiveAccess:!0,routeMatch:e=>e.startsWith("/assistant"),steps:[{id:"assistant-workflow",eyebrow:"Asystent",title:"Rozmowa ma oddzielaÄ fakty od brak\xf3w",description:"ModuÅ wspiera analizÄ technicznÄ
i ryzyka. Gdy nie ma źr\xf3dÅa, ma to nazwaÄ zamiast dopowiadaÄ fikcyjne normy, ceny albo parametry.",targetSelector:'[data-tour="assistant-workflow"]',route:"/assistant",side:"bottom"},{id:"assistant-chat",eyebrow:"Czat",title:"Zadaj konkretne pytanie do pracy",description:"Najlepiej dziaÅa na opisach, fragmentach PFU, wymaganiach technicznych i decyzjach ofertowych. Historia zostaje w tym module lokalnie.",targetSelector:'[data-tour="assistant-chat"]',route:"/assistant",side:"top",nextLabel:"ZakoÅcz"}]}];function A(e){return"".concat(v,":").concat(e,":done")}function S(e){return"".concat(v,":").concat(e,":step")}function C(e){return _.find(t=>
1t.id===e)||_[0]}function M(e,t,a){return Math.min(Math.max(e,t),a)}function I(e){var t;let{plan:a,isActive:s,started:o}=e,n=(0,b.usePathname)(),l=(0,b.useRouter)(),[d,c]=(0,i.useState)(!1),[p,x]=(0,i.useState)(!1),[f,h]=(0,i.useState)(0),[j,v]=(0,i.useState)(null),[I,L]=(0,i.useState)(null),E=(0,i.useRef)(null),T=(0,i.useMemo)(()=>I?C(I):function(e,t,a){let r=_.find(t=>t.routeMatch(e));return r&&(!r.requiresActiveAccess||t&&"free"!==a)?r:_[0]}(n,s,a),[I,n,s,a]),D=T.steps[f]||T.steps[0];(0,i.useEffect)(()=>{c(!0)},[]),(0,i.useEffect)(()=>{if(!d||!o||localStorage.getItem(A(T.id)))return;let e=Number.parseInt(localStorage.getItem(S(T.id))||"0",10),t=Number.isFinite(e)?M(e,0,T.steps.length-1):0,a=setTimeout(()=>{var e;h(t),x(!0),(0,w.v)({eventType:"tour_started",stepId:null==(e=T.steps[t])?void 0:e.id,stepIndex:t,metadata:{tour:T.id}})},500);return()=>clearTimeout(a)},[T,d,o]),(0,i.useEffect)(()=>{if(!d)return;let e=e=>{var t;let a=e.detail,r=C((null==a?void 0:a.flowId)||"offers");localStorage.removeItem(A(r.id)),localStorage.removeItem(S(r.id)),L(r.id),h(0),v(null),x(!0);let i=N[r.id];i&&!P(n,i)&&l.push(i),(0,w.v)({eventType:"tour_started",stepId:null==(t=r.steps[0])?void 0:t.id,stepIndex:0,metadata:{tour:r.id,restart:!0,demo:!!(null==a?void 0:a.demo)}})};return window.addEventListener("startOnboardingFlow",e),()=>window.removeEventListener("startOnboardingFlow",e)},[d,n,l]),(0,i.useEffect)(()=>{if(!p){h(0),v(null);return}if(localStorage.getItem(A(T.id)))return void x(!1);let e=Number.parseInt(localStorage.getItem(S(T.id))||"0",10);h(Number.isFinite(e)?M(e,0,T.steps.length-1):0)},[T.id,p,T.steps.length]);let W=(0,i.useCallback)(()=>{p&&D&&d&&(E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{if(D.route&&!P(n,D.route)||!D.targetSelector)return void v(null);let e=document.querySelector(D.targetSelector);if(!e)return void v(null);e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),window.setTimeout(()=>v(e.getBoundingClientRect()),240)},80))},[p,d,n,D]);(0,i.useEffect)(()=>(W(),window.addEventListener("resize",W),window.addEventListener("scroll",W,!0),()=>{window.removeEventListener("resize",W),window.removeEventListener("scroll",W,!0),E.current&&clearTimeout(E.current)}),[W]);let R=(0,i.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];localStorage.setItem(A(T.id),"true"),localStorage.removeItem(S(T.id)),x(!1),v(null),L(null),(0,w.v)({eventType:e?"tour_skipped":"tour_completed",stepId:null==D?void 0:D.id,stepIndex:f,metadata:{tour:T.id}})},[T.id,null==D?void 0:D.id,f]),O=(0,i.useCallback)(()=>{if(!D)return;if((0,w.v)({eventType:"tour_step_completed",stepId:D.id,stepIndex:f,metadata:{tour:T.id}}),f>=T.steps.length-1)return void R(!1);let e=f+1,t=T.steps[e];h(e),localStorage.setItem(S(T.id),String(e));let a=D.nextRoute||((null==t?void 0:t.route)&&!P(n,t.route)&&"/projects/[id]"!==t.route?t.route:null);a&&l.push(a)},[R,T,n,l,D,f]),F=(0,i.useCallback)(()=>{if(f<=0)return;let e=f-1,t=T.steps[e];h(e),localStorage.setItem(S(T.id),String(e)),(null==t?void 0:t.route)&&"/projects/[id]"!==t.route&&!P(n,t.route)&&l.push(t.route)},[T,n,l,f]);if(!d||!p||!D)return null;let K=!!j,Z=null!=(t=D.padding)?t:8,B=j?{top:Math.max(0,j.top-Z),left:Math.max(0,j.left-Z),width:j.width+2*Z,height:j.height+2*Z}:null,U=(()=>{if(!B)return{left:"50%",top:"50%",transform:"translate(-50%, -50%)"};let e=window.innerWidth,t=window.innerHeight,a=D.side||"bottom",r=M(B.left+B.width/2-180,16,e-360-16),i=B.top+B.height+14,s=B.top-14;return"right"===a&&B.left+B.width+14+360<e?{left:B.left+B.width+14,top:M(B.top,16,t-260)}:"left"===a&&B.left-14-360>16?{left:B.left-14-360,top:M(B.top,16,t-260)}:"top"===a&&s>16?{left:r,bottom:t-B.top+14}:i+260<t?{left:r,top:i}:{left:r,bottom:Math.max(16,t-B.top+14)}})(),q=(f+1)/T.steps.length*100,V=B?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"fixed left-0 top-0 z-[9000]",style:{width:"100vw",height:B.top,background:z}}),(0,r.jsx)("div",{className:"fixed left-0 z-[9000]",style:{top:B.top,width:B.left,height:B.height,background:z}}
1),(0,r.jsx)("div",{className:"fixed z-[9000]",style:{top:B.top,left:B.left+B.width,right:0,height:B.height,background:z}}),(0,r.jsx)("div",{className:"fixed bottom-0 left-0 z-[9000]",style:{top:B.top+B.height,width:"100vw",background:z}}),(0,r.jsx)("div",{className:"pointer-events-none fixed z-[9001] rounded-md border border-[#D4A843]/80 shadow-[0_0_0_1px_rgba(212,168,67,0.24),0_18px_50px_rgba(1,4,9,0.48)]",style:{top:B.top,left:B.left,width:B.width,height:B.height}})]}):(0,r.jsx)("div",{className:"fixed inset-0 z-[9000]",style:{background:z}});return(0,g.createPortal)((0,r.jsxs)(r.Fragment,{children:[V,(0,r.jsxs)("div",{className:"fixed z-[9002] w-[calc(100vw-32px)] max-w-[360px] overflow-hidden rounded-lg border border-[#30363d] bg-[#0d1117] text-[#c9d1d9] shadow-[0_24px_70px_rgba(1,4,9,0.70)]",style:U,role:"dialog","aria-modal":"true","aria-label":"".concat(T.label,": ").concat(D.title),children:[(0,r.jsx)("div",{className:"border-b border-[#30363d] bg-[#010409] px-4 py-3",children:(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-[10px] font-black uppercase tracking-[0.18em] text-[#B8860B]",children:T.label}),(0,r.jsx)("h2",{className:"mt-1 text-[15px] font-black leading-tight text-[#e6edf3]",children:D.title})]}),(0,r.jsx)("button",{type:"button",onClick:()=>R(!0),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-[#30363d] bg-[#161b22] text-[#8b949e] transition-colors hover:border-[#D4A843]/60 hover:text-[#e6edf3]",title:"Zamknij wprowadzenie","aria-label":"Zamknij wprowadzenie",children:(0,r.jsx)(u.A,{className:"h-4 w-4"})})]})}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,r.jsx)("p",{className:"text-[10px] font-black uppercase tracking-[0.16em] text-[#D4A843]",children:D.eyebrow}),(0,r.jsxs)("span",{className:"text-[10px] font-bold tabular-nums text-[#8b949e]",children:[f+1,"/",T.steps.length]})]}),(0,r.jsx)("p",{className:"text-[12px] font-semibold leading-5 text-[#8b949e]",children:D.description}),(0,r.jsx)("div",{className:"mt-4 h-1 overflow-hidden rounded-full bg-[#21262d]","aria-hidden":"true",children:(0,r.jsx)("div",{className:"h-full rounded-full bg-[#D4A843]",style:{width:"".concat(q,"%")}})}),!K&&D.targetSelector&&(0,r.jsx)("div",{className:"mt-3 rounded-md border border-[#30363d] bg-[#161b22] px-3 py-2 text-[11px] font-semibold leading-4 text-[#8b949e]",children:"Ten krok pojawi siÄ przy wÅaÅciwym elemencie, gdy otworzysz odpowiedni widok albo projekt z danymi."}),(0,r.jsxs)("div",{className:"mt-4 flex items-center justify-between gap-2",children:[(0,r.jsxs)("button",{type:"button",onClick:F,disabled:0===f,className:"app-button h-9 disabled:cursor-not-allowed disabled:opacity-45",title:"Poprzedni krok",children:[(0,r.jsx)(y.A,{className:"h-3.5 w-3.5"}),"Wstecz"]}),(0,r.jsx)("button",{type:"button",onClick:O,className:"app-button app-button-primary h-9",children:f>=T.steps.length-1?(0,r.jsxs)(r.Fragment,{children:["Gotowe",(0,r.jsx)(k.A,{className:"h-3.5 w-3.5"})]}):(0,r.jsxs)(r.Fragment,{children:[D.nextLabel||"Dalej",(0,r.jsx)(m.A,{className:"h-3.5 w-3.5"})]})})]})]})]})]}),document.body)}let L=[{id:"offers",label:"Oferty",description:"Start pracy: dokumenty, analiza, zestawienie, ceny i przygotowanie oferty.",icon:s.A},{id:"realizations",label:"Realizacje",description:"Demo pracy po wygranej: zam\xf3wienia, dostawy, faktury i kontrola kosztu.",icon:o.A,demoOnly:!0},{id:"catalogs",label:"Cenniki",description:"Importy, źr\xf3dÅa cen, aktualnoÅÄ i pozycje używane p\xf3źniej w ofertach.",icon:n.A,demoOnly:!0},{id:"suppliers",label:"Dostawcy",description:"Kartoteka zakupowa, kontakty, preferencje i braki do uzupeÅnienia.",icon:l.A,demoOnly:!0},{id:"clients",label:"Klienci",description:"NIP, kontakt, adres i dane odbiorcy używane w ofertach oraz dokumentach.",icon:d.A,demoOnly:!0},{id:"radar",label:"Radar CRM",description:"Demo procesu pracy na leadach z pozwoleÅ i przetarg\xf3w.",icon:c.A,demoOnly:!0},{id:"assistant",label:"Wsparcie AI",description:"Rozmowa techniczna, ryzyka, braki danych i zasada bez zmyÅlania źr\xf3deÅ.",icon:p.A,demoOnly:!0}];function E(e){let{plan:t,isActive:a,projectsUsed:o,projectLimit:n,children:l}=e,[d,c]=(0,i.useState)(!1),[p,b]=(0,i.useState)(!1),[x,f]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=()=>{f(!1),c(!0)};return window.addEventListener("restartOnboardingGoal",e),()=>window.removeEventListener("restartOnboardingGoal",e)},[]),(0,i.useEffect)(()=>{let e=()=>{f(!1),c(!1),b(!0)};return window.addEventListener("restartTour",e),()=>window.removeEventListener("restartTour",e)},[]),(0,r.jsxs)(r.Fragment,{children:[l,(0,r.jsx)(j,{show:d,onClose:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c(!1),localStorage.setItem("kosztorysant_welcomed","true"),e&&setTimeout(()=>f(!0),400)}}),p&&(0,r.jsx)("div",{className:"onboarding-picker-overlay animate-fadeIn",children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"onboarding-module-picker-title",className:"onboarding-picker-shell",children:[(0,r.jsxs)("div",{className:"onboarding-picker-header",children:[(0,r.jsxs)("div",{className:"onboarding-picker-heading",children:[(0,r.jsx)("div",{className:"onboarding-picker-main-icon",children:(0,r.jsx)(s.A,{className:"h-4 w-4"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"onboarding-picker-eyebrow",children:"Wprowadzenie"}),(0,r.jsx)("h2",{id:"onboarding-module-picker-title",className:"onboarding-picker-title",children:"Wybierz moduÅ do pokazania"}),(0,r.jsx)("p",{className:"onboarding-picker-subtitle",children:"Demo pokazuje przebieg pracy. Nie zmienia planu, limit\xf3w ani realnych dostÄp\xf3w do funkcji pÅatnych."})]})]}),(0,r.jsx)("button",{type:"button",onClick:()=>b(!1),className:"onboarding-picker-close",title:"Zamknij wyb\xf3r wprowadzenia","aria-label":"Zamknij wyb\xf3r wprowadzenia",children:(0,r.jsx)(u.A,{className:"h-4 w-4"})})]}),(0,r.jsx)("div",{className:"onboarding-picker-body app-scrollbar",children:(0,r.jsx)("div",{className:"onboarding-picker-list",children:L.map(e=>{let t=e.icon,a=e.demoOnly?"demo moduÅu":"start";return(0,r.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.id,void(b(!1),f(!1),window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("startOnboardingFlow",{detail:{flowId:t,demo:!0}}))},80))},className:"onboarding-picker-row",title:"Pokaż wprowadzenie: ".concat(e.label),children:[(0,r.jsx)("span",{className:"onboarding-picker-row-icon",children:(0,r.jsx)(t,{className:"h-4 w-4"})}),(0,r.jsxs)("span",{className:"min-w-0",children:[(0,r.jsxs)("span",{className:"onboarding-picker-row-heading",children:[(0,r.jsx)("span",{className:"onboarding-picker-row-title",children:e.label}),(0,r.jsx)("span",{className:"onboarding-picker-badge",children:a})]}),(0,r.jsx)("span",{className:"onboarding-picker-row-desc",children:e.description})]}),(0,r.jsx)("span",{className:"onboarding-picker-arrow",children:(0,r.jsx)(m.A,{className:"h-4 w-4"})})]},e.id)})})}),(0,r.jsxs)("div",{className:"onboarding-picker-footer",children:[(0,r.jsx)("p",{className:"onboarding-picker-footer-text",children:"ModuÅy pÅatne sÄ
tu tylko pokazem procesu. Realny dostÄp nadal wynika z aktywnej subskrypcji."}),(0,r.jsx)("button",{type:"button",onClick:()=>b(!1),className:"onboarding-picker-secondary",children:"Zamknij"})]})]})}
1),!d&&(0,r.jsx)(I,{plan:t,isActive:a,started:x})]})}},31265:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,52619,23)),Promise.resolve().then(a.bind(a,98012)),Promise.resolve().then(a.bind(a,54886)),Promise.resolve().then(a.bind(a,41897)),Promise.resolve().then(a.bind(a,4924)),Promise.resolve().then(a.bind(a,28324))},41897:(e,t,a)=>{"use strict";a.d(t,{default:()=>W});var r=a(95155),i=a(52619),s=a.n(i),o=a(15239),n=a(20063),l=a(12115),d=a(47650),c=a(17910),p=a(56154),u=a(68854),m=a(99708),b=a(78519),x=a(72372),f=a(91169),h=a(80647),w=a(46398),j=a(67030),g=a(18085),y=a(78192),k=a(90889),v=a(6926),z=a(30814),N=a(80598),P=a(15870),_=a(1524),A=a(87763),S=a(77676),C=a(3007),M=a(54485),I=a(9280),L=a(73715);let E={free:{color:"text-[#484f58]",icon:c.A},starter:{color:"text-[#3fb950]",icon:p.A},professional:{color:"text-[#2f81f7]",icon:u.A},business:{color:"text-[#bc62ff]",icon:u.A},pay_per_project:{color:"text-[#e3b341]",icon:p.A},enterprise:{color:"text-[#bc62ff]",icon:u.A}},T="2026-09-30T21:00:49.100Z",D="rounded-xl border border-[#b8860b]/70 bg-[#b8860b]/10 text-white shadow-[inset_0_0_0_1px_rgba(184,134,11,0.18),0_0_14px_rgba(184,134,11,0.24)]";function W(e){var t;let{subscription:a,projectsUsed:i,userRole:c="user",isSalesPartner:W=!1}=e,R=(0,n.usePathname)(),O=(0,n.useSearchParams)(),[F,K]=(0,l.useState)({permits:0,tenders:0});(0,l.useEffect)(()=>{let e=e=>{let{module:t,count:a}=e.detail;K(e=>({...e,[t]:(e[t]||0)+a}))};return window.addEventListener("newLeads",e),()=>window.removeEventListener("newLeads",e)},[]),(0,l.useEffect)(()=>{R.startsWith("/radar/permits")&&K(e=>({...e,permits:0})),R.startsWith("/radar/tenders")&&K(e=>({...e,tenders:0}))},[R]);let Z=(0,L.K)(a),B=Z&&(null==a?void 0:a.plan)||"free",U=E[B]||E.free,q=U.icon,V=null!=(t=null!=i?i:null==a?void 0:a.projects_used)?t:0,H=(0,I.v4)(B),X=H>=999?H:H+Math.max(0,Number((null==a?void 0:a.bonus_projects)||0)),J=999===X?5:Math.min(V/X*100,100),G=R.startsWith("/radar/permits"),Y=R.startsWith("/radar/tenders"),$=F.permits>0,Q=F.tenders>0,ee=(0,I.Nu)(B,"radar_permits"),et=O.get("module"),ea="/projects/new"===R,er=(null==R?void 0:R.startsWith("/projects/"))&&!ea,ei="/dashboard"===R&&"knr"!==et||ea&&"knr"!==et||!!er&&"standard"===et,es="/dashboard"===R&&"knr"===et||ea&&"knr"===et||!!er&&"standard"!==et;function eo(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"absolute left-0 top-1/2 h-5 w-[2px] -translate-y-1/2 rounded-r-full bg-[#e3b341] shadow-[0_0_10px_rgba(227,179,65,0.9)]","aria-hidden":"true"}),(0,r.jsxs)("span",{className:"absolute right-3 top-1/2 flex h-2 w-2 -translate-y-1/2 items-center justify-center","aria-hidden":"true",children:[(0,r.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-[#b8860b] opacity-35"}),(0,r.jsx)("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-[#c9a227] shadow-[0_0_9px_rgba(184,134,11,0.9)]"})]})]})}function en(e){let{text:t,anchorRef:a,visible:i,locked:s}=e,[o,n]=(0,l.useState)({top:0,left:0});return((0,l.useEffect)(()=>{if(i&&a.current){let e=a.current.getBoundingClientRect();n({top:e.top+e.height/2,left:e.right+12})}},[i,a]),i&&"undefined"!=typeof document)?(0,d.createPortal)((0,r.jsx)("div",{className:"".concat(s?"pointer-events-auto":"pointer-events-none"," fixed z-[9999]"),style:{top:o.top,left:o.left,transform:"translateY(-50%)"},children:(0,r.jsxs)("div",{style:{position:"relative",background:"#0d1117",border:s?"1px solid rgba(201, 162, 39, 0.55)":"1px solid #30363d",borderRadius:8,padding:s?"12px 14px":"8px 12px",fontSize:12,lineHeight:1.45,color:"#ffffff",width:"max-content",maxWidth:s?280:220,boxShadow:"0 14px 34px rgba(0,0,0,0.5)",animation:"tooltipIn 150ms ease-out"},children:[(0,r.jsx)("div",{style:{position:"absolute",left:-5,top:"50%",transform:"translateY(-50%) rotate(45deg)",width:10,height:10,background:"#0d1117",borderLeft:s?"1px solid rgba(201, 162, 39, 0.55)":"1px solid #30363d",borderBottom:s?"1px solid rgba(201, 162, 39, 0.55)":"1px solid #30363d"}}),t]})}),document.body):null}function el(e){let{tooltip:t,children:a,locked:i,lockContent:s}=e,o=(0,l.useRef)(null),[n,d]=(0,l.useState)(!1),c=(0,l.useRef)(),p=(0,l.useCallback)(()=>{clearTimeout(c.current),c.current=setTimeout(()=>d(!0),80)},[]),u=(0,l.useCallback)(()=>{clearTimeout(c.current),d(!1)},[]);if(!t&&!s)return(0,r.jsx)(r.Fragment,{children:a});let m=i&&s?s:t;return(0,r.jsxs)("div",{ref:o,onMouseEnter:p,onMouseLeave:u,children:[a,(0,r.jsx)(en,{text:m,anchorRef:o,visible:n,locked:i})]})}function ed(e){let{href:t,icon:a,label:i,featureKey:o,active:n,iconColor:l,tooltip:d,children:c}=e,p=o?(0,I.CR)(o):null;if(o&&!(0,I.Nu)(B,o)){let e=(0,r.jsxs)("div",{className:"space-y-2",children:[d&&(0,r.jsx)("p",{className:"text-[12px] font-semibold leading-5",style:{color:"#ffffff"},children:d}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] font-black text-[#D4A843]",children:[(0,r.jsx)(m.A,{className:"h-3.5 w-3.5"}),"Wymaga: ",(0,I.WV)(p||"free")]}),(0,r.jsx)(s(),{href:"/subscription",className:"pointer-events-auto inline-flex items-center text-[12px] font-bold text-[#58a6ff] hover:text-[#79c0ff]",children:"Uaktualnij plan â"})]});return(0,r.jsx)(el,{tooltip:d,locked:!0,lockContent:e,children:(0,r.jsxs)(s(),{href:t,"aria-label":"".concat(i," - dostÄp od ").concat((0,I.WV)(p||"free")),className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium text-[#8b949e] rounded-md relative",children:[(0,r.jsx)(a,{className:"w-4 h-4 text-[#484f58]"}),(0,r.jsx)("span",{className:"opacity-60",children:i}),(0,r.jsx)(m.A,{className:"w-3 h-3 ml-auto text-[#8b949e]"})]})})}return(0,r.jsx)(el,{tooltip:d,children:(0,r.jsxs)(s(),{href:t,className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors relative overflow-hidden ".concat(n?"".concat(D," pr-8"):"border border-transparent text-[#c9d1d9] hover:text-white hover:bg-[#161b22]"),children:[n&&(0,r.jsx)(eo,{}),(0,r.jsx)(a,{className:"w-4 h-4 ".concat(l||(n?"text-[#e3b341]":"text-[#8b949e]"))}),(0,r.jsx)("span",{children:i}),c]})})}function ec(e){let{active:t,hasNew:a,color:i}=e;return(0,r.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center",children:a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex rounded-full ".concat(i," opacity-75"),style:{width:12,height:12,animationDuration:"0.6s"}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full ".concat(i),style:{width:9,height:9}})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex rounded-full ".concat(i," ").concat(t?"opacity-40":"opacity-20"),style:{width:t?8:6,height:t?8:6}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full ".concat(i," ").concat(t?"opacity-100":"opacity-30"),style:{width:t?6:4,height:t?6:4}})]})})}return(0,r.jsxs)("aside",{id:"app-sidebar",className:"app-scrollbar w-[240px] shrink-0 bg-[#010409] border-r border-[#30363d] text-[#8b949e] h-screen flex flex-col sticky top-0 overflow-y-auto",children:[(0,r.jsx)("div",{className:"pt-5 px-5 pb-4 border-b border-[#30363d]",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(o.default,{src:"/logo.png",alt:"Kosztorysant.AI",width:40,height:40,className:"rounded-lg"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-[10px] uppercase text-[#484f58] block font-semibold tracking-widest",children:"System Ekspercki"}),(0,r.jsxs)("h1",{className:"text-[16px] text-white font-bold leading-tight",children:["Kosztorysant",(0,r.jsx)("span",{className:"text-[#B8860B]",children:".AI"})]}),(0,r.jsx)("p",{className:"text-[10px] text-[#484f58] mt-0",children:"CRM + Kosztorysowanie"})]})]})}),(0,r.jsxs)("div",{className:"px-4 py-3 border-b border-[#30363d]",children:[(0,r.jsxs)(s(),{href:"/subscription",className:"block group",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center ".concat(Z?"bg-[#2f81f7]/10":"bg-[#21262d]"),children:(0,r.jsx)(q,{className:"w-3.5 h-3.5 ".concat(U.color)})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("div",{className:"text-[12px] font-bold ".concat(U.color),children:"free"===B?"Testowy":(0,I.WV)(B)}),(0,r.jsx)("div",{className:"text-[10px] text-[#484f58]",children:Z?"Aktywny":"Darmowa pr\xf3ba"})]}),(0,r.jsx)(b.A,{className:"w-3.5 h-3.5 text-[#484f58] group-hover:text-[#8b949e] transition-colors"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"flex-1 bg-[#21262d] rounded-full h-1.5 overflow-hidden",children:(0,r.jsx)("div",{className:"h-full rounded-full transition-all ".concat(J>80?"bg-[#f78166]":J>50?"bg-[#e3b341]":"bg-[#3fb950]"),style:{width:"".concat(Math.max(J,3),"%")}})}),(0,r.jsxs)("span",{className:"text-[10px] text-[#484f58] tabular-nums shrink-0",children:[V,"/",999===X?"â":X]})]})]}),(!Z||"free"===B)&&(0,r.jsxs)(s(),{href:"/subscription?tab=plans",className:"brand-gradient-cta mt-2 flex items-center justify-center gap-1.5 w-full px-2.5 py-1.5 rounded-md text-[11px] font-black transition-colors active:scale-[0.99]",children:[(0,r.jsx)(u.A,{className:"w-3.5 h-3.5"}),"Plan i limity"]})]}),(0,r.jsxs)("nav",{className:"flex-1 px-3 py-4 space-y-0.5",children:[(0,r.jsx)("div",{className:"text-[10px] font-bold text-[#b8860b] px-3 pt-2 pb-1.5 uppercase tracking-widest",children:"Menu gÅ\xf3wne"}),(0,r.jsx)(ed,{href:"/dashboard?module=standard",icon:x.A,label:"Oferty",active:ei,tooltip:"Proste zestawienia materiaÅ\xf3w, robocizny i sprzÄtu bez Przedmiaru i KNR"}),(0,r.jsx)(ed,{href:"/clients",icon:f.A,label:"Klienci",active:R.startsWith("/clients"),tooltip:"Klienci i odbiorcy Twoich ofert"}),(0,r.jsx)(ed,{href:"/subscription?tab=plans",icon:b.A,label:"Plan i limity",active:R.startsWith("/subscription")}),(0,r.jsxs)("details",{open:es||!ei&&!R.startsWith("/clients")&&!R.startsWith("/subscription")||(0,I.Nu)(B,"in_progress"),className:"pt-2",children:[(0,r.jsx)("summary",{className:"cursor-pointer px-3 py-2 text-[12px] text-[#c9d1d9]",children:"PozostaÅe narzÄdzia"}),(0,r.jsx)(ed,{href:"/dashboard?module=knr",icon:h.A,label:"Kosztorysy KNR",active:es,tooltip:"PeÅny proces kosztorysowy z Przedmiarem, KNR i nakÅadami R/M/S"}
1),(0,r.jsx)("span",{"data-tour":"nav-in-progress",children:(0,r.jsx)(ed,{href:"/in-progress",icon:p.A,label:"Realizacje",active:"/in-progress"===R,featureKey:"in_progress",tooltip:"Professional: 2 realizacje na okres. Business: bez limitu."})}),(0,r.jsx)("div",{className:"border-t border-[#21262d] mx-3 my-2"}),(0,r.jsx)(ed,{href:"/suppliers",icon:w.A,label:"Kartoteka Dostawc\xf3w",active:(null==R?void 0:R.startsWith("/suppliers"))||!1,tooltip:"Baza dostawc\xf3w materiaÅ\xf3w i usÅug"}),(0,r.jsx)(ed,{href:"/cennik",icon:j.A,label:"Cenniki Dostawc\xf3w",active:"/cennik"===R||(null==R?void 0:R.startsWith("/cennik/"))||!1,featureKey:"price_catalog",tooltip:"Cenniki dostawc\xf3w: Starter do 100 pozycji, Professional bez limitu"}),(0,r.jsx)(ed,{href:"/cennik-robocizny",icon:h.A,label:"Cennik robocizny",active:"/cennik-robocizny"===R}),(0,r.jsx)("div",{className:"border-t border-[#21262d] mx-3 my-2"}),(0,r.jsx)(ed,{href:"/submitted-offers",icon:g.A,label:"ZÅożone oferty",active:(null==R?void 0:R.startsWith("/submitted-offers"))||!1,tooltip:"Zestawienie ofert, kt\xf3re zostaÅy wygenerowane, pobrane albo oznaczone jako zÅożone klientowi"}),(0,r.jsx)("div",{className:"border-t border-[#21262d] mx-3 my-2"}),(0,r.jsx)(ed,{href:"/assistant",icon:y.A,label:"Wsparcie AI",active:(null==R?void 0:R.startsWith("/assistant"))||!1,featureKey:"ai_assistant",tooltip:"Ekspert branży budowlanej do rozm\xf3w technicznych, analiz wytycznych i diagnoz"}),(0,r.jsx)("div",{"data-tour":"nav-radar",className:"text-[10px] font-bold text-[#b8860b] px-3 pt-5 pb-1.5 uppercase tracking-widest",children:"Radar CRM"}),ee?(0,r.jsx)(el,{tooltip:"Monitoruj nowe pozwolenia na budowÄ w Twoim regionie",children:(0,r.jsxs)(s(),{href:"/radar/permits",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors relative overflow-hidden ".concat(G?"".concat(D," pr-8"):"border border-transparent text-[#c9d1d9] hover:text-white hover:bg-[#1a2332]"),children:[G&&(0,r.jsx)(eo,{}),(0,r.jsx)(k.A,{className:"w-4 h-4 ".concat(G?"text-[#e3b341]":"text-[#8b949e]")}),(0,r.jsx)("span",{children:"Pozwolenia RWDZ"}),!G&&(0,r.jsx)(ec,{active:G,hasNew:$,color:"bg-blue-400"})]})}):(0,r.jsx)(ed,{href:"/radar/permits",icon:k.A,label:"Pozwolenia RWDZ",featureKey:"radar_permits",tooltip:"Monitoruj nowe pozwolenia na budowÄ w Twoim regionie"}),ee?(0,r.jsx)(el,{tooltip:"Åledź przetargi publiczne z BZP, TED i Bazy KonkurencyjnoÅci pasujÄ
ce do Twoich kompetencji",children:(0,r.jsxs)(s(),{href:"/radar/tenders",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors relative overflow-hidden ".concat(Y?"".concat(D," pr-8"):"border border-transparent text-[#c9d1d9] hover:text-white hover:bg-[#1e1a2e]"),children:[Y&&(0,r.jsx)(eo,{}),(0,r.jsx)(v.A,{className:"w-4 h-4 ".concat(Y?"text-[#e3b341]":"text-[#8b949e]")}),(0,r.jsx)("span",{children:"Baza Przetarg\xf3w"}),!Y&&(0,r.jsx)(ec,{active:Y,hasNew:Q,color:"bg-[#D4A843]"})]})}):(0,r.jsx)(ed,{href:"/radar/tenders",icon:v.A,label:"Baza Przetarg\xf3w",featureKey:"radar_tenders",tooltip:"Åledź przetargi publiczne z BZP, TED i Bazy KonkurencyjnoÅci pasujÄ
ce do Twoich kompetencji"}),ee&&(0,r.jsx)(el,{tooltip:"Dodaj nowy filtr monitoringu - wybierz region i branżÄ",children:(0,r.jsxs)(s(),{href:"/radar/new",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[12px] font-medium text-[#484f58] hover:text-[#c9d1d9] hover:bg-[#161b22] rounded-md transition-colors ml-1",children:[(0,r.jsx)(z.A,{className:"w-3.5 h-3.5"}),"+ Nowa ReguÅa Radaru"]})})]}),"admin"===c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"text-[10px] font-bold text-[#b8860b] px-3 pt-5 pb-1.5 uppercase tracking-widest",children:"Admin"}),(0,r.jsxs)(s(),{href:"/admin",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors ".concat("/admin"===R?"".concat(D," relative overflow-hidden pr-8"):"border border-transparent text-[#2f81f7]/60 hover:text-[#2f81f7] hover:bg-[#2f81f7]/5"),children:["/admin"===R&&(0,r.jsx)(eo,{}),(0,r.jsx)(N.A,{className:"w-4 h-4 ".concat("/admin"===R?"text-[#e3b341]":"text-[#2f81f7]/40")}),"SaaS cockpit"]}),(0,r.jsxs)(s(),{href:"/admin/users",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors ".concat("/admin/users"===R?"".concat(D," relative overflow-hidden pr-8"):"border border-transparent text-[#f78166]/60 hover:text-[#f78166] hover:bg-[#f78166]/5"),children:["/admin/users"===R&&(0,r.jsx)(eo,{}),(0,r.jsx)(P.A,{className:"w-4 h-4 ".concat("/admin/users"===R?"text-[#e3b341]":"text-[#f78166]/40")}),"Użytkownicy"]}),(0,r.jsxs)(s(),{href:"/admin/partners",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors ".concat("/admin/partners"===R?"".concat(D," relative overflow-hidden pr-8"):"border border-transparent text-[#2f81f7]/60 hover:text-[#2f81f7] hover:bg-[#2f81f7]/5"),children:["/admin/partners"===R&&(0,r.jsx)(eo,{}),(0,r.jsx)(_.A,{className:"w-4 h-4 ".concat("/admin/partners"===R?"text-[#e3b341]":"text-[#2f81f7]/40")}),"Partnerzy"]}),(0,r.jsxs)(s(),{href:"/admin/invoices",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors ".concat("/admin/invoices"===R?"".concat(D," relative overflow-hidden pr-8"):"border border-transparent text-[#3fb950]/60 hover:text-[#3fb950] hover:bg-[#3fb950]/5"),children:["/admin/invoices"===R&&(0,r.jsx)(eo,{}),(0,r.jsx)(A.A,{className:"w-4 h-4 ".concat("/admin/invoices"===R?"text-[#e3b341]":"text-[#3fb950]/40")}),"Faktury i KSeF"]}),(0,r.jsxs)(s(),{href:"/admin/import-events",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors ".concat("/admin/import-events"===R?"".concat(D," relative overflow-hidden pr-8"):"border border-transparent text-[#8b949e] hover:text-[#c9d1d9] hover:bg-[#161b22]"),children:["/admin/import-events"===R&&(0,r.jsx)(eo,{}),(0,r.jsx)(S.A,{className:"w-4 h-4 ".concat("/admin/import-events"===R?"text-[#e3b341]":"text-[#6e7681]")}),"Rejestr import\xf3w"]}),(0,r.jsxs)(s(),{href:"/admin/ai-governance",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors ".concat("/admin/ai-governance"===R?"".concat(D," relative overflow-hidden pr-8"):"border border-transparent text-[#58a6ff]/60 hover:text-[#58a6ff] hover:bg-[#58a6ff]/5"),children:["/admin/ai-governance"===R&&(0,r.jsx)(eo,{}),(0,r.jsx)(C.A,{className:"w-4 h-4 ".concat("/admin/ai-governance"===R?"text-[#e3b341]":"text-[#58a6ff]/40")}),"AI governance"]}),(0,r.jsxs)(s(),{href:"/admin/audit",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors ".concat("/admin/audit"===R?"".concat(D," relative overflow-hidden pr-8"):"border border-transparent text-[#f78166]/60 hover:text-[#f78166] hover:bg-[#f78166]/5"),children:["/admin/audit"===R&&(0,r.jsx)(eo,{}),(0,r.jsx)(M.A,{className:"w-4 h-4 ".concat("/admin/audit"===R?"text-[#e3b341]":"text-[#f78166]/40")}),"Audyt admina"]})]}),W&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"text-[10px] font-bold text-[#3fb950]/60 px-3 pt-5 pb-1.5 uppercase tracking-widest",children:"Partner"}),(0,r.jsxs)(s(),{href:"/partner",className:"flex items-center gap-2.5 w-full px-3 py-2 text-[13px] font-medium rounded-md transition-colors ".concat("/partner"===R?"".concat(D," relative overflow-hidden pr-8"):"border border-transparent text-[#3fb950]/60 hover:text-[#3fb950] hover:bg-[#3fb950]/5"),children:["/partner"===R&&(0,r.jsx)(eo,{}),(0,r.jsx)(_.A,{className:"w-4 h-4 ".concat("/partner"===R?"text-[#e3b341]":"text-[#3fb950]/40")}),"Panel Partnera"]})]}),(0,r.jsx)("div",{className:"border-t border-[#21262d] mx-3 my-3"}),(0,r.jsx)(ed,{href:"/settings",icon:P.A,label:"Ustawienia konta",active:(null==R?void 0:R.startsWith("/settings"))||!1,tooltip:"Profil firmy, bezpieczeÅstwo konta i ustawienia dostÄpu"})]}),(0,r.jsxs)("div",{className:"border-t border-[#30363d] px-4 py-3 text-[11px] text-[#8b949e]",children:["Kosztorysant.AI \xb7 v","23.1",T?" \xb7 "+function(e){let t=e.match(/^(\d{4})-(\d{2})-(\d{2})/);return t?"".concat(t[3],".").concat(t[2],".").concat(t[1]):"dzisiaj"}(T):""]})]})}},54886:(e,t,a)=>{"use strict";a.d(t,{default:()=>p});var r=a(95155),i=a(12115),s=a(5379);function o(e){let{children:t,...a}=e;return(0,r.jsx)(s.N,{...a,children:t})}var n=a(18720);let l=e=>{let{...t}=e;return(0,r.jsx)(n.l$,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:border-[#30363d] group-[.toaster]:bg-[#0d1117] group-[.toaster]:text-[#e6edf3] group-[.toaster]:shadow-lg",description:"group-[.toast]:text-[#8b949e]",actionButton:"group-[.toast]:bg-[#B8860B] group-[.toast]:text-white",cancelButton:"group-[.toast]:bg-[#21262d] group-[.toast]:text-[#8b949e]"}},...t})};var d=a(81045);function c(){return(0,i.useEffect)(()=>{let e=!1;return async function(){let t=(0,d.FU)();if(t)try{let a=await (0,d.kF)(t);e||!a.attempted||a.shouldRetry||(0,d.K1)()}catch(e){}}(),()=>{e=!0}},[]),null}function p(e){let{children:t}=e;return(0,i.useEffect)(()=>(document.documentElement.classList.remove("dark"),window.localStorage.setItem("theme","light"),document.body.classList.add("app-theme-scope"),()=>{document.body.classList.remove("app-theme-scope")}),[]),(0,r.jsx)(o,{attribute:"class",defaultTheme:"light",forcedTheme:"light",enableSystem:!1,disableTransitionOnChange:!1,children:(0,r.jsxs)("div",{className:"app-theme-scope contents",children:[(0,r.jsx)(c,{}),t,(0,r.jsx)(l,{richColors:!0,position:"top-right"})]})})}},62356:(e,t,a)=>{"use strict";function r(e){var t;fetch("/api/onboarding/events",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_type:e.eventType,goal:e.goal||null,step_i
1d:e.stepId||null,step_index:null!=(t=e.stepIndex)?t:null,metadata:e.metadata||{}}),keepalive:!0}).catch(()=>{})}a.d(t,{v:()=>r})},73715:(e,t,a)=>{"use strict";a.d(t,{K:()=>i});let r=new Set(["active","trialing"]);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!e||!r.has(e.status||""))return!1;if(e&&("stripe"===e.management_source||e.stripe_subscription_id)||null==e.management_source&&null==e.access_expires_at)return!0;let a=e.access_expires_at||e.current_period_end;if(!a)return!1;let i=new Date(a).getTime();return Number.isFinite(i)&&i>t.getTime()}},81045:(e,t,a)=>{"use strict";a.d(t,{FU:()=>n,Ij:()=>s,K1:()=>o,U3:()=>i,kF:()=>l});let r="kosztorysant.pendingAttribution.v1";function i(e){if("string"!=typeof e)return null;let t=e.trim().toUpperCase();return/^[A-Z0-9_-]{3,32}$/.test(t)?t:null}function s(e){let t=i(e.referralCode),a=i(e.partnerCode);if(!t&&!a)return;let s={...t?{referralCode:t}:{},...a?{partnerCode:a}:{},...e.email?{email:e.email.trim().toLowerCase()}:{},createdAt:Date.now()};window.localStorage.setItem(r,JSON.stringify(s))}function o(){window.localStorage.removeItem(r)}function n(){try{let e=window.localStorage.getItem(r);if(!e)return null;let t=JSON.parse(e),a=i(t.referralCode),s=i(t.partnerCode),n="number"==typeof t.createdAt?t.createdAt:0;if(!a&&!s||!n||Date.now()-n>12096e5)return o(),null;return{...a?{referralCode:a}:{},...s?{partnerCode:s}:{},..."string"==typeof t.email?{email:t.email}:{},createdAt:n}}catch(e){return o(),null}}async function l(e){var t,a;let r=i(e.referralCode),s=i(e.partnerCode);if(!r&&!s)return{attempted:!1,linked:!1,shouldRetry:!1};let o=!1,n=!1,l=!1,c=null;if(r){o=!0;let e=await d("/api/referrals/validate",{code:r});(401===e.status||429===e.status||e.status>=500)&&(l=!0),e.ok&&(null==(t=e.data)?void 0:t.valid)?n=!0:s||l||(c=r)}let p=s||c;if(p){o=!0;let t=await d("/api/partner/validate",{code:p,...e.email?{email:e.email}:{}});(401===t.status||429===t.status||t.status>=500)&&(l=!0),t.ok&&(null==(a=t.data)?void 0:a.valid)&&(n=!0)}return{attempted:o,linked:n,shouldRetry:l}}async function d(e,t){let a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await a.json().catch(()=>({}));return{ok:a.ok,status:a.status,data:r}}},98012:(e,t,a)=>{"use strict";a.d(t,{default:()=>j});var r=a(95155),i=a(12115),s=a(52619),o=a.n(s),n=a(15239),l=a(9540),d=a(19408),c=a(5937),p=a(90163),u=a(89442),m=a(24033),b=a(20508),x=a(17910),f=a(78519),h=a(84926),w=a(20063);function j(e){var t,a,s,j;let{user:g,companyProfile:y}=e,k=(0,w.useSearchParams)(),[v,z]=(0,i.useState)(!1),N=(0,i.useRef)(null);(0,i.useEffect)(()=>{let e=e=>{N.current&&!N.current.contains(e.target)&&z(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let P=(null==y?void 0:y.first_name)&&(null==y?void 0:y.last_name)?"".concat(y.first_name," ").concat(y.last_name):(null==g||null==(t=g.email)?void 0:t.split("@")[0])||"User",_=(null==y?void 0:y.company_name)||(null==g||null==(a=g.user_metadata)?void 0:a.company_name)||"Twoja Firma",A=null==y?void 0:y.logo_url,S="flex h-9 w-9 items-center justify-center rounded-xl border border-[#30363d] bg-[#0d1117] text-[#8b949e] transition-colors hover:border-[#b8860b]/70 hover:bg-[#b8860b]/10 hover:text-[#e3b341]",C="flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-[13px] font-semibold text-[#c9d1d9] transition-colors hover:bg-[#b8860b]/10 hover:text-white",M="knr"===k.get("module")?"knr":"standard",I="knr"===M?"Nowy kosztorys KNR":"Nowa oferta";return(0,r.jsx)("header",{className:"app-chrome sticky top-0 z-50 w-full border-b border-[#30363d] !bg-[#010409] text-[#c9d1d9] shadow-[0_1px_0_rgba(255,255,255,0.02)]",style:{backgroundColor:"#010409"},children:(0,r.jsxs)("div",{className:"flex w-full items-center bg-[#010409] px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,r.jsx)("button",{id:"open-app-navigation",type:"button",onClick:()=>window.dispatchEvent(new Event("openAppNavigation")),"aria-haspopup":"dialog","aria-controls":"mobile-app-navigation",className:"text-[#8b949e] transition-colors hover:text-white md:hidden",title:"Otw\xf3rz menu","aria-label":"Otw\xf3rz menu",children:(0,r.jsx)(l.A,{className:"w-6 h-6"})}),(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:"flex h-8 w-8 items-center justify-center overflow-hidden rounded-xl border border-[#30363d] bg-[#0d1117] shadow-[0_0_14px_rgba(184,134,11,0.10)]",children:A?(0,r.jsx)(n.default,{src:A,alt:"Logo",width:32,height:32,className:"w-full h-full object-contain"}):(0,r.jsx)(d.A,{className:"w-4 h-4 text-[#8b949e]"})}),(0,r.jsx)("span",{className:"hidden max-w-[44vw] truncate text-[13px] font-bold tracking-tight text-[#e6edf3] sm:inline-block xl:max-w-[520px]",children:_})]})]}),(0,r.jsx)("div",{className:"hidden min-w-0 flex-1 justify-center px-4 lg:flex",children:(0,r.jsxs)("a",{href:"mailto:[email protected]?subject=Pytanie%20o%20Kosztorysant.ai",className:"".concat("inline-flex h-8 shrink-0 items-center justify-center gap-2 px-2 text-[12px] font-medium text-[#d4a843] transition-colors hover:text-[#f0d97a]"," max-w-full"),title:"Napisz do nas: [email protected]","aria-label":"Masz pytania? Porozmawiajmy: [email protected]",children:[(0,r.jsx)(c.A,{className:"relative h-3.5 w-3.5 shrink-0"}),(0,r.jsx)("span",{className:"relative hidden shrink-0 xl:inline",children:"Masz pytania? Porozmawiajmy:"}),(0,r.jsx)("span",{className:"relative truncate font-medium text-[#f0d97a]",children:"[email protected]"})]})}),(0,r.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-3",children:[(0,r.jsx)(o(),{href:"/projects/new?module=".concat(M),className:"hidden sm:flex ".concat(S),title:I,"aria-label":I,children:(0,r.jsx)(p.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{id:"restart-tour-btn",onClick:()=>window.dispatchEvent(new CustomEvent("restartTour")),title:"Pokaż wprowadzenie ponownie","aria-label":"Pokaż wprowadzenie ponownie",className:S,children:(0,r.jsx)(u.A,{className:"w-4 h-4"})}),(0,r.jsxs)("div",{className:"relative ml-2",ref:N,children:[(0,r.jsxs)("button",{onClick:()=>z(!v),title:"Otw\xf3rz menu konta","aria-label":"Otw\xf3rz menu konta",className:"flex items-center gap-1.5 rounded-full border bg-[#0d1117] p-1 transition-colors ".concat(v?"border-[#b8860b]/80 shadow-[0_0_14px_rgba(184,134,11,0.24)]":"border-[#30363d] hover:border-[#b8860b]/70"),children:[(0,r.jsx)("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-[#7c3aed] to-[#2f81f7] text-[10px] font-black text-white ring-1 ring-white/10",children:((null==y||null==(s=y.first_name)?void 0:s[0])||(null==g||null==(j=g.email)?void 0:j[0])||"U").toUpperCase()}),(0,r.jsx)(m.A,{className:"h-3 w-3 text-[#8b949e] transition-transform ".concat(v?"rotate-180 text-[#d4a843]":"")})]}),v&&(0,r.jsxs)("div",{className:"absolute right-0 z-50 mt-3 w-72 overflow-hidden rounded-2xl border border-[#30363d] !bg-[#010409] !text-[#c9d1d9] shadow-[0_24px_60px_rgba(0,0,0,0.55),0_0_24px_rgba(184,134,11,0.10)] animate-in fade-in slide-in-from-top-2 duration-150",style:{backgroundColor:"#010409",color:"#c9d1d9"},children:[(0,r.jsxs)("div",{className:"border-b border-[#30363d] !bg-[#0d1117] px-4 py-3",style:{backgroundColor:"#0d1117"},children:[(0,r.jsx)("p",{className:"truncate text-sm font-black text-[#e6edf3]",children:P}),(0,r.jsx)("p",{className:"truncate text-xs text-[#8b949e]",children:null==g?void 0:g.email}),"Twoja Firma"!==_&&(0,r.jsxs)("p",{className:"mt-1 flex items-center gap-1 text-[10px] text-[#8b949e]",children:[(0,r.jsx)(d.A,{className:"w-3 h-3"})," ",_]})]}),(0,r.jsxs)("div",{className:"!bg-[#010409] py-1.5",style:{backgroundColor:"#010409"},children:[(0,r.jsxs)(o(),{href:"/settings#profil-firma",onClick:()=>z(!1),className:C,title:"Przejdź do profilu i danych firmy",children:[(0,r.jsx)(b.A,{className:"w-4 h-4 text-[#8b949e]"}),"Profil i firma"]}),(0,r.jsxs)(o(),{href:"/settings#bezpieczenstwo",onClick:()=>z(!1),className:C,title:"Przejdź do ustawieÅ bezpieczeÅstwa konta",children:[(0,r.jsx)(x.A,{className:"w-4 h-4 text-[#8b949e]"}),"BezpieczeÅstwo konta"]}),(0,r.jsxs)(o(),{href:"/subscription",onClick:()=>z(!1),className:C,title:"Przejdź do subskrypcji i rozliczeÅ",children:[(0,r.jsx)(f.A,{className:"w-4 h-4 text-[#8b949e]"}),"ZarzÄ
dzaj subskrypcjÄ
"]})]}),(0,r.jsx)("div",{className:"border-t border-[#30363d] !bg-[#010409] py-1.5",style:{backgroundColor:"#010409"},children:(0,r.jsx)("form",{action:"/auth/signout",method:"post",children:(0,r.jsxs)("button",{type:"submit",title:"Wyloguj siÄ z aplikacji",className:"mx-2 flex w-[calc(100%-1rem)] items-center gap-3 rounded-xl px-3 py-2.5 text-[13px] font-bold text-[#f85149] transition-colors hover:bg-[#f85149]/10",children:[(0,r.jsx)(h.A,{className:"w-4 h-4"}),"Wyloguj siÄ"]})})})]})]})]})]})})}}},e=>{e.O(0,[2619,8720,1356,3367,4238,8441,1255,7358],()=>e(e.s=31265)),_N_E=e.O()}]);
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.