PageSourceSearch

https://www.bostadscentralen.se/_next/static/chunks/7671.846c6d22669f8522.js

js bostadscentralen.se collected 2026-10-06 20:07:59 UTC 16,433 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7671],{7671:(e,t,s)=>{s.r(t),s.d(t,{default:()=>j});var l=s(5155),r=s(2115),a=s(4511),i=s(2890),n=s(1834),c=s(3998),o=s(8720),d=s(9300),h=s(5229),x=s(1362),m=s(6983),f=s(5299);let u=e=>{let{className:t=""}=e;return(0,l.jsxs)("div",{className:"flex items-center justify-center gap-2 ".concat(t),children:[(0,l.jsx)("div",{className:"h-8 flex items-center",children:(0,l.jsxs)("svg",{width:"45",height:"28",viewBox:"0 0 45 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("rect",{width:"59",height:"32",rx:"4",fill:"white"}),(0,l.jsx)("path",{d:"M0 0h45v28H0V0Z",fill:"#000"}),(0,l.jsx)("path",{d:"M27.91 4.704H17.093v17.589h10.815V4.704h.002Z",fill:"#FF5F00"}),(0,l.jsx)("path",{d:"M18.208 13.5a11.126 11.126 0 0 1 1.127-4.889 11.175 11.175 0 0 1 3.163-3.904 11.276 11.276 0 0 0-11.852-1.266 11.217 11.217 0 0 0-4.611 4.127 11.15 11.15 0 0 0 0 11.868 11.217 11.217 0 0 0 4.612 4.126 11.276 11.276 0 0 0 11.85-1.266 11.176 11.176 0 0 1-3.162-3.905 11.126 11.126 0 0 1-1.127-4.891Z",fill:"#EB001B"}),(0,l.jsx)("path",{d:"M39.602 20.432v-.36h.156v-.075h-.372v.074h.147v.36l.069.001Zm.72 0v-.435h-.112l-.13.31-.132-.31h-.112v.435h.081v-.33l.122.283h.084l.122-.283v.33h.078-.001Zm.353-6.932a11.15 11.15 0 0 1-1.711 5.934 11.218 11.218 0 0 1-4.613 4.127 11.275 11.275 0 0 1-11.853-1.268 11.194 11.194 0 0 0 3.163-3.906 11.146 11.146 0 0 0 0-9.778 11.193 11.193 0 0 0-3.163-3.905A11.276 11.276 0 0 1 34.35 3.436a11.216 11.216 0 0 1 4.614 4.126 11.149 11.149 0 0 1 1.711 5.935v.003Z",fill:"#F79E1B"})]})}),(0,l.jsx)("div",{className:"h-8 flex items-center",children:(0,l.jsxs)("svg",{width:"45",height:"28",viewBox:"0 0 45 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("rect",{width:"59",height:"32",rx:"4",fill:"white"}),(0,l.jsx)("path",{d:"M0 0h45v28H0V0Z"}),(0,l.jsx)("path",{d:"m16.714 7.237-5.767 13.578H7.183L4.352 9.979c-.16-.66-.32-.923-.854-1.187-.855-.448-2.27-.896-3.498-1.16l.081-.395h6.06c.775 0 1.468.501 1.628 1.371l1.496 7.857 3.684-9.228h3.765Zm14.712 9.148c.025-3.585-5.02-3.77-4.967-5.377 0-.475.48-1.003 1.494-1.135a7.018 7.018 0 0 1 3.498.607l.614-2.874A9.405 9.405 0 0 0 28.728 7c-3.524 0-5.98 1.845-6.006 4.481-.028 1.951 1.76 3.032 3.096 3.692 1.389.659 1.842 1.081 1.842 1.687 0 .923-1.094 1.318-2.135 1.318-1.789.027-2.83-.475-3.658-.869l-.642 2.978c.829.37 2.378.713 3.952.713 3.792.025 6.248-1.794 6.248-4.615Zm9.29 4.43H44L41.116 7.237h-3.042c-.696 0-1.256.396-1.523 1.002l-5.34 12.576h3.739l.746-2.03h4.567l.453 2.03Zm-3.978-4.799 1.87-5.088 1.067 5.088h-2.937ZM21.786 7.238 18.85 20.815h-3.551l2.936-13.578h3.551Z",fill:"#1334CB"})]})}),(0,l.jsx)("div",{className:"h-8 flex items-center",children:(0,l.jsxs)("svg",{width:"59",height:"32",viewBox:"0 0 59 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("rect",{width:"59",height:"32",rx:"4",fill:"white"}),(0,l.jsx)("path",{d:"M42.83 0.830185H16.1244C7.77884 0.830185 0.950684 7.62264 0.950684 15.9245C0.950684 24.2264 7.77884 31.0189 16.1244 31.0189H42.83C51.1755 31.0189 58.0037 24.2264 58.0037 15.9245C58.0037 7.62264 51.1755 0.830185 42.83 0.830185Z",fill:"white"}),(0,l.jsx)("path",{d:"M42.83 2.05283C44.704 2.05283 46.5248 2.42264 48.2394 3.14717C49.901 3.84905 51.388 4.85283 52.6777 6.1283C53.9599 7.40377 54.969 8.89056 55.6745 10.5434C56.4029 12.2491 56.7746 14.0604 56.7746 15.9245C56.7746 17.7887 56.4029 19.6 55.6745 21.3057C54.969 22.9585 53.9599 24.4377 52.6777 25.7208C51.3956 26.9962 49.901 28 48.2394 28.7019C46.5248 29.4264 44.704 29.7962 42.83 29.7962H16.1244C14.2504 29.7962 12.4296 29.4264 10.7149 28.7019C9.05343 28 7.56641 26.9962 6.27664 25.7208C4.99447 24.4453 3.98542 22.9585 3.27984 21.3057C2.55151 19.6 2.17975 17.7887 2.17975 15.9245C2.17975 14.0604 2.55151 12.2491 3.27984 10.5434C3.98542 8.89056 4.99447 7.41132 6.27664 6.1283C7.55882 4.85283 9.05343 3.84905 10.7149 3.14717C12.4296 2.42264 14.2504 2.05283 16.1244 2.05283H42.83ZM42.83 0.830185H16.1244C7.77884 0.830185 0.950684 7.62264 0.950684 15.9245C0.950684 24.2264 7.77884 31.0189 16.1244 31.0189H42.83C51.1755 31.0189 58.0037 24.2264 58.0037 15.9245C58.0037 7.62264 51.1755 0.830185 42.83 0.830185Z",fill:"#3C4043"}),(0,l.jsx)("path",{d:"M28.1574 16.9962V21.5623H26.7007V10.2868H30.5624C31.5411 10.2868 32.3756 10.6113 33.0585 11.2604C33.7564 11.9094 34.1054 12.7019 34.1054 13.6377C34.1054 14.5962 33.7564 15.3887 33.0585 16.0302C32.3832 16.6717 31.5487 16.9887 30.5624 16.9887H28.1574V16.9962ZM28.1574 11.6755V15.6075H30.5927C31.1693 15.6075 31.6549 15.4113 32.0342 15.0264C32.4212 14.6415 32.6184 14.1736 32.6184 13.6453C32.6184 13.1245 32.4212 12.6641 32.0342 12.2792C31.6549 11.8792 31.1769 11.683 30.5927 11.683H28.1574V11.6755Z",fill:"#3C4043"}),(0,l.jsx)("path",{d:"M37.914 13.5925C38.9913 13.5925 39.8411 13.8792 40.4632 14.4528C41.0853 15.0264 41.3964 15.8113 41.3964 16.8075V21.5623H40.008V20.4906H39.9473C39.3479 21.3736 38.5437 21.8113 37.5422 21.8113C36.6849 21.8113 35.9718 21.5623 35.3952 21.0566C34.8186 20.5509 34.5303 19.9245 34.5303 19.1698C34.5303 18.3698 34.8337 17.7358 35.4407 17.2679C36.0476 16.7925 36.8594 16.5585 37.8685 16.5585C38.7334 16.5585 39.4465 16.717 40.0004 17.034V16.7019C40.0004 16.1962 39.8031 15.7736 39.401 15.4189C38.9989 15.0641 38.5285 14.8906 37.9899 14.8906C37.1781 14.8906 36.5332 15.2302 36.0628 15.917L34.7806 15.117C35.4862 14.0981 36.5332 13.5925 37.914 13.5925ZM36.0325 19.1925C36.0325 19.5698 36.1918 19.8868 36.518 20.1358C36.8367 20.3849 37.216 20.5132 37.6485 20.5132C38.263 20.5132 38.8093 20.2868 39.2872 19.834C39.7652 19.3811 40.008 18.8528 40.008 18.2415C39.5528 17.8868 38.923
11 17.7057 38.1113 17.7057C37.5195 17.7057 37.0263 17.8491 36.6318 18.1283C36.2297 18.4226 36.0325 18.7774 36.0325 19.1925Z",fill:"#3C4043"}),(0,l.jsx)("path",{d:"M49.3172 13.8415L44.4616 24.9509H42.9595L44.7651 21.0642L41.5635 13.8415H43.1491L45.4555 19.3811H45.4859L47.7316 13.8415H49.3172Z",fill:"#3C4043"}),(0,l.jsx)("path",{d:"M22.363 16.0755C22.363 15.603 22.3205 15.1509 22.2416 14.7162H16.1357V17.2068L19.6522 17.2075C19.5096 18.0362 19.0506 18.7426 18.3473 19.2136V20.8294H20.4405C21.6628 19.7041 22.363 18.0407 22.363 16.0755Z",fill:"#4285F4"}),(0,l.jsx)("path",{d:"M18.3479 19.2136C17.7652 19.6045 17.0149 19.8332 16.1371 19.8332C14.4414 19.8332 13.003 18.6966 12.4878 17.1645H10.3286V18.8309C11.3984 20.9426 13.597 22.3917 16.1371 22.3917C17.8927 22.3917 19.3676 21.8174 20.4411 20.8287L18.3479 19.2136Z",fill:"#34A853"}),(0,l.jsx)("path",{d:"M12.2847 15.9283C12.2847 15.4981 12.3568 15.0823 12.4881 14.6913V13.0249H10.3289C9.88654 13.8981 9.6377 14.8838 9.6377 15.9283C9.6377 16.9728 9.8873 17.9585 10.3289 18.8317L12.4881 17.1653C12.3568 16.7743 12.2847 16.3585 12.2847 15.9283Z",fill:"#FABB05"}),(0,l.jsx)("path",{d:"M16.1371 12.0226C17.0953 12.0226 17.9534 12.3509 18.6309 12.9924L20.4859 11.1487C19.3592 10.1049 17.8904 9.46414 16.1371 9.46414C13.5978 9.46414 11.3984 10.9132 10.3286 13.0249L12.4878 14.6913C13.003 13.1592 14.4414 12.0226 16.1371 12.0226Z",fill:"#E94235"})]})}),(0,l.jsx)("div",{className:"h-8 flex items-center",children:(0,l.jsxs)("svg",{width:"44",height:"19",viewBox:"0 0 44 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("rect",{width:"44",height:"19",rx:"4",fill:"white"}),(0,l.jsx)("path",{d:"M8.159 2.36c.5-.644.858-1.502.75-2.36-.75.036-1.644.5-2.18 1.108-.464.536-.893 1.43-.786 2.252.858.107 1.68-.358 2.216-1Zm.75 1.214c-1.215-.071-2.251.68-2.823.68-.572 0-1.466-.644-2.43-.644-1.252.036-2.396.715-3.039 1.859-1.287 2.252-.357 5.576.93 7.399.607.893 1.358 1.894 2.323 1.858.93-.035 1.287-.607 2.395-.607s1.43.607 2.43.572c1.001-.036 1.644-.894 2.252-1.823.715-1.037 1-2.038 1-2.073-.035-.036-1.965-.75-1.965-2.967-.036-1.859 1.501-2.752 1.573-2.788-.822-1.287-2.18-1.43-2.645-1.466ZM19.418 1.037c2.646 0 4.468 1.823 4.468 4.432 0 2.645-1.858 4.468-4.54 4.468h-2.894v4.61h-2.11V1.038h5.076Zm-2.966 7.148h2.394c1.823 0 2.86-1 2.86-2.68 0-1.716-1.037-2.681-2.86-2.681h-2.43v5.361h.036Zm7.97 3.61c0-1.715 1.323-2.788 3.682-2.93l2.717-.143V7.97c0-1.108-.75-1.752-1.966-1.752-1.18 0-1.895.572-2.073 1.43h-1.93c.107-1.787 1.644-3.11 4.074-3.11 2.395 0 3.932 1.252 3.932 3.253v6.792h-1.93v-1.609h-.036c-.572 1.108-1.823 1.787-3.11 1.787-2.001 0-3.36-1.215-3.36-2.966Zm6.399-.893v-.786l-2.43.143c-1.216.071-1.895.607-1.895 1.465 0 .858.715 1.43 1.787 1.43 1.43 0 2.538-.965 2.538-2.252Zm3.824 7.327v-1.644c.143.036.5.036.644.036.93 0 1.43-.393 1.751-1.394 0-.036.179-.608.179-.608l-3.575-9.865h2.18l2.503 8.042h.036l2.502-8.042h2.144l-3.681 10.401c-.858 2.395-1.823 3.146-3.86 3.146-.144-.036-.644-.036-.823-.072Z",fill:"currentColor"})]})})]})};var v=s(6588),g=s(9156);let p=(0,a.c)("pk_live_51RVH6LICXpBau1K2rNVVxWKRzbFUynyO9Vvk21lULhlPtykHYGGm8PPOkqMaQpVtjiUqNUne4pjBcZMxjkPpNmFk00eb8HPgmt"),j=e=>{let{isOpen:t,onOpenChange:s,onClose:a,onSubscriptionSuccess:j,propertyTitle:C="Fastighet",propertyUrl:w,propertyAddress:N,propertyCity:k}=e,{user:b,session:y}=(0,d.A)(),[Z,H]=(0,r.useState)(!1),[M,S]=(0,r.useState)(!1),[V,L]=(0,r.useState)(!1),[B,A]=(0,r.useState)(null),[E,F]=(0,r.useState)(null),[_,D]=(0,r.useState)("05:00"),[P,I]=(0,r.useState)(300),[R,U]=(0,r.useState)(null),G=(0,v.BN)(),O=(0,v.Me)(),q=(0,v.uh)();(0,r.useEffect)(()=>{if(M&&B&&((0,v.Ml)({userId:null==b?void 0:b.id,email:null==b?void 0:b.email}),"function"==typeof window.gtag&&(window.gtag("event","conversion",{send_to:"AW-16558146623/riXrCJm6ovcZEL-Ixdc9",value:237,currency:"SEK",transaction_id:B}),console.log("\uD83C\uDFAF Google Ads conversion fired:",B)),null==b?void 0:b.email)){window.uetq=window.uetq||[];let e=(e=>{if(!e||!e.includes("@"))return"";let t=e.toLowerCase().trim(),s=(t=(t=t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).replace(/\s/g,"")).indexOf("@"),l=t.substring(0,s),r=t.substring(s),a=l.indexOf("+");return -1!==a&&(l=l.substring(0,a)),(l=(l=l.replace(/\./g,"")).replace(/\.$/,""))+r})(b.email);e&&(window.uetq.push("set",{pid:{em:e}}),console.log("\uD83C\uDFAF Microsoft Ads UET conversion fired:",{email:e,transactionId:B}))}},[M,B,null==b?void 0:b.id,null==b?void 0:b.email]),(0,r.useEffect)(()=>
1{if(t){if(t&&!Z&&!M){let e=setInterval(()=>{I(t=>{if(t<=1)return clearInterval(e),0;let s=t-1,l=Math.floor(s/60);return D("".concat(l.toString().padStart(2,"0"),":").concat((s%60).toString().padStart(2,"0"))),s})},1e3);return()=>clearInterval(e)}}else H(!1),S(!1),L(!1),A(null),F(null),U(null),I(300),D("05:00")},[t,Z,M]);let K=(0,r.useCallback)(async()=>{var e;if(!(null==y?void 0:y.access_token))throw Error("Not authenticated");let t=new URL(window.location.href);t.searchParams.set("checkout","success");let s=t.toString(),l=window.location.href,r=await g.N.functions.invoke("create-checkout-session",{body:{propertyTitle:C,successUrl:s,cancelUrl:l,gclid:G||void 0,gbraid:O||void 0,wbraid:q||void 0}});if(r.error)throw console.error("Error creating checkout session:",r.error),Error(r.error.message||"Failed to create checkout session");if(!(null==(e=r.data)?void 0:e.clientSecret))throw Error("No client secret returned");return r.data.clientSecret},[null==y?void 0:y.access_token,C,G,O,q]),z=async()=>{if(!b)return void o.oR.error("Du m\xe5ste vara inloggad f\xf6r att forts\xe4tta");L(!0),U(null);try{let e=await K();F(e),H(!0)}catch(e){console.error("Error starting checkout:",e),U(e.message||"Kunde inte starta betalningen. F\xf6rs\xf6k igen."),o.oR.error("Kunde inte starta betalningen. F\xf6rs\xf6k igen.")}finally{L(!1)}},T=(0,r.useCallback)(()=>{console.log("✅ Stripe checkout complete"),A("stripe_".concat(Date.now())),S(!0),o.oR.success("Betalning slutf\xf6rd!"),j(),setTimeout(()=>{let e=new URL(window.location.href);e.searchParams.set("checkout","success"),window.location.href=e.toString()},1500)},[j]);return(0,l.jsx)(n.lG,{open:t,onOpenChange:s,children:(0,l.jsxs)(n.Cf,{className:"sm:max-w-[500px] max-h-[90vh] overflow-hidden flex flex-col p-0 gap-0",children:[(0,l.jsxs)(n.c7,{className:"px-6 py-4 border-b",children:[(0,l.jsx)(n.L3,{className:"text-xl",children:"Bostadscentralen medlemskap"}),(0,l.jsx)(c.$,{className:"absolute right-4 top-4",variant:"ghost",size:"icon",onClick:()=>{a?a():s&&s(!1)},children:(0,l.jsx)(h.A,{className:"h-4 w-4"})})]}),M?(0,l.jsx)("div",{className:"space-y-4 p-6 overflow-y-auto",children:(0,l.jsxs)("div",{className:"flex flex-col items-center text-center space-y-2",children:[(0,l.jsx)(x.A,{className:"h-12 w-12 text-green-500"}),(0,l.jsx)("p",{className:"text-xl font-semibold",children:"Betalning slutf\xf6rd"}),(0,l.jsx)("p",{className:"text-gray-500",children:"Tack f\xf6r ditt k\xf6p! Du har nu tillg\xe5ng till alla premium-funktioner."})]})}):Z&&E?(0,l.jsxs)("div",{className:"flex-1 overflow-y-auto flex flex-col",children:[(0,l.jsx)("div",{className:"px-4 py-4 flex-1 overflow-y-auto",style:{minHeight:"450px"},children:(0,l.jsx)(i.OH,{stripe:p,options:{clientSecret:E,onComplete:T},children:(0,l.jsx)(i.zm,{})})}),(0,l.jsx)("div",{className:"px-4 pb-4 space-y-2",children:(0,l.jsx)("p",{className:"text-center text-xs text-gray-500",children:"S\xe4ker betalning via Stripe • Avsluta n\xe4r som helst"})})]}):(0,l.jsx)("div",{className:"p-6 overflow-y-auto",children:(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("h2",{className:"text-2xl font-bold",children:"Grattis!"}),(0,l.jsx)("p",{className:"text-gray-700",children:"Du har blivit utvald! F\xe5 tillg\xe5ng till Bostadscentralen helt kostnadsfritt i 7 dagar"}),(0,l.jsxs)("div",{className:"flex items-center text-sm text-gray-500 mt-2",children:[(0,l.jsx)(m.A,{className:"h-4 w-4 mr-1"}),(0,l.jsxs)("span",{children:["Erbjudandet tar slut om — ",_]})]})]}),(0,l.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,l.jsxs)("div",{className:"flex items-baseline mb-1",children:[(0,l.jsx)("span",{className:"text-3xl font-bold",children:"0kr"}),(0,l.jsx)("span",{className:"text-gray-500 line-through ml-2",children:"19kr"}),(0,l.jsx)("span",{className:"ml-2 text-gray-700",children:"/ f\xf6rsta veckan"})]}),(0,l.jsx)("p",{className:"text-gray-400 text-xs font-normal",children:"D\xe4refter 79 kr i veckan i en fortl\xf6pande prenumeration utan bindningstid."})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"flex items-start gap-2",children:[(0,l.jsx)(x.A,{className:"h-5 w-5 text-green-500 flex-shrink-0 mt-0.5"}),(0,l.jsx)("span",{children:"Tusentals lediga bost\xe4der!"})]}),(0,l.jsxs)("div",{className:"flex items-start gap-2",children:[(0,l.jsx)(x.A,{className:"h-5 w-5 text-green-500 flex-shrink-0 mt-0.5"}),(0,l.jsx)("span",{children:"Hyr direkt!"})]}),(0,l.jsxs)("div",{className:"flex items-start gap-2",children:[(0,l.jsx)(x.A,{className:"h-5 w-5 text-green-500 flex-shrink-0 mt-0.5"}),(0,l.jsx)("span",{children:"Inget krav p\xe5 k\xf6tid!"})]})]}),R&&(0,l.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:(0,l.jsx)("p",{className:"text-sm text-red-600",children:R})}),(0,l.jsx)(c.$,{onClick:z,disabled:V,className:"w-full h-12 bg-primary hover:bg-primary/90 text-primary-foreground font-medium relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:translate-x-[-100%] hover:before:translate-x-[100%] before:transition-transform before:duration-700 hover:shadow-lg hover:shadow-
1primary/50 transition-all duration-300",children:V?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.A,{className:"mr-2 h-5 w-5 animate-spin"}),"Laddar..."]}):"F\xe5 tillg\xe5ng nu"}),(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("p",{className:"text-sm text-gray-500",children:"S\xe4ker betalning via Stripe"}),(0,l.jsx)(u,{className:"mt-2"})]}),(0,l.jsx)("p",{className:"text-xs text-center text-gray-500",children:"Du kommer att f\xe5 tillg\xe5ng till samtliga kontaktuppgifter till hyresv\xe4rdar p\xe5 v\xe5r webbsida i 7 dagar f\xf6r 0kr. D\xe4refter kommer prenumerationen f\xf6rnyas f\xf6r 79kr/vecka. Provperioden kan avslutas efter 48 timmar via dina personliga inst\xe4llningar."}),(0,l.jsxs)("p",{className:"text-center text-xs text-gray-500",children:["Genom att forts\xe4tta godk\xe4nner du v\xe5ra ",(0,l.jsx)("a",{href:"/terms",className:"underline",children:"villkor"})," och ",(0,l.jsx)("a",{href:"/privacy",className:"underline",children:"integritetspolicy"}),"."]})]})]})})]})})}}}]);

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.