1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2453],{2160:(e,t,r)=>{r.d(t,{F:()=>a});var n=r(86600),s=r(95704);let a=e=>{var t,r,s;if(!e)return null;let a=(0,n.s)(e),i=null!=(s=null==a||null==(r=a.data)||null==(t=r.user)?void 0:t.id)?s:null;return i?parseInt(i):null};new TextEncoder().encode(s.env.JWT_SECRET_TOKEN)},6829:(e,t,r)=>{r.d(t,{Gm:()=>o,OA:()=>l,nh:()=>i});var n=r(72378),s=r(57541),a=r(16683);let i=e=>n.A.get(e),o=e=>{n.A.remove(e)},l=e=>{n.A.set(s.y.JWT_NAME,e.jwt,{path:"/",expires:1,sameSite:"lax"});let t=(0,a.q)(e.userMeta);n.A.set(s.y.WP_USER_META,JSON.stringify(t),{path:"/",expires:1,sameSite:"lax"})}},14037:(e,t,r)=>{r.d(t,{J:()=>c,PublicUserProvider:()=>d});var n=r(95155),s=r(12115),a=r(6829),i=r(57541),o=r(2160);let l=(0,s.createContext)(void 0),d=e=>{let{children:t,initialUserMeta:r={}}=e,[d,c]=(0,s.useState)(r),[u,h]=(0,s.useState)(()=>!r.userId),[f,m]=(0,s.useState)(!0),p=e=>{c(t=>({...t,...e})),document.cookie="".concat(i.y.WP_USER_META,"=").concat(JSON.stringify({...d,...e}),"; path=/; max-age=86400")};return(0,s.useEffect)(()=>{if(r.userId&&!f)return void h(!1);async function e(){try{var e,t,r;let n=(0,a.nh)(i.y.JWT_NAME);if(!n)return;if(!f)return void h(!1);let s=(()=>{try{let e=(0,a.nh)(i.y.WP_USER_META);return!!e&&!0===JSON.parse(e).onboardingIncludeTeam}catch(e){return!1}})(),o=await fetch("".concat("https://app.businesssales.com.au","/wp-json/businesssales-user/v1/user-meta"),{method:"POST",headers:{Authorization:"BearerNextJs ".concat(n),"Content-Type":"application/json"}});if(!o.ok){console.error("Error fetching user meta:",null!=(e=null==o?void 0:o.statusText)?e:"Unknown error"),h(!1);return}let l=await o.json();h(!1);let d=(null!=(t=l.first_name)?t:"").trim(),c=(null!=(r=l.last_name)?r:"").trim(),u="".concat(d," ").concat(c).trim();p({userId:l.id,username:l.user_email,...d?{firstName:d}:{},...c?{lastName:c}:{},...u?{displayName:u}:{},userFirm:l.firm_id?parseInt(l.firm_id):void 0,dashboardViewMode:l.dashboard_view_mode||"all",roles:l.roles||[],amlOnly:!0===l.aml_only,onboardingIncludeTeam:s,needsBrokerageOnboarding:!0===l.needs_brokerage_onboarding}),m(!1)}catch(e){console.error("Error fetching user meta:",e),h(!1)}}(async function(){try{let e=(0,a.nh)(i.y.JWT_NAME),t=(0,a.nh)(i.y.WP_USER_META),r=(0,o.F)(e);if(!r)return;let n=null;if(t)try{let e=JSON.parse(t);n=(null==e?void 0:e.userId)?Number(e.userId):null}catch(e){m(!0);return}m(r!==n)}catch(e){console.error("Error checking user meta staleness:",e),m(!0)}})(),e()},[f]),(0,n.jsx)(l.Provider,{value:{userMeta:d,setUserMeta:p,clearUserMeta:()=>{c({}),document.cookie="".concat(i.y.WP_USER_META,"=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT")},isLoading:u,isUserMetaStaled:f,setIsUserMetaStaled:m},children:t})},c=()=>{let e=(0,s.useContext)(l);if(!e)throw Error("usePublicUserMeta must be used within a PublicUserProvider");return e}},15239:(e,t,r)=>{r.d(t,{default:()=>s.a});var n=r(54652),s=r.n(n)},16683:(e,t,r)=>{r.d(t,{q:()=>n});function n(e){var t,r,n,s;let a=null!=(t=e.user_id)?t:e.id,i="".concat(null!=(r=e.first_name)?r:""," ").concat(null!=(n=e.last_name)?n:"").trim();return{userId:void 0!==a?Number(a):void 0,username:e.user_email,displayName:i||e.name,userFirm:void 0!==e.firm_id&&null!==e.firm_id?Number(e.firm_id):void 0,roles:null!=(s=e.roles)?s:[],amlOnly:!0===e.aml_only,onboardingIncludeTeam:!0===e.onboarding_include_team,needsBrokerageOnboarding:!0===e.needs_brokerage_onboarding}}},20063:(e,t,r)=>{var n=r(47260);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},54652:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return l},getImageProps:function(){return o}});let n=r(28140),s=r(75040),a=r(81356),i=n._(r(71124));function o(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let l=a.Image},57541:(e,t,r)=>{r.d(t,{y:()=>s});let n="prod",s={WP_USER_META:"wp_user_meta_".concat(n),JWT_NAME:"jwt_token_".concat(n)}},71614:(e,t,r)=>{r.d(t,{default:()=>f});var n=r(95155),s=r(12115),a=r(20063),i=r(15239),o=r(14037),l=r(52619),d=r.n(l);let c=new Set(["/national-aml-industry-rollout-program"]);function u(){var e;let{userMeta:t}=(0,o.J)(),r=(0,a.usePathname)(),s=!!(r&&c.has(r)),l=["admin_assistant","business_broker","broker_profile_only","read_only"],u=t&&(null==(e=t.roles)?void 0:e.some(e=>l.includes(e)))?"New Listing":"Sell My Business",h=s?[{text:"Register now",href:"#register",className:"bg-[#0A3C55] px-5 py-2.5 rounded-md border-2 border-[#0A3C55] text-white hover:bg-[#4DDEF0] hover:text-[#0A3C55] hover:border-[#4DDEF0] transition-all duration-300 min-w-[150px] text-center font-semibold"}]:t.userId?[{text:"My Dashboard",href:"/listings"},{text:u,href:"".concat("https://app.businesssales.com.au","/listings/add-listing-sale"),className:"bg-transparent px-4 py-2 rounded-md border-2 border-[#4DDEF0] hover:bg-[#0A3C55] hover:text-white hover:border-[#0A3C55] transition-all duration-300 min-w-[160px] text-center"}]:[{text:"Login",href:"".concat("https://app.businesssales.com.au","/login")},{text:"Sign Up",href:"".concat("https://app.businesssales.com.au","/register")},{text:"Sell My Business",href:"/for-sellers",className:"bg-transparent px-4 py-2 rounded-md border-2 border-[#4DDEF0] hover:bg-[#0A3C55] hover:text-white hover:border-[#0A3C55] transition-all duration-300 min-w-[160px] text-center"}],f=s?[]:h;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"hidden md:flex pb-[0.6%] bg-white md:bg-transparent py-2 md:py-0 pt-2 items-center justify-between",children:[(0,n.jsx)(d(),{href:"/",className:"flex-shrink-0 transition-all duration-500 ease-out",children:(0,n.jsx)(i.default,{src:"/images/BusinessSales-RGB_Logo.png",alt:"Business Sales",width:368,height:85,sizes:"(min-width: 1024px) 368px, 280px",priority:!0,className:"h-auto w-[280px] lg:w-[368px]"})}),(0,n.jsx)("div",{className:"space-x-6 flex justify-end items-center text-[1.2rem] md:w-auto md:flex-shrink-0 md:w-fit lg:w-fit",children:h.map((e,t)=>(0,n.jsx)("a",{href:e.href,className:(null==e?void 0:e.className)||"p-link-hover-underline whitespace-nowrap",children:e.text},"header-link-".concat(t)))})]}),(0,n.jsxs)("div",{className:"md:hidden flex items-center justify-between gap-3 bg-white pb-1 pt-[14px]",children:[(0,n.jsx)(d(),{href:"/",className:"inline-block transition-all duration-500 ease-out",children:(0,n.jsx)(i.default,{src:"/images/BusinessSales-RGB_Logo.png",alt:"Business Sales",width:368,height:85,sizes:s?"180px":"300px",priority:!0,className:s?"h-auto w-[180px]":"h-auto w-[300px]"})}),s&&(0,n.jsx)("a",{href:"#register",className:"inline-flex shrink-0 items-center justify-center rounded-md bg-[#0A3C55] px-4 py-2 text-sm font-semibold text-white transition hover:bg-[#4DDEF0] hover:text-[#0A3C55]",children:"Learn More"})]}),f.length>0&&(0,n.jsx)("div",{className:"md:hidden sticky top-0 z-[1000] bg-white",children:(0,n.jsx)("div",{className:"md:px-[5%] py-1 flex flex-nowrap justify-end items-center gap-x-3 text-base min-[400px]:gap-x-6 min-[400px]:text-[1.2rem] [&>a]:shrink-0 [&>a]:whitespace-nowrap",children:f.map((e,t)=>(0,n.jsx)("a",{href:e.href,className:(null==e?void 0:e.className)||"p-link-hover-underline whitespace-nowrap",children:e.text},"header-link-".concat(t)))})})]})}let h=new Set(["/registration","/brokerage-onboarding","/black-book-2"]);
1function f(){let e=(0,a.usePathname)(),[t,r]=(0,s.useState)(!1),i=(null==e?void 0:e.includes("/business/"))&&e.split("/business/").length>1&&1===e.split("/business/")[1].split("/").filter(Boolean).length;return((0,s.useEffect)(()=>{if(i)return;let e=()=>{r(window.scrollY>0)};return e(),window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[i]),e&&h.has(e))?null:(0,n.jsx)("div",{className:i?"static top-0 z-50 px-[5%] pb-[0.6%] space-y-6 bg-white md:shadow-none ".concat(t?"shadow-md":""):"sticky md:static top-0 z-50 px-[5%] pb-[0.6%] space-y-0 md:space-y-6 bg-white md:shadow-none ".concat(t?"shadow-md":""),children:(0,n.jsx)(u,{})})}},71936:(e,t,r)=>{r.d(t,{default:()=>d});var n=r(95155),s=r(52619),a=r.n(s),i=r(20063);let o=new Set(["/black-book","/black-book-2","/national-aml-industry-rollout-program"]),l=new Set(["/registration","/brokerage-onboarding"]);function d(){let e=(0,i.usePathname)();return e&&(o.has(e)||l.has(e))?null:(0,n.jsx)("section",{className:"mb-0 mx-auto pt-0 px-[5%]",children:(0,n.jsxs)("div",{className:"inline-flex items-center text-lg",children:[(0,n.jsx)(a(),{href:"/buyers",className:"rounded-tl-lg bg-[#BBF41C] px-8 py-5 font-bold text-black",children:"Buy"}),(0,n.jsx)(a(),{href:"/for-sellers",className:"px-8 py-5 bg-[#4DDEF0] font-bold text-black",children:"Sell"}),(0,n.jsx)(a(),{href:"/resources",className:"rounded-tr-lg bg-[#F0F5F5] px-8 py-5 font-bold text-black",children:"Resources"})]})})}},72378:(e,t,r)=>{function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)"__proto__"!==n&&(e[n]=r[n])}return e}r.d(t,{A:()=>s});var s=function e(t,r){function s(e,s,a){if("undefined"!=typeof document){"number"==typeof(a=n({},r,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var o in a)a[o]&&(i+="; "+o,!0!==a[o]&&(i+="="+a[o].split(";")[0]));return document.cookie=e+"="+t.write(s,e)+i}}return Object.create({set:s,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},s=0;s<r.length;s++){var a=r[s].split("="),i=a.slice(1).join("=");try{var o=decodeURIComponent(a[0]);if(o in n||(n[o]=t.read(i,o)),e===o)break}catch{}}return e?n[e]:n}},remove:function(e,t){s(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},76671:(e,t,r)=>{r.d(t,{default:()=>i});var n=r(95155);r(12115);let s=[{text:"Retail",href:"/search/?keyword=Retail"},{text:"Food & Drink",href:"/search/?keyword=Accommodation+and+Food+Services"},{text:"Construction",href:"/search/?keyword=Construction"},{text:"Health",href:"/search/?keyword=Health+Care+and+Social+Assistance"},{text:"Education & Training",href:"/search/?keyword=Education+and+Training"},{text:"Automotive & Marine",href:"/search/?keyword=Automotive+%26+Marine"},{text:"Professional Services",href:"/search/?keyword=Professional%2C+Scientific+and+Technical+Services"},{text:"Transport & Storage",href:"/search/?keyword=Transport%2C+Postal+and+Warehousing"},{text:"Manufacturing",href:"/search/?keyword=Manufacturing"},{text:"Online",href:"/search/?keyword=Online+Business"},{text:"Mobile",href:"/search/?keyword=Mobile"},{text:"Franchise",href:"/search/?keyword=Franchise"}],a=[{text:"Sydney",href:"/business-for-sale-in/nsw/sydney"},{text:"Melbourne",href:"/business-for-sale-in/vic/melbourne"},{text:"Brisbane",href:"/business-for-sale-in/qld/south-east-queensland/brisbane"},{text:"Perth",href:"/business-for-sale-in/wa/perth"},{text:"Adelaide",href:"/business-for-sale-in/sa/adelaide"},{text:"Hobart",href:"/business-for-sale-in/tas/hobart"},{text:"Darwin",href:"/business-for-sale-in/nt/darwin"},{text:"Gold Coast",href:"/business-for-sale-in/qld/south-east-queensland/gold-coast"},{text:"Sunshine Coast",href:"/business-for-sale-in/qld/south-east-queensland/sunshine-coast"},{text:"Newcastle",href:"/business-for-sale-in/nsw/hunter-region"},{text:"Wollongong",href:"/business-for-sale-in/nsw/illawarra-region/wollongong"},{text:"Canberra",href:"/business-for-sale-in/act"}];function i(){return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"lg:w-[50%]",children:[(0,n.jsx)("h3",{className:"py-4 font-bold text-2xl",children:"Businesses for Sale"}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"block footer-block px-2 h-fit",children:[(0,n.jsx)("h4",{className:"font-bold px-2 text-[1.2rem]",children:"Browse by Industry..."}),(0,n.jsx)("div",{className:"flex flex-wrap text-lg lg:text-md",children:s.map((e,t)=>(0,n.jsx)("div",{className:"px-4 lg:px-2 border-r-2 last:border-r-0",children:(0,n.jsx)("a",{href:e.href,className:"p-link-hover block w-fit",children:e.text})},"block-top-footer-link-2-".concat(t)))})]}),(0,n.jsxs)("div",{className:"block footer-block px-2 h-fit",children:[(0,n.jsx)("h4",{className:"font-bold px-2 text-[1.2rem]",children:"Browse by Industry..."}),(0,n.jsx)("div",{className:"flex flex-wrap text-lg lg:text-md",children:a.map((e,t)=>(0,n.jsx)("div",{className:"px-4 lg:px-2 border-r-2 last:border-r-0",children:(0,n.jsx)("a",{href:e.href,className:"p-link-hover block w-fit",children:e.text})},"block-top-footer-link-2-".concat(t)))})]})]})]})})}},86600:(e,t,r)=>{r.d(t,{s:()=>s});
1class n extends Error{}function s(e,t){let r;if("string"!=typeof e)throw new n("Invalid token specified: must be a string");t||(t={});let s=+(!0!==t.header),a=e.split(".")[s];if("string"!=typeof a)throw new n(`Invalid token specified: missing part #${s+1}`);try{r=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(a)}catch(e){throw new n(`Invalid token specified: invalid base64 for part #${s+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new n(`Invalid token specified: invalid json for part #${s+1} (${e.message})`)}}n.prototype.name="InvalidTokenError"}}]);
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.