PageSourceSearch

https://growithjane.com/_next/static/chunks/app/%5Blocale%5D/(front)/layout-053fe0b98fc6391a.js

js growithjane.com collected 2026-09-24 13:07:53 UTC 13,687 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9751],{8312:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var a=n(95155);function i(e){return(0,a.jsxs)("div",{...e,children:[(0,a.jsx)("img",{src:"/images/horizontal-logo.png",alt:"Light Logo",className:"block dark:hidden h-[50px]"}),(0,a.jsx)("img",{src:"/images/horizontal-logo-dark.png",alt:"Dark Logo",className:"hidden dark:block h-[50px]"})]})}},34105:(e,t,n)=>{"use strict";n.d(t,{N_:()=>r,a8:()=>l,rd:()=>s});var a=n(30981),i=n(77519);let{Link:r,redirect:o,usePathname:l,useRouter:s,getPathname:c}=(0,a.A)(i.DT)},35272:(e,t,n)=>{"use strict";n.d(t,{default:()=>L});var a=n(95155),i=n(16460),r=n(60760),o=n(1978),l=n(6874),s=n.n(l),c=n(52596);let d={solid:"inline-flex justify-center rounded-lg py-2 px-3 font-semibold outline-2 outline-offset-2 transition-colors",outline:"inline-flex justify-center rounded-lg border py-[calc(theme(spacing.2)-1px)] px-[calc(theme(spacing.3)-1px)] outline-2 outline-offset-2 transition-colors"},u={solid:{cyan:"relative overflow-hidden bg-cyan-500 text-on-primary before:absolute before:inset-0 active:before:bg-transparent hover:before:bg-surface-container-lowest/10 active:bg-cyan-600 active:text-on-primary/80 before:transition-colors",white:"bg-surface-container-lowest text-cyan-900 hover:bg-surface-container-lowest/90 active:bg-surface-container-lowest/90 active:text-cyan-900/70",gray:"bg-outline-variant text-on-primary hover:bg-outline active:bg-outline-variant active:text-on-primary/80",primary:"bg-primary-container text-on-primary-container hover:bg-primary-container-hover active:bg-primary-container-hover active:text-on-primary-container/80"},outline:{gray:"border-outline-variant -700 hover:border-outline-variant active:bg-outline active:-700/80"}},h={xs:"py-0.5 px-1.5 text-xs",sm:"py-1 px-2 text-xs",base:"py-2 px-3 text-sm",lg:"py-2.5 px-3.5 text-base",xl:"py-3 px-4 text-lg","2xl":"py-4 px-5 text-xl"};var f=function(e){return e[e.button=0]="button",e[e.submit=1]="submit",e[e.reset=2]="reset",e}(f||{});function v(e){var t,n,i;let{className:r,...o}=e;return null!==(t=o.variant)&&void 0!==t||(o.variant="solid"),null!==(n=o.color)&&void 0!==n||(o.color="primary"),null!==(i=o.size)&&void 0!==i||(o.size="base"),r=(0,c.A)(d[o.variant],"outline"===o.variant?u.outline[o.color]:"solid"===o.variant?u.solid[o.color]:void 0,h[o.size],r),void 0===o.href?(0,a.jsx)("button",{className:r,...o}):(0,a.jsx)(s(),{className:r,...o})}var x=n(84148),m=n(8312),p=n(34105),g=n(17652);function b(){let e=(0,p.a8)(),t=(0,g.c)("navigation"),n=[{label:t("cannabisBlog"),url:"/cannabis-blog"},{label:t("communityForums"),url:"https://social.growithjane.com/"},{label:t("exploreGrowlogs"),url:"/explore",isActiveFn:e=>0===e.indexOf("/growlog")}];return(0,a.jsx)(a.Fragment,{children:n.map((t,n)=>{let{label:i,url:r,isActiveFn:o}=t,l=("function"==typeof o?o(e):e===r)?"!text-primary":"";return(0,a.jsx)(p.N_,{href:r,className:"relative -mx-3 -my-2 rounded-full px-3 py-2 text-base transition-colors delay-150 hover:font-bold hover:delay-0 "+l,children:(0,a.jsx)("span",{className:"relative z-10",children:i})},i)})})}var y=n(88891),j=n(92607),w=n(12115),N=n(88736),k=n(98093),E=n(75127);function A(e){let{className:t="",children:n}=e,[i,r]=(0,w.useState)(0),o=(0,w.useCallback)(async()=>{try{let e=await (0,E.$M)();r(e.total)}catch(e){}},[]);(0,w.useEffect)(()=>{o();let e=setInterval(o,6e4);return()=>clearInterval(e)},[o]),(0,w.useEffect)(()=>{let e=()=>o();return window.addEventListener("notifications-updated",e),()=>window.removeEventListener("notifications-updated",e)},[o]);let l=i>0&&(0,a.jsx)("span",{className:"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] flex items-center justify-center text-[10px] font-bold bg-error text-on-error rounded-full px-1",children:i>99?"99+":i});return n?(0,a.jsxs)(p.N_,{href:"/account/profile",className:"relative inline-flex items-center justify-center rounded-full transition-colors ".concat(t),"aria-label":"Profile".concat(i>0?" (".concat(i," unread notifications)"):""),children:[n,l]}):(0,a.jsxs)(p.N_,{href:"/account/profile?tab=notifications",className:"relative inline-flex items-center justify-center p-2 rounded-full hover:bg-surface-container-high transition-colors ".concat(t),"aria-label":"Notifications".concat(i>0?" (".concat(i," unread)"):""),children:[(0,a.jsx)(k.Bwk,{className:"w-5 h-5 text-on-surface-variant"}),l]})}function P(e){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,a.jsx)("path",{d:"M3 6h18M3 12h18M3 18h18",strokeWidth:2,stroke:"gray",strokeLinecap:"round",strokeLinejoin:"round"})})}function I(e){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,a.jsx)("path",{d:"M17 14l-5-5-5 5",strokeWidth:2,stroke:"gray",strokeLinecap:"round",strokeLinejoin:"round"})})}function T(e){return(0,a.jsx)(i.ut,{as:p.N_,className:"block text-base leading-7 tracking-tight -700 font-bold",...e})}function z(){var e,t,n;let{user:i,loading:r}=(0,y.A)(),o=(0,g.c)("navigation"),[l,s]=(0,w.useState)(null),[c,d]=(0,w.useState)(null);if((0,w.useEffect)(()=>
1{i&&(0,j.qx)().then(e=>{var t,n;s(null!==(t=e.avatarUrl)&&void 0!==t?t:null),d(null!==(n=e.displayName)&&void 0!==n?n:null)}).catch(()=>{})},[i]),r||!i)return null;let u=null!=l?l:i.photoURL,h=(null===(t=null!=c?c:i.displayName)||void 0===t?void 0:null===(e=t.charAt(0))||void 0===e?void 0:e.toUpperCase())||"?";return(0,a.jsx)(A,{className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:u?(0,a.jsx)("img",{src:u,alt:null!==(n=null!=c?c:i.displayName)&&void 0!==n?n:o("profile"),className:"w-8 h-8 rounded-full object-cover border border-outline"}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-primary text-on-primary flex items-center justify-center text-sm font-bold border border-outline",children:h})})}function L(){let{user:e,loading:t}=(0,y.A)(),n=(0,g.c)("navigation"),l=(0,w.useRef)(null);return(0,w.useEffect)(()=>{let e=l.current;if(!e)return;let t=()=>{document.documentElement.style.setProperty("--main-header-h","".concat(e.offsetHeight||0,"px"))};t();let n="undefined"!=typeof ResizeObserver?new ResizeObserver(t):null;return null==n||n.observe(e),window.addEventListener("resize",t),()=>{null==n||n.disconnect(),window.removeEventListener("resize",t)}},[]),(0,a.jsx)("header",{ref:l,className:"sticky top-0 z-50 bg-surface",children:(0,a.jsx)("nav",{children:(0,a.jsxs)(x.m,{className:"relative z-50 flex justify-between py-8",children:[(0,a.jsxs)("div",{className:"relative z-10 flex items-center gap-16",children:[(0,a.jsx)(p.N_,{href:"/","aria-label":n("home"),"data-testid":"header-logo",children:(0,a.jsx)(m.g,{className:"h-10 w-auto"})}),(0,a.jsx)("div",{className:"hidden lg:flex lg:gap-10","data-testid":"header-nav-links",children:(0,a.jsx)(b,{})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("div",{className:"hidden lg:flex items-center gap-4",children:[(0,a.jsx)(N.A,{}),!t&&(e?(0,a.jsx)(z,{}):(0,a.jsx)(v,{href:"/login",variant:"outline",children:n("logIn")}))]}),(0,a.jsx)(i.AM,{className:"lg:hidden","data-testid":"header-mobile-nav",children:t=>{let{open:l}=t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.ut,{className:"relative z-10 -m-2 inline-flex items-center rounded-lg stroke-outline p-2 hover:bg-outline hover:stroke-outline-variant active:stroke-outline ui-not-focus-visible:outline-none","aria-label":n("toggleNavigation"),"data-testid":"header-mobile-nav-button",children:e=>{let{open:t}=e;return t?(0,a.jsx)(I,{className:"h-6 w-6"}):(0,a.jsx)(P,{className:"h-6 w-6"})}}),(0,a.jsx)(r.N,{initial:!1,children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.qf,{static:!0,as:o.P.div,initial:{opacity:0}
1,animate:{opacity:.5},exit:{opacity:0},className:"fixed inset-0 z-0 bg-black backdrop-blur"}),(0,a.jsxs)(i.QT,{static:!0,as:o.P.div,initial:{opacity:0,y:-32},animate:{opacity:1,y:0},exit:{opacity:0,y:-32,transition:{duration:.2}},className:"absolute inset-x-0 top-0 z-0 origin-top rounded-b-2xl bg-surface-container-lowest px-6 pb-6 pt-32 shadow-2xl shadow-outline/20",children:[(0,a.jsxs)("div",{className:"space-y-4","data-testid":"header-mobile-nav-links",children:[(0,a.jsx)(T,{href:"/cannabis-blog",children:n("cannabisBlog")}),(0,a.jsx)(T,{href:"https://social.growithjane.com/",children:n("communityForums")}),(0,a.jsx)(T,{href:"/explore",children:n("exploreGrowlogs")}),e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(T,{href:"/account/profile?tab=notifications",children:n("notifications")}),(0,a.jsx)(T,{href:"/account/profile",children:n("myProfile")}),(0,a.jsx)(T,{href:"/account/garden",children:n("myGarden")}),(0,a.jsx)(T,{href:"/account/profile?tab=favorites",children:n("favorites")}),(0,a.jsx)(T,{href:"/account/connections",children:n("myConnections")})]})]}),(0,a.jsxs)("div",{className:"mt-8 flex flex-col gap-4",children:[(0,a.jsx)(N.A,{}),!e&&(0,a.jsx)(v,{href:"/login",variant:"outline","data-testid":"header-mobile-nav-login-button",children:n("logIn")}),(0,a.jsx)(v,{href:"https://app.growithjane.com/","data-testid":"header-mobile-nav-download-button",children:n("downloadApp")})]})]})]})})]})}})]})]})})})}},43896:(e,t,n)=>{Promise.resolve().then(n.bind(n,35272)),Promise.resolve().then(n.t.bind(n,88907,23))},75127:(e,t,n)=>{"use strict";n.d(t,{$M:()=>u,Tr:()=>d,X0:()=>f,aI:()=>h,fP:()=>v});var a=n(1439);let i="https://api.growithjane.com/";async function r(){let e={"Content-Type":"application/json"};try{let t=a.j2.currentUser;if(t){let n=await t.getIdToken();e.Authorization="Bearer ".concat(n)}}catch(e){console.error("Error getting Firebase auth token:",e)}return e}async function o(e){let t=await fetch("".concat(i).concat(e),{method:"GET",credentials:"include",headers:await r()});if(!t.ok)throw Error("API GET ".concat(e," failed with status ").concat(t.status));return t.json()}async function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=await fetch("".concat(i).concat(e),{method:"PATCH",credentials:"include",headers:await r(),body:JSON.stringify(t)});if(!n.ok)throw Error("API PATCH ".concat(e," failed with status ").concat(n.status));return n.json()}async function s(e){let t=await fetch("".concat(i).concat(e),{method:"DELETE",credentials:"include",headers:await r()});if(!t.ok)throw Error("API DELETE ".concat(e," failed with status ").concat(t.status));return t.json()}function c(e){var t,n,a,i,r,o;return{id:null!==(n=null!==(t=e._id)&&void 0!==t?t:e.id)&&void 0!==n?n:"",type:null!==(a=e.type)&&void 0!==a?a:"comment",category:null!==(i=e.category)&&void 0!==i?i:"community",isRead:null!==(r=e.isRead)&&void 0!==r&&r,actorId:e.actorId,actorDisplayName:e.actorDisplayName,actorAvatar:e.actorAvatar,targetType:e.targetType,targetId:e.targetId,targetTitle:e.targetTitle,targetPreview:e.targetPreview,linkTo:e.linkTo,isFollowing:e.isFollowing,reminderPlantName:e.reminderPlantName,reminderPlantId:e.reminderPlantId,reminderAction:e.reminderAction,createdAt:null!==(o=e.createdAt)&&void 0!==o?o:""}}let d=async function(){var e,t,n,a;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=await o("user/notifications?type=".concat(i,"&limit=").concat(r,"&offset=").concat(l));return{notifications:(null!==(e=s.notifications)&&void 0!==e?e:[]).map(c),unreadCount:null!==(t=s.unreadCount)&&void 0!==t?t:0,total:null!==(n=s.total)&&void 0!==n?n:0,hasMore:null!==(a=s.hasMore)&&void 0!==a&&a}},u=async()=>{var e,t,n;let a=await o("user/notifications/unread-count");return{total:null!==(e=a.total)&&void 0!==e?e:0,community:null!==(t=a.community)&&void 0!==t?t:0,reminders:null!==(n=a.reminders)&&void 0!==n?n:0}},h=async e=>{await l("user/notifications/".concat(encodeURIComponent(e),"/read"))},f=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";await l("user/notifications/mark-all-read",{type:e})},v=async e=>{await s("user/notifications/".concat(encodeURIComponent(e)))}},77519:(e,t,n)=>{"use strict";n.d(t,{DT:()=>r,IB:()=>i});var a=n(49984);let i=["en","es","de","pt"],r=(0,a.A)({locales:i,defaultLocale:"en",localePrefix:"as-needed"})}
1,84148:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var a=n(95155),i=n(52596);function r(e){let{className:t,...n}=e;return(0,a.jsx)("div",{className:(0,i.A)("mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",t),...n})}},88736:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(95155),i=n(6990),r=n(17652),o=n(34105),l=n(77519);let s={en:"English",es:"Espa\xf1ol",de:"Deutsch",pt:"Portugu\xeas"};function c(){let e=(0,i.Ym)(),t=(0,o.rd)(),n=(0,o.a8)(),c=(0,r.c)("navigation");return(0,a.jsxs)("label",{className:"relative block w-full lg:w-fit",children:[(0,a.jsx)("span",{className:"sr-only",children:c("language")}),(0,a.jsx)("select",{value:e,onChange:function(e){let a=e.target.value;t.replace(n,{locale:a})},className:"appearance-none rounded-lg bg-surface-container border border-outline-variant px-3 py-1.5 pr-8 text-sm text-on-surface cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary w-full","data-testid":"locale-switcher",children:l.IB.map(e=>(0,a.jsx)("option",{value:e,children:s[e]},e))}),(0,a.jsx)("span",{className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-on-surface-variant",children:(0,a.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[1206,7138,2992,5760,1772,9292,6874,6990,9641,7326,3932,2189,6035,5871,7574,2743,1313,8441,1684,7358],()=>t(43896)),_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.