PageSourceSearch

https://okaydev.co/dist/assets/app-Cu6dTb9L.js

js okaydev.co collected 2026-09-25 20:10:47 UTC 209,029 bytes, 30 lines download raw bytes

1function __vite__mapDeps(indexes) {
2  if (!__vite__mapDeps.viteFileDeps) {
3    __vite__mapDeps.viteFileDeps = ["assets/bento-D_KQ3ZKv.css","assets/comments-bundle-hWkHvKw6.css","assets/bentoSocialHub-DRgRYM3r.js","assets/HeaderLogoLetters-DJI_FB9w.js","assets/HeaderLogoLetters-BcQ5HFOg.css","assets/SocialPosts-rgMf2ipp.js","assets/patchCommentsProtect-C8m96Vr7.js","assets/lazyDialog-D7tW-HM0.js","assets/SocialPostForm-CGgbKgDy.js","assets/selectedMemberElement-BIB-k0h5.js","assets/mediaUploadStatusError-D6rbRcEa.js","assets/output-BQAQukZ9.js","assets/videoPosterMediabunny-CXcmZmdN.js","assets/bentoProfileFollowCta-D5-cZ9cJ.js","assets/bentoProfileCopy-Cvj2CDYQ.js","assets/account-settings-business-renderer-DQJ13V4Z.js","assets/default-renderer-BZKN5ad1.js","assets/SplitText-VLUCmDhw.js","assets/distributeProjectAuthorCard-USTmGEds.js","assets/account-settings-business-renderer-Bl622Ckp.css","assets/account-settings-renderer-CFHW8Jb6.js","assets/account-settings-renderer-B5aM35Ps.css","assets/article-renderer-N9wvx6g6.js","assets/ArticleThemeToggle-Bl8G2RV-.js","assets/incrementEntryViewCountFromPage-3eQx233S.js","assets/article-renderer-xPVh85ms.css","assets/containers-DKJ6IFi3.css","assets/highlight-bundle-C_t1x8D1.css","assets/articles-listing-renderer-B0QbAm8v.js","assets/articles-listing-renderer-Dv7JOX2F.css","assets/bento-renderer-CzP9pqFs.js","assets/bento-n74i-PB4.js","assets/Draggable-DXiwSRJk.js","assets/ProfileAvatarTilt-DIXvf0BJ.js","assets/stepTilt-Cn-xzgMk.js","assets/bentoProjectOverlay-DmQsNcW6.js","assets/galleryCardTouchFocus-BfllxjdH.js","assets/listingCoverVideoPoster-BLMhmd0Z.js","assets/revealListingCoverLazyFadeImages-B3dTDF0e.js","assets/DragSort-BjSEdxIA.js","assets/scrollLockGutter-CMruE_We.js","assets/profile-follow-CwPNNVaj.css","assets/bento-social-renderer-CGA_kPKo.js","assets/brand-renderer-CAxLU20A.js","assets/business-sign-up-renderer-BvBRoVC1.js","assets/enhanceAuthKeyboard-DTfFWic9.js","assets/business-sign-up-renderer-BVjRttaV.css","assets/directory-renderer-CF8fOdct.js","assets/choices-BB-LWW82.js","assets/patchChoicesSingleSelectA11y-DUSv6e9h.js","assets/directory-renderer-Bwb6DiAT.css","assets/choices-bundle-Cy0-u7Nt.css","assets/edit-portfolio-renderer-DXT3KJON.js","assets/deletePjaxCacheEntriesForUrl-DV4ZA5rO.js","assets/projectCredits-5PjutgUg.js","assets/edit-portfolio-renderer-BNPJaAtZ.css","assets/portfolio-BMUSreVz.css","assets/bento-project-overlay-rhb0Fr99.css","assets/project-page-DkC9S9w9.css","assets/edit-profile-renderer-BuKHbQ9u.js","assets/forgot-password-renderer-B5u6II2k.js","assets/forgot-password-renderer-DYHXxEFh.css","assets/gallery-renderer-BsR5BqNr.js","assets/gallery-ncMq-zs-.css","assets/gallery-review-renderer-BK8DXVPy.js","assets/home-renderer-C1u7KAbf.js","assets/home-renderer-DxykvEBd.css","assets/interview-qa-renderer-Db7KkIWU.js","assets/interview-qa-renderer-B31skJYd.css","assets/interview-renderer-B28uRPXm.js","assets/interview-renderer-JdKZfe_E.css","assets/job-listing-renderer-B0ghFFg_.js","assets/job-listing-renderer-BG7xWZvn.css","assets/job-post-renderer-CvcR2HN2.js","assets/job-post-submission-renderer-CaZkfU3V.js","assets/job-post-submission-renderer-BAZuV8_w.css","assets/login-renderer-yQ620Aus.js","assets/login-renderer-Dz1xYyf-.css","assets/manage-portfolio-renderer-DcZqXvcG.js","assets/manage-portfolio-renderer-B-ozNTUp.css","assets/manage-team-renderer-ilO5vR7y.js","assets/manage-team-renderer-CJeursYB.css","assets/membership-renderer-Cxlm_Brc.js","assets/membership-renderer-GykbKt2r.css","assets/notifications-renderer-_u833I6-.js","assets/notifications-renderer-D-xYCCic.css","assets/page-error-renderer-7qmzYNm_.js","assets/portfolio-renderer-BXTHD5iR.js","assets/pricing-renderer-C-XiE3J-.js","assets/pricing-renderer-CcYjBhVm.css","assets/profile-renderer-Bgekj5gI.js","assets/profile-renderer-AEizc_ij.css","assets/sign-up-renderer-CwnktU5D.js","assets/sign-up-renderer-DDDPeZrM.css","assets/social-post-renderer-Dz0iwImq.js","assets/social-DBxyTKSe.css","assets/social-renderer-CEcTcIMb.js","assets/tutorial-renderer-Cjm_TVbX.js","assets/tutorial-renderer-D7CueFFB.css","assets/video-posters-audit-renderer-DvW-Y27h.js","assets/OkayPickCertificateDialog-BuVHOjf3.js","assets/OkayPickCertificateDialog-DjVA1hPl.css"]
4  }
5  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
6}
7function e(){import.meta.url,import("_").catch((()=>1)),async function*(){}().next()}import{x as t,K as i,a_ as o,a$ as r,b0 as n,b1 as s,b2 as a,y as l,w as d,s as c,b3 as u,b4 as h,aU as m,b5 as p,b6 as v,b7 as g,b8 as f,P as y,b9 as b,ba as w,e as L,bb as S,c as M,d as A,bc as T,l as k,v as E,_ as C,ar as P,bd as _,a3 as N,be as x,g as R,aw as F,bf as I,a7 as H,a8 as V,G as D,aW as O,n as q,i as j,Z as B,bg as U,T as W,J as z,b as $,aA as Y,ap as K,U as Q,bh as G,bi as X,bj as Z,bk as J,bl as ee,bm as te,at as ie,bn as oe,au as re,E as ne,bo as se,bp as ae,bq as le,a0 as de}from"./HeaderLogoLetters-DJI_FB9w.js";import{a as ce,b as ue,i as he}from"./lazyDialog-D7tW-HM0.js";const me=new WeakMap,pe=["/gallery","/directory","/social"],ve=["/articles","/jobs"];var ge={exports:{}},fe=function(e){if("string"!=typeof e)throw new TypeError("expected a string");
7return(e=(e=(e=e.replace(/([a-z])([A-Z])/g,"$1-$2")).replace(/[ \t\W]/g,"-")).replace(/^-+|-+$/g,"")).toLowerCase()};
8/*!
9 * dashify <https://github.com/jonschlinkert/dashify>
10 *
11 * Copyright (c) 2015 Jon Schlinkert.
12 * Licensed under the MIT license.
13 */function ye(){var e=navigator.userAgent.toLowerCase(),t=navigator.platform.toLowerCase(),i=navigator.appVersion.toLowerCase(),o=/windows phone|iemobile|wpdesktop/.test(e),r=!o&&/android.*mobile/.test(e),n=!o&&!r&&/android/i.test(e),s=r||n,a=!o&&/ip(hone|od|ad)/i.test(t)||e.includes("mac")&&"ontouchend"in document,l=!o&&/ipad/i.test(e)&&a,d=n||l,c=r||a&&!l||o,u=c||d,h=e.indexOf("firefox")>-1,m=!!e.match(/version\/[\d\.]+.*safari/),p=e.indexOf("opr")>-1,v=!window.ActiveXObject&&"ActiveXObject"in window,g=i.indexOf("msie")>-1||v||i.indexOf("edge")>-1,f=e.indexOf("edge")>-1,y=null!==window.chrome&&void 0!==window.chrome&&"google inc."==navigator.vendor.toLowerCase()&&!p&&!f;this.infos={isDroid:s,isDroidPhone:r,isDroidTablet:n,isWindowsPhone:o,isIos:a,isIpad:l,isDevice:u,isEdge:f,isIE:g,isIE11:v,isPhone:c,isTablet:d,isFirefox:h,isSafari:m,isOpera:p,isChrome:y,isDesktop:!c&&!d}
13,Object.keys(this.infos).forEach((function(e){Object.defineProperty(this,e,{get:function(){return this.infos[e]}})}),this),Object.freeze(this)}"undefined"!=typeof window&&(ge.exports=new ye),ye.prototype.addClasses=function(e){Object.keys(this.infos).forEach((function(t){this.infos[t]&&function(e,t){e.addClass?e.addClass(t):e.classList?e.classList.add(t):e.className+=" "+t}(e,fe(t))}),this)},ye.prototype.getInfos=function(){return e=this.infos,JSON.parse(JSON.stringify(e));var e};const be=t(ge.exports);class we{constructor(e){this.wrap=document.querySelector("[data-router-wrapper]"),this.properties=e,this.Transition=e.transition?new e.transition.class(this.wrap,e.transition.name):null}setup(){}add(){this.wrap.insertAdjacentHTML("beforeend",this.properties.view.outerHTML)}update(){document.title=this.properties.page.title}async show(e){var t;this.update(),await(null==(t=this.Transition)?void 0:t.show(e))}async hide(e){var t;await(null==(t=this.Transition)?void 0:t.hide(e))}}const Le=new DOMParser;class Se{constructor(e,t){this.renderers=e,this.transitions=t}getDOM(e){return"string"==typeof e?Le.parseFromString(e,"text/html"):e}getView(e){return e.querySelector("[data-router-view]")}getSlug(e){return e.getAttribute("data-router-view")}async getRenderer(e){if(!this.renderers||!(e in this.renderers))return we;const t=this.renderers[e];if("function"==typeof t&&!we.isPrototypeOf(t)){return(await t()).default}if("function"==typeof(null==t?void 0:t.then)){return(await t).default}return t}getTransition(){return this.transitions&&"default"in this.transitions?{class:this.transitions.default,name:"default"}:null}getProperties(e){const t=this.getDOM(e),i=this.getView(t),o=this.getSlug(i);return{page:t,view:i,slug:o,renderer:this.getRenderer(o),transition:this.getTransition()}}getLocation(e){const t=new URL(e);return{href:t.href,anchor:t.hash||null,origin:t.hostname,params:t.search?Object.fromEntries(t.searchParams):null,pathname:t.pathname,scheme:t.protocol.replace(":","")}}}class Me{constructor({attribute:e="data-pjax-head",rerunScripts:t=!0}={}){this.attr=e,this.rerunScripts=t}merge(e){this._reconcile(document.head,e.head),this._reconcileZones(document.head,e.head),this._reconcile(document.body,e.body,"[data-router-wrapper]"),this._reconcileZones(document.body,e.body,"[data-router-wrapper]")}_reconcile(e,t,i){const o=this._map(e,i),r=this._map(t,i);for(const[n,s]of o)r.has(n)||s.remove();for(const[n,s]of r){const t=o.get(n);t?t.outerHTML!==s.outerHTML&&t.replaceWith(this._importNode(s)):e.appendChild(this._importNode(s))}}_reconcileZones(e,t,i){const o=this._mapZones(e,i),r=this._mapZones(t,i);for(const[n,s]of o)r.has(n)||this._removeZone(s);for(const[n,s]of r){const t=o.get(n);t?this._zoneContentHTML(t)!==this._zoneContentHTML(s)&&this._replaceZoneContent(t,s):this._appendZone(e,s)}}_mapZones(e,t){var i,o,r;const n=new Map;if(!e)return n;const s=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);let a;for(;a=s.nextNode();){if(t&&(null==(i=a.parentElement)?void 0:i.closest(t)))continue;const s=null==(o=a.textContent)?void 0:o.trim().match(/^pjax-zone:(.+)$/);if(!s)continue;const l=s[1];let d=a.nextSibling;for(;d;){if(d.nodeType===Node.COMMENT_NODE&&(null==(r=d.textContent)?void 0:r.trim())===`/pjax-zone:${l}`){n.set(l,{start:a,end:d,container:e});break}d=d.nextSibling}}return n}_zoneContentHTML(e){let t="",i=e.start.nextSibling;for(;i&&i!==e.end;)t+=i.outerHTML||i.textContent,i=i.nextSibling;return t}_removeZone(e){let t=e.start.nextSibling;for(;t&&t!==e.end;){const e=t.nextSibling;t.remove(),t=e}e.end.remove(),e.start.remove()}_replaceZoneContent(e,t){let i=e.start.nextSibling;for(;i&&i!==e.end;){const e=i.nextSibling;i.remove(),i=e}for(i=t.start.nextSibling;i&&i!==t.end;){const t=this._importNode(i);e.end.parentNode.insertBefore(t,e.end),i=i.nextSibling}}_appendZone(e,t){const i=document.createComment(t.start.textContent);e.appendChild(i);let o=t.start.nextSibling;for(;o&&o!==t.end;)e.appendChild(this._importNode(o)),o=o.nextSibling;const r=document.createComment(t.end.textContent);e.appendChild(r)}_map(e,t){const i=new Map;if(!e)return i;for(const o of e.querySelectorAll(`[${this.attr}]`))t&&o.closest(t)||i.set(o.getAttribute(this.attr),o);return i}_importNode(e){return"SCRIPT"===e.tagName&&this.rerunScripts?this._executableScript(e):document.importNode(e,!0)}_executableScript(e){const t=document.createElement("script");for(const{name:i,value:o}of e.attributes)t.setAttribute(i,o);return t.textContent=e.textContent,t}}
13class Ae extends EventTarget{constructor({renderers:e,transitions:t,onLeave:i,onEnter:o,manualScrollRestoration:r=!1,head:n,prefetchMode:s="selective",shouldPrefetchLink:a=(()=>!0)}={}){super(),this.Helpers=new Se(e,t),this.Transitions=t,this.Contextual=!1,this.prefetchMode=s,this.shouldPrefetchLink=a,this._head=n?new Me(!0===n?{}:n):null,this.location=this.Helpers.getLocation(window.location.href),this.properties=this.Helpers.getProperties(document.cloneNode(!0)),this.popping=!1,this.running=!1,this.trigger=null,this.controller=null,this._historyIndex=0,window.history.replaceState({_historyIndex:0},"",window.location.href),this.onLeave=i||[],this.onEnter=o||[],this.manualScrollRestoration=r,r&&(history.scrollRestoration="manual"),this.cache=new Map,this.cache.set(this.location.href,this.properties),this.prefetching=new Set,this._prefetchRequests=new Map,this.properties.renderer.then((e=>{this.From=new e(this.properties),this.From.setup()})),this._navigate=this.navigate.bind(this),this._prefetchOnHover=this._prefetchOnHover.bind(this),window.addEventListener("popstate",this.popState.bind(this)),this._eventMask=this._createEventMask(),this.links=document.querySelectorAll("a:not([target]):not([data-router-disabled])"),this.attach(this.links),this._initPrefetch()}get transitioning(){return this.running}_createEventMask(){const e=document.createElement("div");e.style.cssText="position:fixed;inset:0;z-index:2147483647;pointer-events:none;";const t=e=>{e.preventDefault(),e.stopPropagation()};return e.addEventListener("scroll",t),e.addEventListener("wheel",t,{passive:!1}),e.addEventListener("touchmove",t,{passive:!1}),document.body.appendChild(e),e}attach(e){for(const t of e)t.addEventListener("click",this._navigate)}detach(e){for(const t of e)t.removeEventListener("click",this._navigate)}prefetch(e){for(const t of e){const e="string"==typeof t?t:t.href;e&&this._prefetchURL(e)}}_initPrefetch(){if("on-demand"===this.prefetchMode)return;if("current"!==this.prefetchMode){if(this._intentPrefetchInstalled)return;this._intentPrefetchInstalled=!0;const e=e=>{var t;(null==(t=this._prefetchHoverLink)?void 0:t.contains(e.relatedTarget))||this._cancelPrefetchHover()};return document.addEventListener("pointerover",this._prefetchOnHover,{passive:!0}),document.addEventListener("pointerout",e,{passive:!0}),document.addEventListener("focusin",this._prefetchOnHover),void document.addEventListener("touchstart",this._prefetchOnHover,{passive:!0})}const e=document.querySelectorAll(".prefetch-critical");e.length&&"current"===this.prefetchMode&&this.prefetch(e);const t=document.querySelectorAll(".prefetch-hover");for(const i of t)i.addEventListener("mouseenter",this._prefetchOnHover,{once:!0})}_prefetchOnHover(e){var t,i;const o=e.currentTarget instanceof HTMLAnchorElement?e.currentTarget:null==(i=null==(t=e.target)?void 0:t.closest)?void 0:i.call(t,"a.prefetch-hover");if(!o||o.matches('[download], [target], [data-router-disabled], [aria-disabled="true"]')||o.closest("[inert], [hidden]")||!this.shouldPrefetchLink(o))return;const r=o.href;if(this._canPrefetchURL(r))if("pointerover"===e.type){if("touch"===e.pointerType||o.contains(e.relatedTarget))return;this._cancelPrefetchHover(),this._prefetchHoverLink=o,this._prefetchHoverTimer=setTimeout((()=>{this._cancelPrefetchHover(),o.isConnected&&o.href===r&&this._prefetchURL(r)}),120)}else this._cancelPrefetchHover(),this._prefetchURL(r)}_cancelPrefetchHover(){clearTimeout(this._prefetchHoverTimer),this._prefetchHoverLink=null,this._prefetchHoverTimer=null}_canPrefetchURL(e){try{const t=new URL(e,window.location.href);return!(t.origin!==location.origin||t.hash||t.username||t.password)&&(!/^\/(?:actions|api|freeform|user|ok-admin|admin|login|logout|sign-up|business-sign-up|forgot-password|reset-password|enupal|index\.php)(?:\/|$)/i.test(t.pathname)&&(!/^\/u\/[^/]+\/(?:.*\/)?(?:new-project|edit-project|bookmarks)(?:\/|$)/i.test(t.pathname)&&!["action","p","token","CRAFT_CSRF_TOKEN"].some((e=>t.searchParams.has(e)))))}catch{return!1}}async _prefetchURL(e,{priority:t="auto"}={}){if("on-demand"===this.prefetchMode)return;if(e===this.location.href)return;if(this.cache.has(e)||this.prefetching.has(e))return;if(!this._canPrefetchURL(e)||Date.now()<(this._prefetchPausedUntil||0))return;if("current"!==this.prefetchMode&&this.prefetching.size>=2)return;this.prefetching.add(e);const i=(async()=>{try{const i=await fetch(e,{mode:"same-origin",method:"GET",headers:{"X-Requested-With":"PjaxMax"},credentials:"same-origin",priority:t});if(429===i.status&&(this._prefetchPausedUntil=Date.now()+3e4),i.ok){const t=await i.text();return this.cache.set(e,this.Helpers.getProperties(t)),t}}catch{}finally{this.prefetching.delete(e),this._prefetchRequests.delete(e)}})();return this._prefetchRequests.set(e,i),i}navigate(e){if(!e.metaKey&&!e.ctrlKey){e.preventDefault();const t=!!e.currentTarget.hasAttribute("data-transition")&&e.currentTarget.dataset.transition;this.redirect(e.currentTarget.href,t,e.currentTarget)}}redirect(e,t=!1,i="script"){var o;if(this.trigger=i,!this.running&&e!==this.location.href){const i=this.Helpers.getLocation(e);this.Contextual=!1,t&&(null==(o=this.Transitions)?void 0:o[t])&&(this.Contextual=this.Transitions[t].prototype,this.Contextual.name=t),i.origin!==this.location.origin||i.scheme!==this.location.scheme||i.anchor&&i.pathname===this.location.pathname?window.location.href=e:(this.location=i,this.beforeFetch())}}popState(e){var t,i,o;this.trigger="popstate",this.Contextual=!1;const r=null!=(i=null==(t=e.state)?void 0:t._historyIndex)?i:0,n=r<this._historyIndex?"back":"forward";this._historyIndex=r;const s=null==(o=this.Transitions)?void 0:o._popstate;if(s){const e=s[n];e&&(this.Contextual=e.prototype,this.Contextual.name=`_popstate_${n}`)}const a=this.Helpers.getLocation(window.location.href);this.location.pathname!==a.pathname||!this.location.anchor&&!a.anchor?(this.popping=!0,this.location=a,this.beforeFetch()):this.location=a}pushState(){this.popping||(this._historyIndex++,window.history.pushState({_historyIndex:this._historyIndex},"",this.location.href))}async fetch(){this.controller=new AbortController;const{signal:e}=this.controller,t=this._prefetchRequests.get(this.location.href);if(t){const i=await t;if(e.throwIfAborted(),"string"==typeof i)return i}const i=await fetch(this.location.href,{mode:"same-origin",method:"GET",headers:{"X-Requested-With":"PjaxMax"},credentials:"same-origin",signal:e});if(i.ok)return i.text();window.location.href=this.location.href}async beforeFetch(){var e;this.pushState(),this.running=!0,this._eventMask.style.pointerEvents="auto",null==(e=this.controller)||e.abort();for(const i of this.onLeave)i();this.dispatchEvent(new CustomEvent("NAVIGATE_OUT",{detail:{from:{page:this.From.properties.page,view:this.From.properties.view},trigger:this.trigger,location:this.location}}));const t={trigger:this.trigger,contextual:this.Contextual};if(this.cache.has(this.location.href))await this.From.hide(t),this.properties=this.cache.get(this.location.href);else{const[e]=await Promise.all([this.fetch(),this.From.hide(t)]);this.properties=this.Helpers.getProperties(e),this.cache.set(this.location.href,this.properties)}this.afterFetch()}async afterFetch(){const e=await this.properties.renderer;this.To=new e(this.properties),this._head&&this._head.merge(this.properties.page),this.To.add(),this.manualScrollRestoration&&window.scrollTo(0,0),this.dispatchEvent(new CustomEvent("NAVIGATE_IN",{detail:{to:{page:this.To.properties.page,view:this.To.wrap.lastElementChild},trigger:this.trigger,location:this.location}}));for(const t of this.onEnter)t();await this.To.show({trigger:this.trigger,contextual:this.Contextual}),this.popping=!1,this.running=!1,this._eventMask.style.pointerEvents="none",this.detach(this.links),this.links=document.querySelectorAll("a:not([target]):not([data-router-disabled])"),this.attach(this.links),this._initPrefetch(),this.dispatchEvent(new CustomEvent("NAVIGATE_END",{detail:{to:{page:this.To.properties.page,view:this.To.wrap.lastElementChild},from:{page:this.From.properties.page,view:this.From.properties.view},trigger:this.trigger,location:this.location}})),this.From=this.To,this.trigger=null}}class Te{constructor(e,t){this.wrap=e,this.name=t}show({trigger:e,contextual:t}){const i=this.wrap.lastElementChild,o=this.wrap.firstElementChild;return new Promise((r=>{var n,s;t?null==(s=t.in)||s.call(t,{to:i,from:o,trigger:e,done:r}):null==(n=this.in)||n.call(this,{to:i,from:o,trigger:e,done:r})}))}hide({trigger:e,contextual:t}){const i=this.wrap.firstElementChild;return new Promise((o=>{var r,n;t?null==(n=t.out)||n.call(t,{from:i,trigger:e,done:o}):null==(r=this.out)||r.call(this,{from:i,trigger:e,done:o})}))}}var ke,Ee,Ce;ke={exports:{}},Ee="undefined"!=typeof window?window:{},Ce=function(e,t,i){var o,r;if(function(){var t,i={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in r=e.lazySizesConfig||e.lazysizesConfig||{},i)t in r||(r[t]=i[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:r,noSupport:!0};var n,s,a,l,d,c,u,h,m,p,v,g,f,y,b,w,L,S,M,A,T,k,E,C,P,_,N,x,R,F,I,H,V,D,O,q,j,B,U,W,z,$,Y,K,Q,G=t.documentElement,X=e.HTMLPictureElement,Z="addEventListener",J="getAttribute",ee=e[Z].bind(e),te=e.setTimeout,ie=e.requestAnimationFrame||te,oe=e.requestIdleCallback,re=/^picture$/i,ne=["load","error","lazyincluded","_lazyloaded"],se={},ae=Array.prototype.forEach,le=function(e,t){return se[t]||(se[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),se[t].test(e[J]("class")||"")&&se[t]},de=function(e,t){le(e,t)||e.setAttribute("class",(e[J]("class")||"").trim()+" "+t)},ce=function(e,t){var i;(i=le(e,t))&&e.setAttribute("class",(e[J]("class")||"").replace(i," "))},ue=function(e,t,i){var o=i?Z:"removeEventListener";i&&ue(e,t),ne.forEach((function(i){e[o](i,t)}))},he=function(e,i,r,n,s){var a=t.createEvent("Event");return r||(r={}),r.instance=o,a.initEvent(i,!n,!s),a.detail=r,e.dispatchEvent(a),a},me=function(t,i){var o;!X&&(o=e.picturefill||r.pf)?(i&&i.src&&!t[J]("srcset")&&t.setAttribute("srcset",i.src),o({reevaluate:!0,elements:[t]})):i&&i.src&&(t.src=i.src)},pe=function(e,t){return(getComputedStyle(e,null)||{})[t]},ve=function(e,t,i){for(i=i||e.offsetWidth;i<r.minSize&&t&&!e._lazysizesWidth;)i=t.offsetWidth,t=t.parentNode;return i},ge=($=[],Y=z=[],K=function(){var e=Y;for(Y=z.length?$:z,U=!0,W=!1;e.length;)e.shift()();U=!1},Q=function(e,i){U&&!i?e.apply(this,arguments):(Y.push(e),W||(W=!0,(t.hidden?te:ie)(K)))},Q._lsFlush=K,Q),fe=function(e,t){return t?function(){ge(e)}:function(){var t=this,i=arguments;ge((function(){e.apply(t,i)}))}},ye=function(e){var t,o=0,n=r.throttleDelay,s=r.ricTimeout,a=function(){t=!1,o=i.now(),e()},l=oe&&s>49?function(){oe(a,{timeout:s}
13),s!==r.ricTimeout&&(s=r.ricTimeout)}:fe((function(){te(a)}),!0);return function(e){var r;(e=!0===e)&&(s=33),t||(t=!0,(r=n-(i.now()-o))<0&&(r=0),e||r<9?l():te(l,r))}},be=function(e){var t,o,r=99,n=function(){t=null,e()},s=function(){var e=i.now()-o;e<r?te(s,r-e):(oe||n)(n)};return function(){o=i.now(),t||(t=te(s,r))}},we=(L=/^img$/i,S=/^iframe$/i,M="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),A=0,T=0,k=0,E=-1,C=function(e){k--,(!e||k<0||!e.target)&&(k=0)},P=function(e){return null==w&&(w="hidden"==pe(t.body,"visibility")),w||!("hidden"==pe(e.parentNode,"visibility")&&"hidden"==pe(e,"visibility"))},_=function(e,i){var o,r=e,n=P(e);for(g-=i,b+=i,f-=i,y+=i;n&&(r=r.offsetParent)&&r!=t.body&&r!=G;)(n=(pe(r,"opacity")||1)>0)&&"visible"!=pe(r,"overflow")&&(o=r.getBoundingClientRect(),n=y>o.left&&f<o.right&&b>o.top-1&&g<o.bottom+1);return n},x=ye(N=function(){var e,i,n,s,a,l,u,m,L,S,C,N,x=o.elements;if((h=r.loadMode)&&k<8&&(e=x.length)){for(i=0,E++;i<e;i++)if(x[i]&&!x[i]._lazyRace)if(!M||o.prematureUnveil&&o.prematureUnveil(x[i]))O(x[i]);else if((m=x[i][J]("data-expand"))&&(l=1*m)||(l=T),S||(S=!r.expand||r.expand<1?G.clientHeight>500&&G.clientWidth>500?500:370:r.expand,o._defEx=S,C=S*r.expFactor,N=r.hFac,w=null,T<C&&k<1&&E>2&&h>2&&!t.hidden?(T=C,E=0):T=h>1&&E>1&&k<6?S:A),L!==l&&(p=innerWidth+l*N,v=innerHeight+l,u=-1*l,L=l),n=x[i].getBoundingClientRect(),(b=n.bottom)>=u&&(g=n.top)<=v&&(y=n.right)>
13=u*N&&(f=n.left)<=p&&(b||y||f||g)&&(r.loadHidden||P(x[i]))&&(c&&k<3&&!m&&(h<3||E<4)||_(x[i],l))){if(O(x[i]),a=!0,k>9)break}else!a&&c&&!s&&k<4&&E<4&&h>2&&(d[0]||r.preloadAfterLoad)&&(d[0]||!m&&(b||y||f||g||"auto"!=x[i][J](r.sizesAttr)))&&(s=d[0]||x[i]);s&&!a&&O(s)}}),F=fe(R=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(C(e),de(t,r.loadedClass),ce(t,r.loadingClass),ue(t,I),he(t,"lazyloaded"))}),I=function(e){F({target:e.target})},H=function(e,t){var i=e.getAttribute("data-load-mode")||r.iframeLoadMode;0==i?e.contentWindow.location.replace(t):1==i&&(e.src=t)},V=function(e){var t,i=e[J](r.srcsetAttr);(t=r.customMedia[e[J]("data-media")||e[J]("media")])&&e.setAttribute("media",t),i&&e.setAttribute("srcset",i)},D=fe((function(e,t,i,o,n){var s,a,l,d,c,h;(c=he(e,"lazybeforeunveil",t)).defaultPrevented||(o&&(i?de(e,r.autosizesClass):e.setAttribute("sizes",o)),a=e[J](r.srcsetAttr),s=e[J](r.srcAttr),n&&(d=(l=e.parentNode)&&re.test(l.nodeName||"")),h=t.firesLoad||"src"in e&&(a||s||d),c={target:e},de(e,r.loadingClass),h&&(clearTimeout(u),u=te(C,2500),ue(e,I,!0)),d&&ae.call(l.getElementsByTagName("source"),V),a?e.setAttribute("srcset",a):s&&!d&&(S.test(e.nodeName)?H(e,s):e.src=s),n&&(a||d)&&me(e,{src:s})),e._lazyRace&&delete e._lazyRace,ce(e,r.lazyClass),ge((function(){var t=e.complete&&e.naturalWidth>1;h&&!t||(t&&de(e,r.fastLoadedClass),R(c),e._lazyCache=!0,te((function(){"_lazyCache"in e&&delete e._lazyCache}),9)),"lazy"==e.loading&&k--}),!0)})),O=function(e){if(!e._lazyRace){var t,i=L.test(e.nodeName),o=i&&(e[J](r.sizesAttr)||e[J]("sizes")),n="auto"==o;(!n&&c||!i||!e[J]("src")&&!e.srcset||e.complete||le(e,r.errorClass)||!le(e,r.lazyClass))&&(t=he(e,"lazyunveilread").detail,n&&Le.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,k++,D(e,t,n,o,i))}},q=be((function(){r.loadMode=3,x()})),B=function(){c||(i.now()-m<999?te(B,999):(c=!0,r.loadMode=3,x(),ee("scroll",j,!0)))},{_:function(){m=i.now(),o.elements=t.getElementsByClassName(r.lazyClass),d=t.getElementsByClassName(r.lazyClass+" "+r.preloadClass),ee("scroll",x,!0),ee("resize",x,!0),ee("pageshow",(function(e){if(e.persisted){var i=t.querySelectorAll("."+r.loadingClass);i.length&&i.forEach&&ie((function(){i.forEach((function(e){e.complete&&O(e)}))}))}})),e.MutationObserver?new MutationObserver(x).observe(G,{childList:!0,subtree:!0,attributes:!0}):(G[Z]("DOMNodeInserted",x,!0),G[Z]("DOMAttrModified",x,!0),setInterval(x,999)),ee("hashchange",x,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(e){t[Z](e,x,!0)})),/d$|^c/.test(t.readyState)?B():(ee("load",B),t[Z]("DOMContentLoaded",x),te(B,2e4)),o.elements.length?(N(),ge._lsFlush()):x()},checkElems:x,unveil:O,_aLSL:j=function(){3==r.loadMode&&(r.loadMode=2),q()}}),Le=(s=fe((function(e,t,i,o){var r,n,s;if(e._lazysizesWidth=o,o+="px",e.setAttribute("sizes",o),re.test(t.nodeName||""))for(n=0,s=(r=t.getElementsByTagName("source")).length;n<s;n++)r[n].setAttribute("sizes",o);i.detail.dataAttr||me(e,i.detail)})),a=function(e,t,i){var o,r=e.parentNode;r&&(i=ve(e,r,i),(o=he(e,"lazybeforesizes",{width:i,dataAttr:!!t})).defaultPrevented||(i=o.detail.width)&&i!==e._lazysizesWidth&&s(e,r,o,i))},{_:function(){n=t.getElementsByClassName(r.autosizesClass),ee("resize",l)},checkElems:l=be((function(){var e,t=n.length;if(t)for(e=0;e<t;e++)a(n[e])})),updateElem:a}),Se=function(){!Se.i&&t.getElementsByClassName&&(Se.i=!0,Le._(),we._())};return te((function(){r.init&&Se()})),o={cfg:r,autoSizer:Le,loader:we,init:Se,uP:me,aC:de,rC:ce,hC:le,fire:he,gW:ve,rAF:ge}}(Ee,Ee.document,Date),Ee.lazySizes=Ce,ke.exports&&(ke.exports=Ce);const Pe={overlay:1051,modal:1052,dropdown:1053},_e='\n  <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20">\n    <path fill="currentColor" d="m6.063 14.711-.775-.774L9.226 10 5.288 6.062l.774-.774L10 9.226l3.938-3.938.773.774L10.774 10l3.938 3.938-.774.773L10 10.774l-3.938 3.938Z"/>\n  </svg>\n';function Ne(e,t,i){try{e.style.setProperty(t,String(i),"important")}catch(o){}}function xe(){document.querySelectorAll(".redactor-overlay").forEach((e=>Ne(e,"z-index",Pe.overlay))),document.querySelectorAll(".redactor-modal").forEach((e=>Ne(e,"z-index",Pe.modal))),document.querySelectorAll(".redactor-dropdown").forEach((e=>Ne(e,"z-index",Pe.dropdown)))}function Re(){document.querySelectorAll(".redactor-close").forEach((e=>{e.querySelector("svg")||(e.innerHTML=_e),e.getAttribute("role")||e.setAttribute("role","button"),e.getAttribute("aria-label")||e.setAttribute("aria-label","Close"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")}))}function Fe(e,t,i){const o=t.map(((e,t)=>{var o,r;const n=(null==(r=null==(o=e.textContent)?void 0:o.trim)?void 0:r.call(o).replace(/\s+/g," "))||"";return{item:e,index:t,rank:i.get(n)}}));o.filter((({rank:e})=>void 0!==e)).length<3||o.slice().sort(((e,t)=>{var i,o;const r=null!=(i=e.rank)?i:Number.MAX_SAFE_INTEGER,n=null!=(o=t.rank)?o:Number.MAX_SAFE_INTEGER;return r!==n?r-n:e.index-t.index}
13)).forEach((({item:t})=>e.appendChild(t)))}function Ie(){const e=new Map([["Normal text",0],["Heading",1],["Sub Heading",2],["Caption",3],["Quote",4],["Code",5]]);document.querySelectorAll(".redactor-dropdown").forEach((t=>{const i=t.querySelector(":scope > ul");i?Fe(i,Array.from(i.children),e):Fe(t,Array.from(t.querySelectorAll(":scope > a, :scope > button")),e)}))}function He(){xe(),Re(),Ie();new MutationObserver((e=>{for(const r of e)for(const e of r.addedNodes)if(i=void 0,o=void 0,(t=e)&&1===t.nodeType&&((null==(i=t.matches)?void 0:i.call(t,".redactor-overlay, .redactor-modal, .redactor-dropdown"))||(null==(o=t.querySelector)?void 0:o.call(t,".redactor-overlay, .redactor-modal, .redactor-dropdown"))))return xe(),Re(),void Ie();var t,i,o})).observe(document.documentElement,{childList:!0,subtree:!0})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",He,{once:!0}):He();const Ve=new Set(["/pricing","/login","/sign-up"]);function De(e,t){if(!e||!t)return!1;let i,o;try{i=new URL(e,t),o=new URL(t)}catch{return!1}if(i.origin!==o.origin)return!1;const r=i.pathname.replace(/\/+$/,"")||"/";return Ve.has(r)}let Oe=null;function qe(e){null==Oe||Oe.handlePopstate(e)}class je{constructor(e,t){var i,o;this.root=e,this.dialog=e.querySelector('dialog[data-dialog="project-unsaved-changes"]'),this.isDirty=t,this.href=window.location.href,this.historyState=window.history.state,this.restoringHistory=!1,this.beforeUnload=e=>{this.approvedDeparture?this.approvedDeparture=!1:this.isDirty()&&(e.preventDefault(),e.returnValue="")},this.click=this.handleClick.bind(this),this.dialogClick=e=>{e.target.closest("[data-project-leave]")&&(this.leaveChosen=!0)},this.dialogClose=()=>{var e,t;const i=this.pending;this.pending=null,!this.destroyed&&i&&(this.leaveChosen?(this.approvedDeparture=!0,i.leave()):null==(t=null==(e=i.trigger)?void 0:e.focus)||t.call(e,{preventScroll:!0}))},null==(i=this.dialog)||i.addEventListener("click",this.dialogClick),null==(o=this.dialog)||o.addEventListener("close",this.dialogClose),Oe=this,window.addEventListener("click",this.click,!0),this.sync()}sync(){if(this.destroyed)return;this.approvedDeparture=!1;const e=this.isDirty();e!==this.listeningBeforeUnload&&(this.listeningBeforeUnload=e,window[e?"addEventListener":"removeEventListener"]("beforeunload",this.beforeUnload))}handleClick(e){var t,i;if(!this.isDirty()||e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;const o=null==(i=(t=e.target).closest)?void 0:i.call(t,"a[href]");if(o===this.approvedLink)return;if(!o||o.hasAttribute("download"))return;const r=o.getAttribute("target");if(r&&"_self"!==r.toLowerCase())return;if(o.closest(".redactor-in, .redactor-toolbar, .redactor-dropdown, .redactor-modal, .redactor-air, .redactor-context-toolbar"))return;const n=new URL(o.href,window.location.href),s=new URL(window.location.href);if(!["http:","https:"].includes(n.protocol))return;if(n.origin===s.origin&&n.pathname===s.pathname&&n.search===s.search)return;const a=n.origin!==s.origin||o.hasAttribute("target")||o.hasAttribute("data-router-disabled")||De(n.href,s.href);e.preventDefault(),e.stopImmediatePropagation(),this.requestLeave((()=>{this.approvedLink=o,o.click(),this.approvedLink=null,a||(this.approvedDeparture=!1)}),o)}requestLeave(e,t=document.activeElement){var i,o;this.pending||this.destroyed||((null==(i=this.dialog)?void 0:i.okayDialog)?(this.pending={leave:e,trigger:t},this.leaveChosen=!1,this.dialog.okayDialog.showDialog(this.root),null==(o=this.dialog.querySelector("[data-project-stay]"))||o.focus({preventScroll:!0})):window.confirm("You have unsaved project changes. Are you sure you want to leave?")&&(this.approvedDeparture=!0,e()))}handlePopstate(e){var t,i,o,r;if(this.restoringHistory){e.stopImmediatePropagation();const t=this.restoringHistory;return this.restoringHistory=!1,void this.requestLeave(t)}const n=new URL(this.href),s=new URL(window.location.href);if((s.pathname!==n.pathname||s.search!==n.search)&&this.isDirty()&&!this.approvedDeparture){e.stopImmediatePropagation();const n=(null!=(i=null==(t=this.historyState)?void 0:t._historyIndex)?i:0)-(null!=(r=null==(o=e.state)?void 0:o._historyIndex)?r:0);n?(this.restoringHistory=()=>window.history.go(-n),window.history.go(n)):(window.history.replaceState(this.historyState,"",this.href),this.requestLeave((()=>{window.location.href=s.href})))}else this.href=s.href,this.historyState=e.state,this.approvedDeparture=!1}destroy(){var e,t;this.destroyed=!0,this.pending=null,null==(e=this.dialog)||e.removeEventListener("click",this.dialogClick),null==(t=this.dialog)||t.removeEventListener("close",this.dialogClose),window.removeEventListener("click",this.click,!0),Oe===this&&(Oe=null),window.removeEventListener("beforeunload",this.beforeUnload)}}
13function Be(e,t=("undefined"==typeof document?null:document.body)){null==t||t.classList.toggle("is-bento-chrome-hidden",Boolean(e))}function Ue(e,t=("undefined"==typeof document?null:document.querySelector(".core-footer"))){var i;const o=function(e){var t,i,o,r,n,s,a,l,d,c;return"portfolio"!==(null!=(o=null==(t=null==e?void 0:e.dataset)?void 0:t.handle)?o:null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,"data-handle"))||"dark"===(null!=(c=null!=(l=null!=(s=null==(r=null==e?void 0:e.dataset)?void 0:r.projectTheme)?s:null==(n=null==e?void 0:e.getAttribute)?void 0:n.call(e,"data-project-theme"))?l:null==(a=null==e?void 0:e.dataset)?void 0:a.theme)?c:null==(d=null==e?void 0:e.getAttribute)?void 0:d.call(e,"data-theme"))?"black":"gray"}(e);return null==(i=null==t?void 0:t.setAttribute)||i.call(t,"data-accent",o),o}function We(){if("undefined"==typeof window)return!1;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return!0;try{return"0"===getComputedStyle(document.documentElement).getPropertyValue("--reduced-motion").trim()}catch{return!1}}function ze(e,t=document){var i,o;const r=null==(i=t.querySelector)?void 0:i.call(t,".core-nav-user-list"),n=null==(o=e.querySelector)?void 0:o.call(e,".core-nav-user-list");if(r&&n){const e=n.classList.contains("has-notification-preview"),t=r.querySelector(":scope > .core-nav-user-notifications-preview"),i=n.querySelector(":scope > .core-nav-user-notifications-preview");if(r.classList.toggle("has-notification-preview",e),r.dataset.notificationCount=n.dataset.notificationCount||"0",t&&i)t.innerHTML!==i.innerHTML&&(t.innerHTML=i.innerHTML,"undefined"!=typeof htmx&&htmx.process&&htmx.process(t));else if(t)t.remove();else if(i){const e=i.cloneNode(!0),t=r.querySelector(":scope > .core-nav-user-links-header");t?t.after(e):r.prepend(e),"undefined"!=typeof htmx&&htmx.process&&htmx.process(e)}}["avatar-notif-circle","avatar-notif-circle-mobile"].forEach((i=>{const o=t.getElementById(i),r=e.getElementById(i);o&&r&&(o.className=r.className)}));const s=t.getElementById("notifications-badge"),a=e.getElementById("notifications-badge");s&&a&&(s.innerHTML!==a.innerHTML&&(s.innerHTML=a.innerHTML,"undefined"!=typeof htmx&&htmx.process&&htmx.process(s)),s.className!==a.className&&(s.className=a.className),s.dataset.hasNotifications!==a.dataset.hasNotifications&&(s.dataset.hasNotifications=a.dataset.hasNotifications))}async function $e(e,t,i=null,o={}){if(!e||"string"!=typeof t)return!1;const r=o.preserveAccountChrome?[...e.querySelectorAll(":scope > .core-nav-mobile-account-bg, :scope > .core-nav-mobile-account-divider")]:[],n=(r=t)=>{const n=e.cloneNode(!0);return o.preserveAccountChrome&&n.querySelectorAll(":scope > .core-nav-mobile-account-bg, :scope > .core-nav-mobile-account-divider").forEach((e=>e.remove())),v(n.innerHTML,r,i)};if(n())return!1;const s=document.createElement("div");return s.innerHTML=t,await l(s),!n(s.innerHTML)&&(o.suppressAvatarReadyAnimation&&e.classList.add("is-navbar-auth-refreshed"),e.replaceChildren(...r,...s.childNodes),!0)}function Ye(){const e=document.getElementById("okaydev-navbar-auth-root");(null==e?void 0:e.querySelector(".navbar-auth-placeholder"))&&Ke()}async function Ke(e={}){var t,v;if(!e.force&&!i())return"aborted";if(!e.force&&!o())return"valid";try{const i=await fetch("/api/navbar-auth",{credentials:"same-origin",headers:{Accept:"text/html","X-Requested-With":"XMLHttpRequest"}});if(!i.ok)return r(i.status),401===i.status||403===i.status?"expired":"aborted";const g=await i.text(),f=(new DOMParser).parseFromString(g,"text/html");if(n(f),o()&&s(f))return a(),"expired";if(e.notificationsOnly)return await l(f.querySelector(".core-nav-user-notifications-preview")),ze(f),d(),c.coreNav&&"function"==typeof c.coreNav.rebindNotificationMenuActions&&c.coreNav.rebindNotificationMenuActions(),"valid";let y=!1;const b=document.getElementById("okaydev-navbar-leading-root"),w=f.getElementById("okaydev-pjax-frag-leading");if(b&&w){const e=w.innerHTML,t=u(),i=!b.querySelector(".navbar-mobile-avatar-ph");y=await $e(b,e,t,{suppressAvatarReadyAnimation:i})||y}const L=document.getElementById("okaydev-nav-go-pro-mount"),S=f.getElementById("okaydev-pjax-frag-go-pro");L&&S&&(y=await $e(L,S.innerHTML)||y);const M=document.getElementById("okaydev-nav-add-project-slot"),A=f.getElementById("okaydev-pjax-frag-add-li");M&&(null==A?void 0:A.firstElementChild)&&(y=await $e(M,A.firstElementChild.innerHTML)||y);const T=document.getElementById("okaydev-navbar-auth-root"),k=f.getElementById("okaydev-pjax-frag-user-rail");if(T&&k){const e=k.innerHTML,t=h(),i=!T.querySelector(".navbar-auth-placeholder"),r=await $e(T,e,t,{suppressAvatarReadyAnimation:i,preserveAccountChrome:!0});if(y=r||y,r?m(t,e):ze(f),function(e){if(!e)return;const t=Boolean(e.querySelector(".core-nav-user-container"));e.classList.toggle("is-navbar-auth-user",t),e.classList.toggle("is-navbar-auth-guest",!t)}(T),o()&&p(T))return a(),"expired"}ze(f);const E=document.querySelector(".core-nav");return y&&"undefined"!=typeof htmx&&htmx.process&&E&&htmx.process(E),d(),y&&c.coreNav&&"function"==typeof c.coreNav.rebindAfterNavReplace&&c.coreNav.rebindAfterNavReplace(),y?window.dispatchEvent(new CustomEvent("okaydev:navbar-auth-refreshed")):null==(v=null==(t=c.coreNav)?void 0:t.rebindNotificationMenuActions)||v.call(t),"valid"}catch(g){return"aborted"}}const Qe=w+1e3;let Ge=null;function Xe(e=document){const t=et(e);return!!t&&it(t,tt(t))}function Ze(e=document){var t,i,o,r;const n=et(e);if(!n)return;!function(e){var t,i,o,r,n,s,a;const l=tt(e),d=null!=(t=e.querySelector("#profile-bottom"))?t:null==l?void 0:l.querySelector("#profile-bottom"),c=it(e,l),u=c&&"social"===(null==(i=null==l?void 0:l.dataset)?void 0:i.requestedPage),h=c&&"portfolio"===(null==(o=null==l?void 0:l.dataset)?void 0:o.requestedPage);if(e.querySelectorAll(".profile-nav-ctas.is-below-profile-nav").forEach((e=>{var t;null==(t=e.classList)||t.toggle("is-own-social-profile",u)})),e.querySelectorAll(".profile-ctas-2.is-session-only").forEach((e=>{e.hidden=!u})),e.querySelectorAll(".profile-nav-share-work.is-session-only").forEach((e=>{e.hidden=!h})),e.querySelectorAll(".profile-nav-bookmarks-item.is-session-only").forEach((e=>{e.hidden=!c})),e.querySelectorAll(".profile-portfolio-empty-message.is-own-empty.is-session-only").forEach((e=>{e.hidden=!h})),c)return null==(r=null==l?void 0:l.classList)||r.add("is-own-profile"),null==(n=null==d?void 0:d.classList)||n.add("is-own-profile"),function(e){f(e)}(e),nt(e),void st(e);null==(s=null==l?void 0:l.classList)||s.remove("is-own-profile"),null==(a=null==d?void 0:d.classList)||a.remove("is-own-profile"),nt(e),ot()&&(f(e),function(e){e.querySelectorAll(".user-badges-username-followers-following .user-info-2 > .profile-meta-row-follows-you").forEach((e=>{e.remove()}))}(e));st(e)}(n);const s=tt(n);s&&rt()&&!ot()&&!it(n,s)&&g(n,s,function(e,t){return{isLoggedInViewer:rt,isGuestViewer:ot,isOwnProfile:it(e,t)}}(n,s)).then((()=>{Je(n)})),null==(i=null==(t=n.querySelector("#okaydev-profile-is-own"))?void 0:t.remove)||i.call(t),null==(r=null==(o=n.querySelector("#okaydev-profile-enable-contact"))?void 0:o.remove)||r.call(o),function(e){if(null!=Ge||!e.querySelector(".profile-nav-ctas:not(.is-cta-ready), .profile-aside-actions:not(.is-cta-ready)"))return;Ge=window.setTimeout((()=>{var e;Ge=null;Ze(null!=(e=tt(document))?e:document)}),Qe)}(n),Je(n)}function Je(e=document){const t=et(e);if(!(null==t?void 0:t.querySelector(".profile-nav-ctas:not(.is-cta-ready), .profile-aside-actions:not(.is-cta-ready)")))return;if(!function(){if(!at())return!1;const e=document.getElementById("okaydev-navbar-auth-root");
13if(!e)return!0;if(e.querySelector(".core-nav-user-container"))return!0;return Boolean(e.querySelector(".sign-in, .sign-up, .btn-core-sign-up, a.btn-core-sign-up"))}())return;if(!function(e){const t=e.querySelector(".profile-bottom .profile-nav");if(!t)return!0;return!t.querySelector(".dynamic-block")}(t))return;(function(e,t){const i=tt(e);if(t||ot()||!function(e,t){if(!rt()||ot()||it(e,t))return!1;return Boolean(t)}(e,i))return!0;const o=e.querySelector(`#${y}`);if(!o)return!1;if(b(o)||o.querySelector(".dynamic-block")||o.querySelector(".is-profile-follow-placeholder")||!o.querySelector(".btn-follow, .btn-following"))return!1;return!0})(t,it(t,tt(t)))&&function(e,t){const i=e.querySelector(".profile-ctas .btn-availability.is-contact-session-only");if(!i)return!0;return!i.hidden}(t)&&function(e){null!=Ge&&(window.clearTimeout(Ge),Ge=null);const t=Array.from(e.querySelectorAll(".profile-nav-ctas:not(.is-cta-ready), .profile-aside-actions:not(.is-cta-ready)"));if(!t.length)return;requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.forEach((e=>{e.classList.remove("is-cta-pending"),e.classList.add("is-cta-ready")}))}))}))}(t)}function et(e){const t=e&&"function"==typeof e.querySelector?e:"undefined"!=typeof document?document:e;return t&&"function"==typeof t.querySelector?t:null}function tt(e){var t,i,o;return e instanceof Element&&(null==(t=e.matches)?void 0:t.call(e,'[data-router-view="profile"]'))?e:null!=(o=null==(i=e.querySelector)?void 0:i.call(e,'[data-router-view="profile"]'))?o:null}function it(e,t){var i,o,r;if(null==(i=null==t?void 0:t.classList)?void 0:i.contains("is-own-profile"))return!0;if(e.querySelector("#okaydev-profile-is-own"))return!0;const n=null!=(r=null==(o=null==t?void 0:t.dataset)?void 0:o.profileUsername)?r:function(){const e=window.location.pathname.match(/^\/u\/([^/]+)/i);return e?decodeURIComponent(e[1]):null}(),s=function(){var e;
13const t=null==(e=document.querySelector('.btn-core-add-project[href*="/u/"][href*="/new-project"]'))?void 0:e.getAttribute("href");if(!t)return null;const i=t.match(/\/u\/([^/]+)\/new-project/i);return i?decodeURIComponent(i[1]):null}();return!(!n||!s)&&n.toLowerCase()===s.toLowerCase()}function ot(){if(!at())return!1;const e=document.getElementById("okaydev-navbar-auth-root");if(!e)return!1;const t=Boolean(e.querySelector(".sign-in, .sign-up, .btn-core-sign-up, a.btn-core-sign-up")),i=Boolean(e.querySelector(".core-nav-user-container"));return t&&!i}function rt(){if(!at())return!1;const e=document.getElementById("okaydev-navbar-auth-root");return Boolean(null==e?void 0:e.querySelector(".core-nav-user-container"))}function nt(e){e.querySelector("#okaydev-profile-enable-contact")&&e.querySelectorAll(".profile-ctas .btn-availability.is-contact-session-only").forEach((e=>{e.setAttribute("data-dialog","availability")}))}function st(e){e.querySelectorAll(".profile-ctas .btn-availability.is-contact-session-only").forEach((e=>{e.hidden=!1}))}function at(){const e=document.getElementById("okaydev-navbar-auth-root");return!e||!e.querySelector(".dynamic-block")}function lt(){null!=Ge&&(window.clearTimeout(Ge),Ge=null)}let dt=null;function ct(e){var t;null!=dt&&(window.clearTimeout(dt),dt=null);const i=null!=e?e:document.getElementById(y);null!=(null==(t=null==i?void 0:i.dataset)?void 0:t.okaydevProfileFollowServdDefer)&&delete i.dataset.okaydevProfileFollowServdDefer}async function ut(e){var t;const i=document.getElementById(y);if(!i)return void ct(i);if(null==(t=document.getElementById("profile-bottom"))?void 0:t.classList.contains("is-own-profile"))return ct(i),L(i),void Ze(document);const o=i.dataset.profileNcUserId;if(null==o||""===String(o).trim())return void ct(i);const r=S(document),n=M(r);if(A(r),"hide"===n)return ct(i),void L(i);"show"===n&&(T(i)?b(i)||i.querySelector(".dynamic-block")?null==dt&&(i.dataset.okaydevProfileFollowServdDefer="1",dt=window.setTimeout((()=>{var e;dt=null;const t=document.getElementById(y);null!=(null==(e=null==t?void 0:t.dataset)?void 0:e.okaydevProfileFollowServdDefer)&&delete t.dataset.okaydevProfileFollowServdDefer,ut()}
13),w)):(ct(i),await k(i),Ze(document)):ct(i))}let ht=!1,mt=!1;function pt(){if(mt||"undefined"==typeof document)return;mt=!0;const e=e=>{var t;const i=function(){var e,t;return"undefined"!=typeof window&&(window.csrfTokenValue||window.csrfToken)||(null==(t=null==(e=document.querySelector)?void 0:e.call(document,'meta[name="csrf-token"]'))?void 0:t.getAttribute("content"))||""}();i&&(null==(t=e.detail)?void 0:t.headers)&&(e.detail.headers["X-CSRF-Token"]=i)},t=document.body;t?t.addEventListener("htmx:configRequest",e):document.addEventListener("DOMContentLoaded",(()=>{var t;return null==(t=document.body)?void 0:t.addEventListener("htmx:configRequest",e)}),{once:!0})}function vt(){"undefined"!=typeof window&&(window.htmx=E,window.Sprig=window.Sprig||{components:[]},pt())}function gt(){if(ht||"undefined"==typeof document)return;const e=()=>{if(!ht){ht=!0,pt();try{E.process(document.body)}catch(e){}}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e,{once:!0}):e()}let ft=!1,yt=0;const bt=new Map;async function wt(e,t="social",{chrome:i=!1}={}){const o=function(e,t,i){return`${e.toLowerCase()}:${t}:${i?"chrome":"section"}`}(e,t,i);if(bt.has(o))return bt.get(o);const r=new URLSearchParams({username:e,section:t});i&&r.set("chrome","1");const n=fetch(`/api/bento-social-hub?${r.toString()}`,{credentials:"same-origin",headers:{"X-Requested-With":"XMLHttpRequest"}}).then((async t=>{const i=t.headers.get("X-Bento-Social-Redirect");if(i)return{html:"",redirect:i};if(403===t.status)return{html:"",redirect:`/u/${e}/social`};if(!t.ok)throw new Error(`Bento social hub request failed with ${t.status}.`);return{html:await t.text(),redirect:null}}));bt.set(o,n);try{return await n}finally{bt.delete(o)}}const Lt=/^\/u\/([^/]+)\/(social|likes|bookmarks)\/?$/i,St=new Set(["social","bookmarks"]);function Mt(e){var t,i,o;let r;const n=null!=(o=null==(i=null==(t=globalThis.window)?void 0:t.location)?void 0:i.origin)?o:"https://okaydev.test";try{r=new URL(e,n)}catch(l){return null}if(r.origin!==n)return null;const s=r.pathname.match(Lt);if(!s)return null;let a;try{a=decodeURIComponent(s[1])}catch(l){return null}return{url:r,username:a,section:s[2].toLowerCase()}}function At(e,t="social"){return`/u/${encodeURIComponent(e)}/${t}`}function Tt(e){return St.has(String(e||"").toLowerCase())}function kt(e=globalThis.document){var t;return Boolean(null==(t=null==e?void 0:e.querySelector)?void 0:t.call(e,"[data-bento-page]"))}let Et=!1,Ct=null,Pt=null;const _t=new WeakMap;let Nt=null,xt=null,Rt=!1,Ft=!1,It=0,Ht="/",Vt="",Dt=0,Ot=null,qt=0,jt=!1,Bt=!1,Ut=null,Wt=[],zt=null,$t=null,Yt=null;const Kt=180,Qt=220,Gt=360,Xt=70,Zt=48;function Jt(){var e,t;return Number(null==(e=c.pjax)?void 0:e._historyIndex)||Number(null==(t=history.state)?void 0:t._historyIndex)||0}function ei(e,t=Jt()){c.pjax&&(c.pjax._historyIndex=t,c.pjax.location=c.pjax.Helpers.getLocation(new URL(e,location.href).href))}function ti(){Dt=window.scrollY,zt={owner:document.documentElement.dataset.dialogScrollLockOwner,htmlOverflow:document.documentElement.style.overflow,bodyPosition:document.body.style.position,bodyTop:document.body.style.top,bodyWidth:document.body.style.width},document.documentElement.dataset.dialogScrollLockOwner="page-social-overlay",document.documentElement.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${Dt}px`,document.body.style.width="100%"}function ii(e){if(e)return Wt=[document.querySelector("[data-router-wrapper]"),c.coreHeader,c.coreFooter].filter((e=>e instanceof HTMLElement)).map((e=>({element:e,inert:e.inert}))),void Wt.forEach((({element:e})=>{e.inert=!0}));Wt.forEach((({element:e,inert:t})=>{e.inert=t})),Wt=[]}function oi(){const e=[Pt,ai(Pt)].filter((e=>e instanceof HTMLElement)),t=document.querySelector("[data-bento-customizer]");return t instanceof HTMLElement&&!t.hidden&&t.getClientRects().length>0&&e.push(t),e}function ri(e){const t=Jt()+1;qt+=1,history.pushState({_historyIndex:t,pageSocialOverlay:{returnUrl:Ht,depth:qt}},"",e),ei(e,t)}function ni(){const e=Jt();history.replaceState({_historyIndex:e},"",Ht),ei(Ht,e),document.title=Vt}function si(){var e,t,i;hi(),di(),null==(e=null==xt?void 0:xt.deactivate)||e.call(xt),xt=null,null==(t=null==Nt?void 0:Nt.destroy)||t.call(Nt),Nt=null,null==(i=ai(Pt))||i.remove(),Pt&&_t.delete(Pt),null==Pt||Pt.remove(),Pt=null}function ai(e){var t;return null!=(t=_t.get(e))?t:null==e?void 0:e.querySelector(":scope > .bento-social-overlay__header")}function li(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function di(){var e;$t&&(null==(e=$t.timeline)||e.kill(),$t.close.classList.remove("is-close-revealing"),R.set($t.ring,{clearProps:"stroke-dasharray,stroke-dashoffset"}),R.set($t.spinner,{clearProps:"transform,transform-origin"}),R.set($t.iconLines,{clearProps:"stroke-dasharray,stroke-dashoffset"}),$t=null)}function ci(e=Pt){const t=ai(e);null==t||t.style.removeProperty("--page-social-overlay-close-top"),null==t||t.style.removeProperty("--page-social-overlay-close-left"),null==t||t.style.removeProperty("--page-social-overlay-close-right")}function ui(e=Pt){if(!(e instanceof HTMLElement&&Ct instanceof HTMLElement))return!1;const t=ai(e);if(!t)return!1;if(window.matchMedia("(max-width: 899px)").matches)return ci(e),!1;const i=function(e){var t,i;return null!=(i=mi(e)[0])?i:null==(t=null==e?void 0:e.querySelector)?void 0:t.call(e,"[data-bento-social-section]")}(e),o=function(e){var t,i;if(!(e instanceof HTMLElement))return null;const o=null!=(i=null==(t=e.getAnimations)?void 0:t.call(e))?i:[],r=e.style.transform;o.forEach((e=>e.pause())),e.style.transform="none";const n=e.getBoundingClientRect();return e.style.transform=r,o.forEach((e=>{try{e.play()}catch(t){}})),n}(i);if(!o)return!1;const r=getComputedStyle(e),n=Number.parseFloat(r.getPropertyValue("--bento-social-overlay-close-gap"))||18;return t.style.setProperty("--page-social-overlay-close-top",`${o.top+Ct.scrollTop}px`),t.style.setProperty("--page-social-overlay-close-left",`${o.right+n}px`),t.style.setProperty("--page-social-overlay-close-right","auto"),!0}function hi(){null==Yt||Yt(),Yt=null}function mi(e){if(!(e instanceof HTMLElement))return[];const t=[...e.querySelectorAll('[data-bento-social-section-panel="social"] #social-posts .social-post-wrapper, [data-bento-social-section-panel="likes"] .profile-list > .list-item, [data-bento-social-section-panel="bookmarks"] .profile-list > .list-item')].filter((e=>e instanceof HTMLElement)),i=e.querySelector(".social-guest-preview-footer");if(i instanceof HTMLElement&&t.push(i),t.length)return t;const o=e.querySelector("[data-bento-social-section]");return o instanceof HTMLElement?[o]:[]}async function pi(e,t){const i=mi(e),o=t?i:[...i].reverse();!li()&&o.length?await Promise.all(o.map((async(e,i)=>{const o=F(e,t?[{opacity:0,transform:"translateY(18px)"},{opacity:1,transform:"translateY(0)"}]:[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(12px)"}],{duration:t?Gt:Kt,delay:i*(t?Xt:30),easing:"cubic-bezier(0.22, 1, 0.36, 1)",fill:"both"});try{await o.finished}catch(r){}finally{t?delete e.dataset.pageSocialOverlayItem:e.dataset.pageSocialOverlayItem="hidden",o.cancel()}}))):i.forEach((e=>{t?delete e.dataset.pageSocialOverlayItem:e.dataset.pageSocialOverlayItem="hidden"}))}async function vi(e){const t=null==Ct?void 0:Ct.querySelector("[data-page-social-overlay-backdrop]");t instanceof HTMLElement&&await yi(t,e?0:1,e?1:0,Qt)}async function gi(e){const t=ai(e);if(!(t instanceof HTMLElement))return;const i=t.querySelector("[data-page-social-overlay-close]");i instanceof HTMLElement&&i.style.removeProperty("opacity"),await yi(t,0,1,Kt),delete t.dataset.pageSocialOverlayItem}async function fi(e){const t=ai(e);t instanceof HTMLElement&&(await yi(t,1,0,Kt),t.dataset.pageSocialOverlayItem="hidden")}async function yi(e,t,i,o){if(!(e instanceof HTMLElement)||li()||"function"!=typeof e.animate)return;const r=F(e,[{opacity:t}
13,{opacity:i}],{duration:o,easing:"cubic-bezier(0.22, 1, 0.36, 1)",fill:"both"});try{await r.finished,e.style.opacity=String(i)}catch(n){}finally{r.cancel()}}function bi(e){Ct.append(e);const t=ai(e);t&&(_t.set(e,t),Ct.append(t)),Ct.hidden=!1,Ct.classList.add("is-visible")}function wi(){return null==Ct?void 0:Ct.querySelector("[data-page-social-overlay-backdrop]")}function Li(){var e;const t=wi();t instanceof HTMLElement&&(null==(e=t.getAnimations)||e.call(t).forEach((e=>e.cancel())),t.style.opacity=""),null==Ct||Ct.classList.remove("is-visible"),Ct&&(Ct.hidden=!0),ii(!1),function(){var e,t,i,o;if("page-social-overlay"!==document.documentElement.dataset.dialogScrollLockOwner)return;const r=zt;(null==r?void 0:r.owner)?document.documentElement.dataset.dialogScrollLockOwner=r.owner:delete document.documentElement.dataset.dialogScrollLockOwner,document.documentElement.style.overflow=null!=(e=null==r?void 0:r.htmlOverflow)?e:"",document.body.style.position=null!=(t=null==r?void 0:r.bodyPosition)?t:"",document.body.style.top=null!=(i=null==r?void 0:r.bodyTop)?i:"",document.body.style.width=null!=(o=null==r?void 0:r.bodyWidth)?o:"",(null==r?void 0:r.bodyPosition)||window.scrollTo({top:Dt,behavior:"auto"}),zt=null}(),document.body.classList.remove("has-page-social-overlay")}async function Si({username:e,section:t="social",href:i,postId:o}={}){var r;if(!e||!Tt(t))return!1;Ct instanceof HTMLElement||(Ct=document.createElement("div"),Ct.className="page-social-overlay",Ct.dataset.pageSocialOverlay="",Ct.hidden=!0,Ct.innerHTML='<div class="page-social-overlay__backdrop" data-page-social-overlay-backdrop></div>',document.body.append(Ct)),Rt||Ft||(Ht=`${location.pathname}${location.search}`,Vt=document.title,Ot=document.activeElement,qt=0,jt=!1,Bt=!1);const n=++It;if(Ft=!0,!Rt){const i=function({section:e="social"}={}){const t=I(e),i=document.createElement("article");i.className="bento-card bento-social-card bento-user-hub-card is-expanded is-page-overlay is-overlay-loading",i.dataset.pageSocialOverlayCard="",i.tabIndex=-1;const o=document.querySelector("[data-bento-page]"),r=o instanceof HTMLElement?o.style.getPropertyValue("--bento-page-bg").trim():"";return r&&(i.style.setProperty("--bento-page-bg",r),null==Ct||Ct.style.setProperty("--bento-page-bg",r)),i.innerHTML='<header class="bento-social-hub__header bento-social-overlay__header">'+H(`Close ${t} overlay`,"data-page-social-overlay-close")+'</header><div class="bento-card__surface"><div class="bento-card__content" data-bento-content>'+V("Loading…")+"</div></div>",P(_(),i),i}({username:e,section:t});si(),Pt=i,ii(!0),ti(),document.body.classList.add("has-page-social-overlay");const o=ai(Pt);if(o instanceof HTMLElement){o.dataset.pageSocialOverlayItem="hidden";const e=o.querySelector("[data-page-social-overlay-close]");e instanceof HTMLElement&&(e.style.opacity="0")}bi(Pt),vi(!0),Rt=!0}let s,a;try{[s,,a]=await Promise.all([wt(e,t,{chrome:!0}),(Ut||(Ut=Promise.all([C((()=>Promise.resolve({})),__vite__mapDeps([0])),C((()=>Promise.resolve({})),__vite__mapDeps([1]))])),Ut),C((()=>import("./bentoSocialHub-DRgRYM3r.js")),__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,12,13,14]))])}catch{return n===It&&(Ft=!1,Rt||(Li(),si())),!1}if(n!==It)return!1;if(s.redirect)return Ft=!1,location.assign(s.redirect),!1;const l=document.createElement("template");l.innerHTML=s.html.trim();const d=l.content.firstElementChild,c=null==d?void 0:d.querySelector("[data-bento-social-hub]");if(!(d instanceof HTMLElement&&c instanceof HTMLElement))return Ft=!1,Rt||(Li(),si()),!1;const u=document.body.classList.contains("has-page-social-overlay");u&&function(){var e;const t=wi();t instanceof HTMLElement&&(null==(e=t.getAnimations)||e.call(t).forEach((e=>e.cancel())),t.style.opacity="1")}(),si(),Pt=d;const h=Pt.style.getPropertyValue("--bento-page-bg").trim();return h&&Ct.style.setProperty("--bento-page-bg",h),P(_(),Pt),function(e,{hideChrome:t=!0}={}){mi(e).forEach((e=>{e.dataset.pageSocialOverlayItem="hidden"}));const i=ai(e);if(t&&i instanceof HTMLElement){i.dataset.pageSocialOverlayItem="hidden";const e=i.querySelector("[data-page-social-overlay-close]");e instanceof HTMLElement&&(e.style.opacity="0")}}(Pt,{hideChrome:!0}),function(e){di();const t=null==e?void 0:e.querySelector("[data-page-social-overlay-close]");if(!(t instanceof HTMLButtonElement)||li())return void(null==t||t.classList.remove("is-close-revealing"));const i=t.querySelector(".bento-card__close-ring circle"),o=t.querySelector(".bento-card__close-ring"),r=[...t.querySelectorAll(".bento-card__close-icon path")];i instanceof SVGCircleElement&&o instanceof SVGSVGElement&&2===r.length&&(t.classList.add("is-close-revealing"),R.set(i,{strokeDasharray:1,strokeDashoffset:1}),R.set(o,{rotation:-360,transformOrigin:"50% 50%"}),R.set(r,{strokeDasharray:1,strokeDashoffset:1}),$t={close:t,iconLines:r,ring:i,spinner:o,timeline:null})}(Pt),u||(ii(!0),ti(),document.body.classList.add("has-page-social-overlay")),bi(Pt),Nt=a.mountBentoUserHub(c,{onNavigate:e=>ri(e),onRedirect:e=>{Mi(),location.assign(e)}}),function(e){hi();const t=D();let i=!1;const o=()=>{!i&&t.active&&(i=!0,t.frame((()=>{i=!1,ui(e)})))};t.listen(window,"resize",o),t.listen(window,"links:bento-social-section-mounted",(t=>{var i;Ft||(null==(i=t.detail)?void 0:i.root)&&e.contains(t.detail.root)&&o()})),Yt=()=>{t.destroy(),ci(e)},o()}(Pt),function(){if(!$t)return;const e=$t,t=R.timeline({defaults:{overwrite:"auto"}});t.to(e.ring,{autoRound:!1,strokeDashoffset:0,duration:1.1,ease:"power2.inOut",clearProps:"stroke-dasharray,stroke-dashoffset",onComplete:()=>e.close.classList.remove("is-close-revealing")},0),t.to(e.spinner,{rotation:0,duration:1.1,ease:"power2.inOut",clearProps:"transform,transform-origin"},0),t.to(e.iconLines,{autoRound:!1,strokeDashoffset:0,duration:.26,ease:"power2.inOut",stagger:.08,clearProps:"stroke-dasharray,stroke-dashoffset"},.76),e.timeline=t}(),await Promise.all([u?Promise.resolve():vi(!0),gi(Pt)]),n===It&&(await pi(Pt,!0),n===It&&(Ft=!1,Rt=!0,(i&&(null==(r=Mt(location.href))?void 0:r.section)!==t||i&&location.pathname!==new URL(i,location.href).pathname)&&ri(i),Pt.tabIndex=-1,xt=N(oi(),{escapeDeactivates:!1,clickOutsideDeactivates:!1,fallbackFocus:Pt,initialFocus:()=>oi().some((e=>e.contains(document.activeElement)))?document.activeElement:Pt,preventScroll:!0}),xt.activate(),document.querySelector(".okay-dialog[open]")&&xt.pause(),function(e){var t;if(!(e&&Pt instanceof HTMLElement&&Ct instanceof HTMLElement))return!1;const i=Pt.querySelector(`[data-metrics-entry-id="${CSS.escape(String(e))}"]`),o=null!=(t=null==i?void 0:i.closest(".social-post-wrapper"))?t
13:i;if(!(o instanceof HTMLElement))return!1;const r=Ct.getBoundingClientRect(),n=o.getBoundingClientRect(),s=Ct.scrollTop+n.top-r.top-(Ct.clientHeight-n.height)/2;Ct.scrollTo({top:Math.max(0,s-Zt),behavior:li()?"auto":"smooth"})}(o),!0))}async function Mi({fromPopstate:e=!1}={}){var t,i;if(It+=1,Ft&&!Rt)return Ft=!1,Li(),void si();if(Ft=!1,Rt&&(!Bt||e)){if(Bt||(Bt=!0,null==(t=null==Nt?void 0:Nt.destroy)||t.call(Nt),Nt=null),!e&&qt>0)return jt=!0,void history.go(-qt);e||ni(),await Promise.all([pi(Pt,!1),fi(Pt)]),await vi(!1),Li(),si(),Rt=!1,qt=0,jt=!1,Bt=!1,null==(i=null==Ot?void 0:Ot.focus)||i.call(Ot,{preventScroll:!0}),Ot=null}}function Ai(e){var t,i;if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;const o=e.target;if(!(o instanceof Element))return;if((Rt||Ft)&&function(e){return e instanceof Element&&Ct instanceof HTMLElement&&(e===Ct||Boolean(e.closest("[data-page-social-overlay-close], [data-page-social-overlay-backdrop]")))}(o))return e.preventDefault(),e.stopImmediatePropagation(),void Mi();if((Rt||Ft)&&(null==Ct?void 0:Ct.contains(o)))return;const r=o.closest("[data-bento-user-hub-trigger]");if(r instanceof HTMLElement&&kt()&&!function(e,t){const i=e.closest('a, button, input, select, textarea, [contenteditable="true"]');return i instanceof Element&&i!==t}(o,r)){const o=null==(t=r.closest("[data-profile-username]"))?void 0:t.dataset.profileUsername,n=r.dataset.bentoUserHubTrigger||"social",s=r.dataset.bentoSocialPostId;if(!o||!Tt(n))return;const a=`/u/${encodeURIComponent(o)}/${n}`;return e.preventDefault(),e.stopImmediatePropagation(),void Si({username:o,section:n,href:a,postId:s,sourceElement:null!=(i=r.closest("[data-bento-user-hub-source]"))?i:r})}const n=o.closest("a[href]");if(!(n instanceof HTMLAnchorElement)||n.target||n.hasAttribute("download"))return;if(n.closest('[data-bento-social-hub], [data-router-view="profile"], [data-bento-made-on]'))return;if(!kt())return;const s=Mt(n.href);s&&Tt(s.section)&&(e.preventDefault(),e.stopImmediatePropagation(),Si({...s,href:n.href}))}function Ti(e){var t,i,o,r,n,s;if(!Rt)return;const a=Mt(location.href),l=null==Pt?void 0:Pt.querySelector("[data-bento-social-hub]");if(jt){e.stopImmediatePropagation();return`${location.pathname}${location.search}`!==Ht?ni():(ei(location.href,Number(null==(t=e.state)?void 0:t._historyIndex)||Jt()),document.title=Vt),void Mi({fromPopstate:!0})}if(a&&a.username.toLowerCase()===(null==(i=null==l?void 0:l.dataset.profileUsername)?void 0:i.toLowerCase()))return e.stopImmediatePropagation(),qt=Number(null==(r=null==(o=e.state)?void 0:o.pageSocialOverlay)?void 0:r.depth)||qt,ei(location.href,Number(null==(n=e.state)?void 0:n._historyIndex)||Jt()),void(null==(s=null==Nt?void 0:Nt.navigate)||s.call(Nt,a.section,{push:!1}));e.stopImmediatePropagation(),Mi({fromPopstate:!0})}function ki(e){var t,i;if("Escape"===e.key&&(Rt||Ft)){if(e.defaultPrevented||document.querySelector(".overlay-share[open], .okay-dialog[open]"))return;return e.preventDefault(),void Mi()}if(Rt||"Enter"!==e.key&&" "!==e.key)return;const o=e.target;if(!(o instanceof HTMLElement&&o.matches("[data-bento-user-hub-trigger]")&&kt()))return;const r=null==(t=o.closest("[data-profile-username]"))?void 0:t.dataset.profileUsername,n=o.dataset.bentoUserHubTrigger||"social",s=o.dataset.bentoSocialPostId;r&&Tt(n)&&(e.preventDefault(),Si({username:r,section:n,href:`/u/${encodeURIComponent(r)}/${n}`,postId:s,sourceElement:null!=(i=o.closest("[data-bento-user-hub-source]"))?i:o}))}function Ei(){var e;Rt&&(null==(e=null==xt?void 0:xt.pause)||e.call(xt))}function Ci(){var e;Rt&&!document.querySelector(".okay-dialog[open]")&&(null==(e=null==xt?void 0:xt.unpause)||e.call(xt))}function Pi(){Et||(Et=!0,document.addEventListener("click",Ai,!0),x({canHandlePopstate:()=>Rt,handlePopstate:Ti}),document.addEventListener("keydown",ki),window.addEventListener("okaydev:dialog-opened",Ei),window.addEventListener("okaydev:dialog-closed",Ci),window.addEventListener("pjax:send",(()=>{bt.clear(),(Rt||Ft)&&Mi({fromPopstate:!0})})))}const _i=/^\/u\/([^/]+)(?:\/(portfolio|about|social|likes|bookmarks))?\/?$/i;let Ni=null,xi=!1;function Ri(e){try{return decodeURIComponent(e)}catch(t){return e}}function Fi(e){try{return new URL(e,window.location.origin).href}catch(t){return null}}function Ii(e){let t;try{t=new URL(e,window.location.origin)}catch(o){return null}if(t.origin!==window.location.origin)return null;const i=t.pathname.match(_i);return i?{url:t,username:Ri(i[1]).toLowerCase(),rawUsername:Ri(i[1]),subpage:i[2]||"portfolio"}:null}function Hi(e){Ni=null!=e?e:null}function Vi(e){Ni===e&&(Ni=null)}function Di(e,t=null){var i,o,r;const n=Ii(e);if(!n)return!1;const s=null!=t?t:document.querySelector('[data-router-view="profile"]'),a=null==(r=null==(o=null==(i=null==s?void 0:s.dataset)?void 0:i.profileUsername)?void 0:o.toLowerCase)?void 0:r.call(o);return Boolean(a&&n.username===a)}async function Oi(e){var t,i,o,r,n,s,a,l,d;const u=Fi(e);if(!u)throw new Error("Invalid profile subpage URL.");const h=c.pjax,m=null==(i=null==(t=null==h?void 0:h.cache)?void 0:t.get)?void 0:i.call(t,u);if(null==(r=null==(o=null==m?void 0:m.view)?void 0:o.matches)?void 0:r.call(o,'[data-router-view="profile"]'))return m;const p=await fetch(u,{mode:"same-origin",method:"GET",headers:{"X-Requested-With":"PjaxMax"},credentials:"same-origin"});if(!p.ok)throw new Error(`Profile subpage fetch failed with ${p.status}.`);const v=await p.text(),g=(null==(n=null==h?void 0:h.Helpers)?void 0:n.getProperties)?h.Helpers.getProperties(v):null;if(!(null==(a=null==(s=null==g?void 0:g.view)?void 0:s.matches)?void 0:a.call(s,'[data-router-view="profile"]')))throw new Error("Profile subpage response did not include a profile view.");return null==(d=null==(l=null==h?void 0:h.cache)?void 0:l.set)||d.call(l,u,g),g}function qi(e,t){const i=c.pjax;if(!i||!t)return;const o=Fi(e);o&&(i.location=i.Helpers.getLocation(o),i.properties=t,i.From&&(i.From.properties=t))}function ji(e){var t;const i=Fi(e);if(!i)return;const o=c.pjax,r=(Number.isFinite(null==o?void 0:o._historyIndex)?o._historyIndex:Number(null==(t=history.state)?void 0:t._historyIndex)||0)+1;o&&(o._historyIndex=r),history.pushState({_historyIndex:r},"",i)}function Bi(){xi||"undefined"==typeof window||(xi=!0,window.addEventListener("popstate",(e=>{const t=Ni;t&&"function"==typeof t.canHandleProfileSectionNavigation&&"function"==typeof t.navigateProfileSection&&t.canHandleProfileSectionNavigation(window.location.href,{isPopstate:!0})&&(e.stopImmediatePropagation(),c.isPopstate=!0,function(e){var t;const i=Number(null==(t=null==e?void 0:e.state)?void 0:t._historyIndex);Number.isFinite(i)&&c.pjax&&(c.pjax._historyIndex=i)}
13(e),t.navigateProfileSection(window.location.href,{isPopstate:!0}).catch((()=>{window.location.reload()})))}),!0))}const Ui=/^\/user\/notifications\/?$/i;let Wi=null,zi=!1;function $i(e){try{return new URL(e,window.location.origin).href}catch(t){return null}}function Yi(e){let t;try{t=new URL(e,window.location.origin)}catch(i){return null}return t.origin===window.location.origin&&Ui.test(t.pathname)?{url:t,filter:t.searchParams.get("filter")||"all"}:null}function Ki(e){Wi=null!=e?e:null}function Qi(e){Wi===e&&(Wi=null)}function Gi(e){var t;const i=$i(e);if(!i)return;const o=c.pjax,r=(Number.isFinite(null==o?void 0:o._historyIndex)?o._historyIndex:Number(null==(t=history.state)?void 0:t._historyIndex)||0)+1;o&&(o._historyIndex=r),history.pushState({_historyIndex:r},"",i)}function Xi(e){const t=$i(e);t&&c.pjax&&(c.pjax.location=c.pjax.Helpers.getLocation(t))}function Zi(){zi||"undefined"==typeof window||(zi=!0,window.addEventListener("popstate",(e=>{const t=Wi;t&&"function"==typeof t.canHandleNotificationFilterNavigation&&"function"==typeof t.navigateNotificationFilter&&t.canHandleNotificationFilterNavigation(window.location.href,{isPopstate:!0})&&(e.stopImmediatePropagation(),c.isPopstate=!0,function(e){var t;const i=Number(null==(t=null==e?void 0:e.state)?void 0:t._historyIndex);Number.isFinite(i)&&c.pjax&&(c.pjax._historyIndex=i)}(e),t.navigateNotificationFilter(window.location.href,{isPopstate:!0}).catch((()=>{window.location.reload()})))}),!0))}const Ji=[];function eo(e){window.__okaydevServdFinalizeRenderer=null!=e?e:null,function(e){if(e&&"function"==typeof e.finalizeServdDynamicBlocks)for(;Ji.length;)e.finalizeServdDynamicBlocks(Ji.shift())}(window.__okaydevServdFinalizeRenderer)}function to(e,t){const i=new Set;if(null==e||""===e)return i;let o;try{o=new URL(String(e),t)}catch{return i}return o.origin!==t||(i.add(o.href),io(o.pathname,t,i)),i}function io(e,t,i){if(e&&"string"==typeof e){try{i.add(new URL(e,t).href)}catch{return}if(e.endsWith("/")){const o=e.replace(/\/+$/,"")||"/";try{i.add(new URL(o,t).href)}catch{}}else try{i.add(new URL(`${e}/`,t).href)}catch{}}}function oo(){var e;const t=c.pjax;if(!(null==t?void 0:t.cache)||!(null==(e=t.From)?void 0:e.wrap))return;const i=t.From.wrap.firstElementChild;if(!ce(i))return;const o=c.currentPage;if(!o||"string"!=typeof o)return;const r=window.location.origin,n=new Set;io(o,r,n),n.forEach((e=>t.cache.delete(e)))}window.__okaydevServdDynamicLoadedBridge||(window.__okaydevServdDynamicLoadedBridge=!0,window.addEventListener("servd.dynamicloaded",(e=>{var t;const i=null==(t=e.detail)?void 0:t.blocks,o=Array.isArray(i)?i:[],r=window.__okaydevServdFinalizeRenderer;r&&"function"==typeof r.finalizeServdDynamicBlocks?r.finalizeServdDynamicBlocks(o):(Ji.push(o),O(o))})));const ro="is-pointer-hover-armed";const no=[[".servd-dynamic-stale-preview","data-servd-preview-pending"],["dialog.okay-dialog[open]","data-okay-dialog-open"],[".auth-shell-bg","data-auth-shell"],['[data-handle="edit-portfolio"], [data-handle="new-project"]',"data-project-editor"]],so='.servd-dynamic-stale-preview, dialog.okay-dialog, .auth-shell-bg, [data-handle="edit-portfolio"], [data-handle="new-project"]';const ao="okaydev.tunable.";function lo(){var e,t,i,o;return"undefined"!=typeof document&&("true"===(null==(t=null==(e=document.body)?void 0:e.dataset)?void 0:t.userIsAdmin)||("undefined"!=typeof location&&"okaydev.test"===location.hostname||!!(null==(o=null==(i=document.body)?void 0:i.classList)?void 0:o.contains("is-dev"))))}function co(e,t){if(!lo()||"undefined"==typeof window)return t;try{const i=new URLSearchParams(window.location.search).get(e);if(null!==i){if(""===i)return window.localStorage.removeItem(ao+e),t;const o=Number.parseInt(i,10);if(Number.isFinite(o))return window.localStorage.setItem(ao+e,String(o)),o}const o=window.localStorage.getItem(ao+e);if(null!==o){const e=Number.parseInt(o,10);if(Number.isFinite(e))return e}}catch(i){}return t}function uo(){return"undefined"!=typeof window&&window.matchMedia("(max-width: 767px)").matches}function ho(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent||"";return!/Chrome|Chromium|Edg|Android|CriOS|FxiOS/i.test(e)&&(/Safari/i.test(e)&&!uo())}function mo(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent||"",t=/Macintosh/i.test(e)&&(navigator.maxTouchPoints||0)>1;return/iPhone|iPod|iPad|CriOS|FxiOS/i.test(e)||t}const po={maxLivePosts:co("maxLivePosts",function(){if(!uo())return ho()?80:100;if(mo())return 40;const e="undefined"!=typeof navigator&&navigator.deviceMemory||4;return e<=2?40:e<=4?60:80}()),livePostHysteresis:co("livePostHysteresis",ho()?10:mo()?15:20),maxLoadedFeedImages:co("maxLoadedFeedImages",mo()?10:16),feedSingleImageMaxWidth:co("feedSingleImageMaxWidth",uo()?mo()?640:768:1200),feedDebug:function(e,t){if(!lo()||"undefined"==typeof window)return t;try{window.localStorage.removeItem(ao+e);const t=new URLSearchParams(window.location.search).get(e);if(null!==t){const e=Number.parseInt(t,10);if(Number.isFinite(e))return e}}catch(i){}return t}("feedDebug",0)}
13,vo=400,go=vo,fo="okaydev:load-earlier-trigger";class yo{constructor({formContainer:e,sentinelId:t="load-earlier-oob",stream:i}){this.formContainer=e||null,this.sentinelId=t,this.stream=i||null,this.active=!1,this.loading=!1,this.progress=0,this.scrollSettleTimer=null,this.pendingFormRevealObserver=null,this.handleScroll=this.handleScroll.bind(this),this.handleSentinelState=this.handleSentinelState.bind(this),this.handleAfterSwap=this.handleAfterSwap.bind(this)}init(){this.formContainer?(document.body.setAttribute("data-load-earlier-gesture","on"),this.applyGestureTrigger(),this.syncFromSentinel(),window.addEventListener("scroll",this.handleScroll,{passive:!0}),document.addEventListener("feed:load-earlier-sentinel-changed",this.handleSentinelState),document.addEventListener("htmx:afterSwap",this.handleAfterSwap),po.feedDebug&&console.log("[feed] load-earlier: gesture initialized",{initialSentinelActive:this.active})):po.feedDebug&&console.warn("[feed] load-earlier: no form container, gesture disabled")}destroy(){var e;document.body.removeAttribute("data-load-earlier-gesture"),document.body.removeAttribute("data-social-load-earlier-mode"),null==(e=this.formContainer)||e.removeAttribute("data-load-earlier-mode"),window.removeEventListener("scroll",this.handleScroll),document.removeEventListener("feed:load-earlier-sentinel-changed",this.handleSentinelState),document.removeEventListener("htmx:afterSwap",this.handleAfterSwap),this.scrollSettleTimer&&(window.clearTimeout(this.scrollSettleTimer),this.scrollSettleTimer=null),this.cancelPendingFormReveal()}getSentinel(){return document.getElementById(this.sentinelId)}getSentinelNumberValue(e,t){var i,o;const r=e.getAttribute("hx-vals")||e.getAttribute("data-hx-vals");if(r)try{const e=JSON.parse(r),o=Number.parseInt(null!=(i=null==e?void 0:e[t])?i:"",10);if(Number.isFinite(o))return o}catch(s){}const n=Number.parseInt(null!=(o=e.getAttribute(`s-val:${t}`))?o:"",10);return Number.isFinite(n)?n:null}isSentinelActive(){const e=this.getSentinel();if(!e)return!1;if("none"===e.style.display)return!1;const t=this.getSentinelNumberValue(e,"topOffset"),i=this.getSentinelNumberValue(e,"limit");
13return!(null!==t&&t<=0)&&!(null!==i&&i<=0)}syncFromSentinel(){this.setActive(this.isSentinelActive())}writeMode(e){const t=this.formContainer.getAttribute("data-load-earlier-mode")||null;if(po.feedDebug&&t!==e&&console.log("[feed] load-earlier: mode change",{from:t,to:e,scrollY:window.scrollY,active:this.active,loading:this.loading,sentinelActive:this.isSentinelActive()}),!e)return this.formContainer.removeAttribute("data-load-earlier-mode"),document.body.removeAttribute("data-social-load-earlier-mode"),void(null!==t&&document.dispatchEvent(new CustomEvent("feed:load-earlier-mode-changed",{detail:{mode:null}})));this.formContainer.setAttribute("data-load-earlier-mode",e),document.body.setAttribute("data-social-load-earlier-mode",e),t!==e&&document.dispatchEvent(new CustomEvent("feed:load-earlier-mode-changed",{detail:{mode:e}}))}setActive(e){if(this.active!==e){if(this.active=e,!e)return this.loading=!1,this.progress=0,void this.scheduleFormReveal();this.cancelPendingFormReveal(),this.writeMode("active"),this.updateProgress()}else e&&(this.writeMode(this.loading?"loading":"active"),this.loading||this.updateProgress())}revealForm(){this.cancelPendingFormReveal(),this.writeMode(null),po.feedDebug&&console.log("[feed] load-earlier: form revealed")}cancelPendingFormReveal(){this.pendingFormRevealObserver&&(this.pendingFormRevealObserver.disconnect(),this.pendingFormRevealObserver=null)}scheduleFormReveal(){var e,t;this.cancelPendingFormReveal();const i=null==(t=null==(e=this.stream)?void 0:e.querySelector)?void 0:t.call(e,":scope > .social-post-wrapper");i?this.isInViewport(i)?this.revealForm():"undefined"!=typeof IntersectionObserver?(this.pendingFormRevealObserver=new IntersectionObserver((e=>{for(const t of e)if(t.isIntersecting)return void this.revealForm()}),{root:null,threshold:0}),this.pendingFormRevealObserver.observe(i)):this.revealForm():this.revealForm()}isInViewport(e){if(!(e instanceof Element))return!1;const t=e.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;return t.bottom>0&&t.top<i}handleSentinelState(){this.applyGestureTrigger(),this.syncFromSentinel()}applyGestureTrigger(){var e;const t=this.getSentinel();if(!t)return;if(!this.isSentinelActive())return;if((t.getAttribute("hx-trigger")||t.getAttribute("data-hx-trigger"))===fo)return t.removeAttribute("s-trigger"),void t.setAttribute("data-hx-trigger",fo);t.setAttribute("hx-trigger",fo),t.setAttribute("data-hx-trigger",fo),t.removeAttribute("s-trigger"),t.removeAttribute("data-hx-revealed"),"undefined"!=typeof window&&(null==(e=window.htmx)?void 0:e.process)&&window.htmx.process(t)}handleScroll(){this.active&&(this.updateProgress(),this.scrollSettleTimer&&window.clearTimeout(this.scrollSettleTimer),this.scrollSettleTimer=window.setTimeout((()=>{this.scrollSettleTimer=null,this.checkTrigger()}),150))}updateProgress(){const e=window.scrollY;let t;t=e>=vo?0:e<=0?1:(vo-e)/vo,this.progress=t}checkTrigger(){this.active&&!this.loading&&(this.progress<1||this.isSentinelActive()&&this.fireTrigger())}fireTrigger(){var e;const t=this.getSentinel();t&&(this.loading=!0,this.writeMode("loading"),"undefined"!=typeof window&&(null==(e=window.htmx)?void 0:e.trigger)&&window.htmx.trigger(t,fo),po.feedDebug&&console.log("[feed] load-earlier: gesture fired"))}handleAfterSwap(e){var t;const i=null==(t=null==e?void 0:e.detail)?void 0:t.target,o=null==i?void 0:i.id;"social-posts-stream"===o&&this.loading&&(this.loading=!1),"social-posts-stream"!==o&&o!==this.sentinelId||(this.applyGestureTrigger(),this.syncFromSentinel())}}const bo='.social-videos video[data-social-feed-video="true"][data-video-src]',wo=po.maxLoadedFeedImages,Lo=po.feedSingleImageMaxWidth,So=po.maxLivePosts,Mo=po.livePostHysteresis;class Ao{constructor({root:e=null,autoplay:t=!0}={}){this.root=e,this.autoplay=t,this.videoObserver=null,this.videoHydrationQueue=[],this.videoHydrationQueuedVideos=new Set,this.videoHydrationBatchTimeout=null,this.videoReleaseRaf=null,this.feedImageReleaseRaf=null,this.feedImageSyncRaf=null,this.feedImageLoadThrottleTimeout=null,this.imageLoadQueue=[],this.imageLoadInFlight=new Set,this.postObserver=null,this.postViewportState=new WeakMap,this.observedPosts=new Set,this.prunedAboveCount=0,this.prunedBelowCount=0,this.prunedPostHeights=new Map,this.lastKnownPostCount=0,this.enforceCapRaf=null,this.pendingEnforceCapDirection=null,this.prependedBatchProtectedUntil=0,this.videoSettleTimeout=null,this.feedScrollStopTimeout=null,this.isFeedScrolling=!1,this.overlaySuspended=!1,this.videoEnterGeneration=0,this.lastScrollY=0,this.feedPostWrappersCache=null,this.feedMediaRootsCache=null,this.feedVideosCache=null,this.feedImagesCache=null,this.streamMutationObserver=null,this.handleScroll=this.handleScroll.bind(this),this.handleManualVideoIntent=this.handleManualVideoIntent.bind(this),this.invalidateFeedCaches=this.invalidateFeedCaches.bind(this)}invalidateFeedCaches(){this.feedPostWrappersCache=null,this.feedMediaRootsCache=null,this.feedVideosCache=null,this.feedImagesCache=null}isProfileSocialFeed(){var e,t;return Boolean(null==(t=null==(e=this.root)?void 0:e.closest)?void 0:t.call(e,"#profile-social"))}initStreamMutationObserver(){if(this.streamMutationObserver)return;const e=this.getFeedStream();e&&"undefined"!=typeof MutationObserver&&(this.streamMutationObserver=new MutationObserver((e=>{for(const t of e)if(t.addedNodes.length||t.removedNodes.length)return void this.invalidateFeedCaches()})),this.streamMutationObserver.observe(e,{childList:!0,subtree:!0}))}init(){var e;this.initVideoObserver(),window.addEventListener("scroll",this.handleScroll,{passive:!0}),this.initStreamMutationObserver(),!this.shouldAutoplayFeedVideos()&&(null==(e=this.root)?void 0:e.addEventListener)&&this.root.addEventListener("pointerdown",this.handleManualVideoIntent,!0),this.initPostObserver(),this.observeFeedPosts(this.root),this.usesMobileLifecycle()&&(this.prepareManualFeedImages(this.root),this.lastScrollY=window.scrollY),this.lastKnownPostCount=this.getFeedPostWrappers().length,this.shouldAutoplayFeedVideos()?this.schedulePassiveVideoSettle(0):this.usesMobileLifecycle()?(this.syncMobileFeedImages(),this.syncMobileVideoPreviewFrames()):(this.syncDesktopFeedImages(),this.syncDesktopVideoPreviewFrames()),this.scheduleEnforceLivePostCap()}destroy(){var e,t,i,o;this.releaseAll(),window.removeEventListener("scroll",this.handleScroll),null==(e=this.root)||e.removeEventListener("pointerdown",this.handleManualVideoIntent,!0),null==(t=this.videoObserver)||t.disconnect(),this.videoObserver=null,window.clearTimeout(this.videoHydrationBatchTimeout),window.clearTimeout(this.videoSettleTimeout),window.clearTimeout(this.feedScrollStopTimeout),this.videoReleaseRaf&&(window.cancelAnimationFrame(this.videoReleaseRaf),this.videoReleaseRaf=null),this.feedImageReleaseRaf&&(window.cancelAnimationFrame(this.feedImageReleaseRaf),this.feedImageReleaseRaf=null),this.feedImageSyncRaf&&(window.cancelAnimationFrame(this.feedImageSyncRaf),this.feedImageSyncRaf=null),this.enforceCapRaf&&(window.cancelAnimationFrame(this.enforceCapRaf),this.enforceCapRaf=null),null==(i=this.postObserver)||i.disconnect(),this.postObserver=null,null==(o=this.streamMutationObserver)||o.disconnect(),this.streamMutationObserver=null,this.invalidateFeedCaches(),this.clearImageLoadQueue(),this.imageLoadInFlight.clear(),this.postViewportState=new WeakMap,this.observedPosts.clear(),this.videoHydrationQueue=[],this.videoHydrationQueuedVideos.clear(),this.prunedAboveCount=0,this.prunedBelowCount=0,this.lastKnownPostCount=0,this.isFeedScrolling=!1}observeNewVideos(){this.observeFeedPosts(this.root),this.usesMobileLifecycle()?this.prepareManualFeedImages(this.root):this.syncDesktopFeedImages(),this.observeVisibleVideos()}onFeedBatchAppended(){this.invalidateFeedCaches();const e=this.getFeedPostWrappers().length,t=Math.max(0,e-this.lastKnownPostCount);t>0&&this.prunedBelowCount>0&&(this.prunedBelowCount=Math.max(0,this.prunedBelowCount-t)),this.lastKnownPostCount=e,this.observeFeedPosts(this.root),this.usesMobileLifecycle()&&this.prepareManualFeedImages(this.root),this.observeVisibleVideos(),window.clearTimeout(this.videoHydrationBatchTimeout),this.videoHydrationBatchTimeout=null,this.videoHydrationQueue=[],this.videoHydrationQueuedVideos.clear(),window.clearTimeout(this.videoSettleTimeout),this.videoSettleTimeout=null,this.pauseAllFeedVideos(),this.releaseFarVideos(),this.usesMobileLifecycle()&&this.isFeedScrolling&&this.getFeedVideos().forEac
13h((e=>{this.dequeueVideoFromHydration(e),q(e)})),this.usesMobileLifecycle()?!this.isFeedScrolling&&this.shouldAutoplayFeedVideos()&&this.schedulePassiveVideoSettle(300):this.shouldAutoplayFeedVideos()?this.schedulePassiveVideoSettle(120):(this.syncDesktopFeedImages(),this.syncDesktopVideoPreviewFrames()),this.scheduleEnforceLivePostCap({preferDirection:"above"})}onFeedBatchPrepended({heightHintedPosts:e=null}={}){this.invalidateFeedCaches();const t=Array.isArray(e)?e:this.applyPrunedHeightHints(),i=this.getFeedPostWrappers().length,o=Math.max(0,i-this.lastKnownPostCount);o>0&&this.prunedAboveCount>0&&(this.prunedAboveCount=Math.max(0,this.prunedAboveCount-o),this.updateLoadEarlierSentinel()),this.lastKnownPostCount=i,this.observeFeedPosts(this.root),this.usesMobileLifecycle()&&(this.prepareManualFeedImages(this.root),po.feedDebug&&t.length&&console.log("[feed] prepended hinted media load",{posts:t.map((e=>({...this.describePrunedPost(e),lazyImages:e.querySelectorAll("img.social-feed-lazy").length,loadedImages:e.querySelectorAll("img.social-feed-loaded").length})))}),t.forEach((e=>{this.loadPostImages(e,{force:!0})}))),this.observeVisibleVideos(),this.usesMobileLifecycle()?!this.isFeedScrolling&&this.shouldAutoplayFeedVideos()&&this.schedulePassiveVideoSettle(300):this.shouldAutoplayFeedVideos()?this.schedulePassiveVideoSettle(120):(this.syncDesktopFeedImages(),this.syncDesktopVideoPreviewFrames()),this.scheduleEnforceLivePostCap({preferDirection:"below"}),this.isProfileSocialFeed()&&(this.prependedBatchProtectedUntil=Date.now()+2500)}releaseOffscreenFeedMedia(){this.releaseFarVideos(),this.usesMobileLifecycle()&&this.releaseFarFeedImages()}prepareManualFeedImages(e=this.root){(null==e?void 0:e.querySelectorAll)&&this.getFeedMediaRoots().filter((t=>e.contains(t)&&!t.hasAttribute("data-social-feed-images-prepared"))).forEach((e=>{e.setAttribute("data-social-feed-images-prepared","true"),e.querySelectorAll(".social-images img, .social-website-asset img").forEach((e=>{j(e)||(e.classList.remove("lazyload","lazyloading","lazypreload","lazyloaded","ls-is-cached","lazyFade"),e.classList.contains("social-feed-loaded")||e.classList.add("social-feed-lazy"))}))}))}getFeedStream(){const e=this.root||document;return(null==e?void 0:e.querySelector)?e.querySelector("#social-posts-stream")||e:null}hasInfiniteSocialFeed(){var e;const t=this.root||document;return Boolean(null==(e=null==t?void 0:t.querySelector)?void 0:e.call(t,"#social-posts-stream"))}getFeedPostWrappers(){if(this.feedPostWrappersCache)return this.feedPostWrappersCache;const e=this.getFeedStream();return(null==e?void 0:e.querySelectorAll)?(this.feedPostWrappersCache=[...e.querySelectorAll(":scope > .social-post-wrapper")],this.feedPostWrappersCache):[]}getFeedMediaRoots(){if(this.feedMediaRootsCache)return this.feedMediaRootsCache;const e=this.getFeedPostWrappers();if(e.length)return this.feedMediaRootsCache=e,this.feedMediaRootsCache;const t=this.root||document;return(null==t?void 0:t.querySelectorAll)?(this.feedMediaRootsCache=[...t.querySelectorAll(".social-post-item")].filter((e=>!e.closest(".social-post-wrapper"))),this.feedMediaRootsCache):[]}getMediaRootFromElement(e){var t;return(null==e?void 0:e.closest)?null!=(t=e.closest(".social-post-wrapper"))?t:e.closest(".social-post-item"):null}getPostMediaImages(e){return(null==e?void 0:e.querySelectorAll)?[...e.querySelectorAll(".social-images img, .social-website-asset img")].filter((e=>!j(e))):[]}getPostFeedVideos(e){return(null==e?void 0:e.querySelectorAll)?[...e.querySelectorAll(bo)].filter((e=>!j(e))):[]}postHasKeepableMedia(e){if(!e)return!1;const t=e.getAttribute("data-feed-has-media");if("1"===t)return!0;if("0"===t)return!1;const i=this.getPostMediaImages(e).length>0||this.getPostFeedVideos(e).length>0;return e.setAttribute("data-feed-has-media",i?"1":"0"),i}initPostObserver(){this.postObserver||(this.postObserver=new IntersectionObserver((e=>{let t=!1;e.forEach((e=>{const i=!0===this.postViewportState.get(e.target),o=e.isIntersecting&&e.intersectionRatio>0;this.postViewportState.set(e.target,o),i!==o&&(t=!0)})),t&&(this.usesMobileLifecycle()?this.isFeedScrolling&&this.syncMobileFeedImagesSoon():this.syncDesktopFeedImagesSoon())}),{threshold:[0,.01,.05]}))}observeFeedPost(e){this.postObserver&&e&&(this.observedPosts.has(e)||this.observedPosts.add(e),this.postViewportState.set(e,!1),this.postObserver.observe(e),this.observeFeedVideosInPost(e))}observeFeedPosts(e=this.root){this.postObserver&&(null==e?void 0:e.querySelectorAll)&&this.getFeedMediaRoots().filter((t=>
13e.contains(t))).forEach((e=>{this.observedPosts.has(e)||this.observeFeedPost(e)}))}observeFeedVideosInPost(e){this.videoObserver&&(null==e?void 0:e.querySelectorAll)&&e.querySelectorAll(`${bo}:not([data-autoplay-observed])`).forEach((e=>{e.setAttribute("data-autoplay-observed","true"),e.dataset.socialFeedVisible="false",e.dataset.socialFeedIntersectRatio="0",this.videoObserver.observe(e)}))}selectPostsForImageLoad(){const e=this.getFeedMediaRoots();let t=-1,i=-1;if(e.forEach(((e,o)=>{!0===this.postViewportState.get(e)&&(-1===t&&(t=o),i=o)})),-1===t)return this.selectPostsForImageLoadByRect();const o=new Set;for(let r=t;r<=i;r+=1)this.postHasKeepableMedia(e[r])&&o.add(e[r]);for(let r=t-1;r>=0;r-=1)if(this.postHasKeepableMedia(e[r])){o.add(e[r]);break}for(let r=i+1;r<e.length;r+=1)if(this.postHasKeepableMedia(e[r])){o.add(e[r]);break}return[...o]}selectPostsForImageLoadByRect(){const e=this.getViewportHeight(),t=this.getFeedMediaRoots().map((e=>({post:e,rect:e.getBoundingClientRect(),hasMedia:this.postHasKeepableMedia(e)}))).filter((({hasMedia:e})=>e)),i=t.filter((({rect:t})=>t.bottom>0&&t.top<e)),o=t.filter((({rect:e})=>e.bottom<=0)).sort(((e,t)=>t.rect.bottom-e.rect.bottom)),r=t.filter((({rect:t})=>t.top>=e)).sort(((e,t)=>e.rect.top-t.rect.top)),n=new Set(i.map((({post:e})=>e)));return o[0]&&n.add(o[0].post),r[0]&&n.add(r[0].post),[...n]}getLoadedFeedImageCount(){return this.getFeedImages().filter((e=>e.classList.contains("social-feed-loaded"))).length}clearImageLoadQueue(){this.imageLoadQueue=[],window.clearTimeout(this.feedImageLoadThrottleTimeout),this.feedImageLoadThrottleTimeout=null}cancelFeedImageLoad(e){this.imageLoadInFlight.delete(e),this.imageLoadQueue=this.imageLoadQueue.filter((t=>t.img!==e))}queueFeedImageLoad(e,{post:t,priority:i=0,force:o=!1}){var r;if(!(null==(r=null==e?void 0:e.classList)?void 0:r.contains("social-feed-lazy")))return;if(this.imageLoadInFlight.has(e))return;const n=this.imageLoadQueue.find((t=>t.img===e));if(n)return n.force=n.force||o,n.priority=Math.min(n.priority,i),void this.sortImageLoadQueue();this.imageLoadQueue.push({img:e,post:t,priority:i,force:o}),this.sortImageLoadQueue(),this.schedulePumpImageLoadQueue()}sortImageLoadQueue(){this.imageLoadQueue.sort(((e,t)=>Number(t.force)-Number(e.force)||e.priority-t.priority||this.getPostImageLoadOrder(e.post)-this.getPostImageLoadOrder(t.post)))}getPostImageLoadOrder(e){const t=this.getFeedMediaRoots().indexOf(e);return-1===t?Number.MAX_SAFE_INTEGER:t}schedulePumpImageLoadQueue(){if(this.isFeedScrolling){if(this.feedImageLoadThrottleTimeout)return;this.feedImageLoadThrottleTimeout=window.setTimeout((()=>{this.feedImageLoadThrottleTimeout=null,this.pumpImageLoadQueue()}),120)}else this.pumpImageLoadQueue()}pumpImageLoadQueue(){const e=new Set(this.selectPostsForImageLoad());this.imageLoadQueue=this.imageLoadQueue.filter((t=>t.force||e.has(t.post)));const t=this.usesMobileLifecycle()?2:4,i=this.usesMobileLifecycle()?wo:1/0;for(;this.imageLoadInFlight.size<t&&this.imageLoadQueue.length&&this.getLoadedFeedImageCount()+this.imageLoadInFlight.size<i;){const t=this.imageLoadQueue.shift();t&&(t.force||e.has(t.post))&&this.startFeedImageLoad(t.img)}}getFeedImageMaxWidth(e){return e.closest(".social-images.is-multiple")?512:Lo}applyFeedImageSrc(e){var t,i,o,r;const n=null!=(i=null!=(t=e.getAttribute("data-srcset"))?t:e.dataset.srcset)?i:"",s=null!=(r=null!=(o=e.getAttribute("data-src"))?o:e.dataset.src)?r:"",a=function(e,t=Lo){var i,o;if(!e)return null;const r=e.split(",").map((e=>{const t=e.trim().split(/\s+/),i=t[0],o=t[1];return{url:i,width:(null==o?void 0:o.endsWith("w"))?Number.parseInt(o,10):0}})).filter((e=>e.url)),n=r.filter((e=>e.width>0));if(!n.length)return null!=(o=null==(i=r[0])?void 0:i.url)?o:null;n.sort(((e,t)=>e.width-t.width));const s=n.filter((e=>e.width<=t));return s.length?s[s.length-1].url:n[0].url}(n,this.getFeedImageMaxWidth(e))||s;if(!a)return!1;if(e.decoding="async",e.src=a,e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.dataset.feedReleasedHeight||e.dataset.feedReleasedWidth){const t=()=>{e.style.height="",e.style.width="",delete e.dataset.feedReleasedHeight,delete e.dataset.feedReleasedWidth};
13e.complete&&e.naturalWidth>1?t():(e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0}))}return!0}startFeedImageLoad(e){var t;if(!(null==(t=null==e?void 0:e.classList)?void 0:t.contains("social-feed-lazy")))return;if(!this.applyFeedImageSrc(e))return;this.imageLoadInFlight.add(e),e.classList.remove("social-feed-lazy"),e.classList.add("social-feed-loaded");const i=()=>{this.imageLoadInFlight.delete(e),e.removeEventListener("load",i),e.removeEventListener("error",i),this.schedulePumpImageLoadQueue()};e.complete?i():(e.addEventListener("load",i),e.addEventListener("error",i))}syncPostVideoPosters(e){e.querySelectorAll(`${bo}[data-feed-poster]`).forEach((e=>{const t=e.dataset.feedPoster;t&&!e.getAttribute("poster")&&(e.poster=t);const i=this.getPausedPosterOverlay(e);t&&i&&!i.getAttribute("src")&&(i.src=t)}))}releasePostVideoPosters(e){e.querySelectorAll(`${bo}[poster]`).forEach((e=>{var t;e.removeAttribute("poster"),null==(t=this.getPausedPosterOverlay(e))||t.removeAttribute("src")}))}getPausedPosterOverlay(e){var t,i,o;return null!=(o=null==(i=null==(t=e.parentElement)?void 0:t.querySelector)?void 0:i.call(t,".custom-video-player__paused-poster"))?o:null}loadPostImages(e,{force:t=!1}={}){this.getPostMediaImages(e).forEach(((i,o)=>{i.classList.contains("social-feed-lazy")&&this.queueFeedImageLoad(i,{post:e,priority:o,force:t})})),this.syncPostVideoPosters(e)}releasePostFeedMedia(e){this.releasePostImages(e),this.getPostFeedVideos(e).forEach((e=>{var t;this.dequeueVideoFromHydration(e),null==(t=this.videoObserver)||t.unobserve(e),e.removeAttribute("data-autoplay-observed"),q(e)}))}unobserveFeedPost(e){var t;e&&(null==(t=this.postObserver)||t.unobserve(e),this.postViewportState.delete(e),this.observedPosts.delete(e))}releasePostImages(e){this.getPostMediaImages(e).forEach((e=>{this.cancelFeedImageLoad(e),e.classList.contains("social-feed-loaded")&&this.releaseLazyImage(e)})),this.releasePostVideoPosters(e),this.getPostFeedVideos(e).forEach((e=>{this.dequeueVideoFromHydration(e),"true"===e.dataset.videoHydrated&&q(e)}))}mergeEnforceCapDirection(e,t){return t?e?"below"===e||"below"===t?"below":"above"===e||"above"===t?"above":t:t:e}scheduleEnforceLivePostCap({preferDirection:e=null}={}){this.enforceCapRaf?this.pendingEnforceCapDirection=this.mergeEnfor
13ceCapDirection(this.pendingEnforceCapDirection,e):(this.pendingEnforceCapDirection=e,this.enforceCapRaf=window.requestAnimationFrame((()=>{this.enforceCapRaf=null;const e=this.pendingEnforceCapDirection;this.pendingEnforceCapDirection=null,this.enforceLivePostCap({preferDirection:e})})))}enforceLivePostCap({preferDirection:e=null}={}){var t,i;if(!e&&this.isProfileSocialFeed()&&this.prependedBatchProtectedUntil&&Date.now()<this.prependedBatchProtectedUntil&&(e="below"),this.isFeedScrolling)return void(po.feedDebug&&console.log("[feed] enforceLivePostCap: skipped (scrolling)",{preferDirection:e}));const o=this.getFeedPostWrappers();if(o.length<=So)return;const r=window.scrollY,n=document.documentElement.scrollHeight,s=Math.max(1,So-Mo),a=o.length-s,l=this.getViewportHeight(),d=o.map((e=>{const t=e.getBoundingClientRect(),i=t.bottom<=0,o=t.top>=l;return{post:e,isAbove:i,isBelow:o,inViewport:!i&&!o,distance:i?-t.bottom:o?t.top-l:0}})),c=d.filter((({inViewport:e})=>!e));if(!c.length)return;const u=null!=(i=null==(t=d.filter((({inViewport:e})=>e))[0])?void 0:t.post)?i:null,h=u?u.getBoundingClientRect().top:0,m=c.filter((e=>e.isAbove)).sort(((e,t)=>t.distance-e.distance)),p=c.filter((e=>e.isBelow)).sort(((e,t)=>t.distance-e.distance));let v;v="below"===e?p:"above"===e?m:[...m,...p].sort(((e,t)=>t.distance-e.distance));const g=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),f=Math.max(0,g-window.scrollY-200),y=v.slice(0,a),b=[];let w=0;for(const k of y){if(k.isBelow){const e=k.post.getBoundingClientRect().height||0;if(w+e>f)break;w+=e}b.push(k)}po.feedDebug&&b.length<y.length&&console.log("[feed] enforceLivePostCap: clamp-safe limit applied",{proposed:y.length,actual:b.length,safeShrinkPx:f,pendingShrinkPx:w,scrollY:window.scrollY,maxScrollY:g});const L=[];let S=0,M=0;if(b.forEach((({post:e,isAbove:t})=>{const i=this.getPrunedHeightKey(e);if(i){const t=this.getPruneHeightReference(e);t>0&&this.prunedPostHeights.set(i,t)}else po.feedDebug&&console.log("[feed] prune height skipped (no key)",{direction:t?"above":"below",post:this.describePrunedPost(e)});this.unobserveFeedPost(e),this.releasePostFeedMedia(e),e.remove(),L.push(e),t?S+=1:M+=1})),!L.length)return;this.invalidateFeedCaches();let A=0;if(u&&u.isConnected&&S>0){const e=u.getBoundingClientRect().top-h;Math.abs(e)>=1&&(A=e,window.scrollBy({top:e,left:0,behavior:"auto"}))}this.prunedAboveCount+=S,this.prunedBelowCount+=M,this.lastKnownPostCount=this.getFeedPostWrappers().length,S>0&&this.updateLoadEarlierSentinel(),M>0&&this.adjustLoadMoreSentinel(-M),po.feedDebug&&console.log("[feed] enforceLivePostCap: pruned",{preferDirection:e,aboveDropped:S,belowDropped:M,dropCount:a,liveAfter:this.lastKnownPostCount,scrollYBefore:r,scrollYAfter:window.scrollY,scrollYDelta:window.scrollY-r,scrollCorrection:A,scrollHeightBefore:n,scrollHeightAfter:document.documentElement.scrollHeight,maxScrollY:document.documentElement.scrollHeight-window.innerHeight});const T=this.getFeedStream();null==T||T.dispatchEvent(new CustomEvent("okaydev:social-feed-pruned",{bubbles:!0,detail:{posts:L,aboveDropped:S,belowDropped:M}}))}getPrunedHeightKey(e){var t;if(!(e instanceof Element))return null;const i=null==(t=e.dataset)?void 0:t.repostId;if(i)return`repost:${i}`;const o=e.querySelector('[id^="post-"]'),r=null==o?void 0:o.id;return r?`post:${r}`:null}getSocialPostItem(e){return e instanceof Element?e.classList.contains("social-post-item")?e:e.querySelector(".social-post-item"):null}postCommentsExpanded(e){const t=this.getSocialPostItem(e);return(null==t?void 0:t.classList.contains("show-comments"))||(null==t?void 0:t.classList.contains("show-comments-full"))}getPruneHeightReference(e){if(!(e instanceof Element))return 0;let t=e.offsetHeight;if(t<=0)return 0;if(this.postCommentsExpanded(e)){const i=this.getSocialPostItem(e),o=null==i?void 0:i.querySelector(".social-comments");o&&(t=Math.max(0,t-o.offsetHeight))}return t}describePrunedPost(e){var t,i,o;if(!(e instanceof Element))return null;const r=e.querySelector('[id^="post-"]'),n=e.getBoundingClientRect();return{key:this.getPrunedHeightKey(e),innerId:null!=(t=null==r?void 0:r.id)?t:null,repostId:null!=(o=null==(i=e.dataset)?void 0:i.repostId)?o:null,offsetHeight:e.offsetHeight,minHeight:e.style.minHeight||null,rectTop:Math.round(n.top),rectBottom:Math.round(n.bottom),hasMedia:e.getAttribute("data-feed-has-media"),images:e.querySelectorAll(".social-images img, .social-website-asset img").length,videos:e.querySelectorAll(bo).length}}applyPrunedHeightHints(){if(!this.prunedPostHeights.size)return[];const e=this.getFeedPostWrappers(),t=[],i=[],o=[],r=new Set(this.prunedPostHeights.keys());for(const n of e){const e=this.getPrunedHeightKey(n);if(!e)continue;const s=this.prunedPostHeights.get(e);if(!s)continue;if(r.delete(e),"true"===n.dataset.prunedHeightApplied)continue;const a=n.offsetHeight;let l=s;!this.postCommentsExpanded(n)&&a>0&&s>a+8&&(l=a),n.style.minHeight=`${l}px`,n.style.setProperty("--social-post-intrinsic-height",`${l}px`),n.dataset.prunedHeightApplied="true",t.push(e),i.push(n);const d=n.offsetHeight;o.push({...this.describePrunedPost(n),cachedHeight:s,hintHeight:l,beforeHeight:a,afterHeight:d,reserveDelta:d-a})}return t.forEach((e=>this.prunedPostHeights.delete(e))),po.feedDebug&&console.log("[feed] applyPrunedHeightHints",{applied:t.length,cacheRemaining:this.prunedPostHeights.size,liveWrappers:e.length,totalReservedHeight:o.reduce(((e,t)=>
13e+t.cachedHeight),0),totalReserveDelta:o.reduce(((e,t)=>e+t.reserveDelta),0),sample:o.slice(0,4).map((e=>({key:e.key,cachedHeight:e.cachedHeight,beforeHeight:e.beforeHeight,afterHeight:e.afterHeight,reserveDelta:e.reserveDelta}))),missedCount:r.size,missedKeySample:[...r].slice(0,4)}),i}syncPostHeightReference(e){const t=this.getMediaRootFromElement(e);if(!(t instanceof Element))return;const i=t.offsetHeight,o=this.getPruneHeightReference(t);if(i<=0&&o<=0)return;const r=this.getPrunedHeightKey(t);r&&o>0&&this.prunedPostHeights.set(r,o),t.style.setProperty("--social-post-intrinsic-height",`${i>0?i:o}px`),"true"===t.dataset.prunedHeightApplied&&o>0&&(t.style.minHeight=`${o}px`),po.feedDebug&&console.log("[feed] syncPostHeightReference",{key:r,renderedHeight:i,pruneHeight:o,commentsExpanded:this.postCommentsExpanded(t),...this.describePrunedPost(t)})}schedulePostHeightReferenceSync(e){if(!e)return;const t=()=>{this.syncPostHeightReference(e)};t(),"function"==typeof requestAnimationFrame&&requestAnimationFrame(t),setTimeout(t,50),setTimeout(t,250),setTimeout(t,500)}updateLoadEarlierSentinel(){var e,t,i,o,r,n,s,a;const l=null==(e=this.getFeedStream())?void 0:e.parentElement;if(!l)return;const d=l.querySelector("#load-earlier-oob");if(!d)return;const c=this.prunedAboveCount,u=c>0;let h={};const m=d.getAttribute("hx-vals")||d.getAttribute("data-hx-vals");if(m)try{h=JSON.parse(m)||{}}catch(g){h={}}h.topOffset=c,h.offset=u?Math.max(0,c-10):0,h.limit=u?Math.min(10,c):0;const p=this.getFeedPostWrappers()[0];h.nextRepostId=null!=(i=null==(t=null==p?void 0:p.dataset)?void 0:t.repostId)?i:"";const v=JSON.stringify(h);if(d.setAttribute("hx-vals",v),d.setAttribute("data-hx-vals",v),d.setAttribute("s-val:topOffset",String(h.topOffset)),d.setAttribute("s-val:offset",String(h.offset)),d.setAttribute("s-val:limit",String(h.limit)),d.setAttribute("s-val:nextRepostId",h.nextRepostId),u){const e=mo()&&"on"===(null==(r=null==(o=document.body)?void 0:o.getAttribute)?void 0:r.call(o,"data-load-earlier-gesture"))?fo:"revealed";d.setAttribute("hx-trigger",e),d.setAttribute("data-hx-trigger",e),d.removeAttribute("s-trigger"),d.style.display="",d.removeAttribute("data-hx-revealed")}else d.removeAttribute("hx-trigger"),d.removeAttribute("data-hx-trigger"),d.removeAttribute("s-trigger"),d.style.display="none";void 0!==E&&E.process&&E.process(d),po.feedDebug&&console.log("[feed] updateLoadEarlierSentinel",{hasEarlier:u,topOffset:c,trigger:d.getAttribute("hx-trigger"),displayedAs:d.style.display||"(default)",bodyHasGestureAttr:null!=(a=null==(s=null==(n=document.body)?void 0:n.getAttribute)?void 0:s.call(n,"data-load-earlier-gesture"))?a:null}),document.dispatchEvent(new CustomEvent("feed:load-earlier-sentinel-changed",{bubbles:!0}))}adjustLoadMoreSentinel(e){var t,i,o,r;const n=null==(o=null==(i=null==(t=this.getFeedStream())?void 0:t.parentElement)?void 0:i.querySelector)?void 0:o.call(i,"#load-more-oob");if(!n)return;const s=Number.parseInt(null!=(r=n.getAttribute("s-val:offset"))?r:"0",10)||0,a=Math.max(0,s+e);n.setAttribute("s-val:offset",String(a));const l=n.getAttribute("hx-vals")||n.getAttribute("data-hx-vals");if(l)try{const e=JSON.parse(l);e.offset=a;const t=JSON.stringify(e);n.setAttribute("hx-vals",t),n.setAttribute("data-hx-vals",t)}catch(d){}n.removeAttribute("data-hx-revealed"),void 0!==E&&E.process&&E.process(n)}enforceLoadedImageCap(e){const t=new Set(e),i=this.getViewportHeight(),o=this.getFeedImages().filter((e=>e.classList.contains("social-feed-loaded")));if(o.length<=wo)return;const r=o.filter((e=>{const o=this.getMediaRootFromElement(e);if(!o)return!0;const r=o.getBoundingClientRect();return!(r.bottom>0&&r.top<i)&&!t.has(o)}));if(!r.length)return;const n=r.map((e=>{const t=this.getMediaRootFromElement(e);return{img:e,score:10*(t?this.getFeedMediaRoots().indexOf(t):-1)+(t?this.getPostMediaImages(t).indexOf(e):Number.MAX_SAFE_INTEGER)}})).sort(((e,t)=>t.score-e.score));let s=o.length;for(const{img:a}of n){if(s<=wo)break;this.releaseLazyImage(a),s-=1}}getFeedImages(){if(this.feedImagesCache)return this.feedImagesCache;const e=this.root||document;return e.querySelectorAll?(this.feedImagesCache=[...e.querySelectorAll("img.social-feed-lazy, img.social-feed-loaded")],this.feedImagesCache):[]}syncMobileFeedImages({enforceCap:e=!0,releaseOutsideKeep:t=!0}={}){if(!this.usesMobileLifecycle())return;this.prepareManualFeedImages(this.root);const i=this.selectPostsForImageLoad(),o=new Set(i);
13i.forEach((e=>{this.loadPostImages(e)})),t&&this.getFeedMediaRoots().forEach((e=>{o.has(e)||this.releasePostImages(e)})),e&&this.enforceLoadedImageCap(i),this.schedulePumpImageLoadQueue()}syncDesktopFeedImages({releaseOutsideKeep:e=!1}={}){if(this.usesMobileLifecycle())return;this.prepareManualFeedImages(this.root);const t=this.selectPostsForImageLoad(),i=new Set(t);t.forEach((e=>{this.loadPostImages(e)})),e&&this.getFeedMediaRoots().forEach((e=>{i.has(e)||this.releasePostImages(e)})),this.schedulePumpImageLoadQueue()}syncDesktopFeedImagesSoon(){this.usesMobileLifecycle()||this.feedImageSyncRaf||(this.feedImageSyncRaf=window.requestAnimationFrame((()=>{this.feedImageSyncRaf=null,this.syncDesktopFeedImages()})))}syncMobileFeedImagesSoon(){this.usesMobileLifecycle()&&(this.feedImageSyncRaf||(this.feedImageSyncRaf=window.requestAnimationFrame((()=>{this.feedImageSyncRaf=null,this.syncMobileFeedImages({enforceCap:!1,releaseOutsideKeep:!1})}))))}releaseFarFeedImages(){if(!this.usesMobileLifecycle())return;const e=new Set(this.selectPostsForImageLoad());this.getFeedMediaRoots().forEach((t=>{e.has(t)||this.releasePostImages(t)}))}releaseFarFeedImagesSoon(){this.feedImageReleaseRaf||(this.feedImageReleaseRaf=window.requestAnimationFrame((()=>{this.feedImageReleaseRaf=null,this.releaseFarFeedImages()})))}releaseLazyImage(e){var t,i,o,r,n,s;if(!(e instanceof HTMLImageElement))return;const a=null!=(i=null!=(t=e.getAttribute("data-src"))?t:e.dataset.src)?i:"",l=null!=(r=null!=(o=e.getAttribute("data-srcset"))?o:e.dataset.srcset)?r:"",d=null!=(s=null!=(n=e.getAttribute("data-sizes"))?n:e.getAttribute("sizes"))?s:"";if("undefined"!=typeof window&&e.isConnected){const t=e.offsetHeight,i=e.offsetWidth;t>1&&i>1&&(e.dataset.feedReleasedHeight=String(t),e.dataset.feedReleasedWidth=String(i),e.style.height=`${t}px`,e.style.width=`${i}px`)}e.classList.remove("lazyloaded","lazyloading","ls-is-cached","initial","social-feed-loaded","lazyload","lazyloading","lazypreload"),e.classList.add("social-feed-lazy"),e.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",e.removeAttribute("srcset"),e.removeAttribute("sizes"),a&&e.setAttribute("data-src",a),l&&e.setAttribute("data-srcset",l),d&&e.setAttribute("data-sizes",d)}suspendForOverlay(){this.overlaySuspended=!0,window.clearTimeout(this.videoHydrationBatchTimeout),this.videoHydrationBatchTimeout=null,this.videoHydrationQueue=[],this.videoHydrationQueuedVideos.clear(),this.pauseAllFeedVideos()}resumeAfterOverlay(){this.resumeAfterOverlayClosed()}resumeAfterOverlayClosed(){this.overlaySuspended=!1,this.shouldAutoplayFeedVideos()?this.schedulePassiveVideoSettle(0):this.usesMobileLifecycle()?this.syncMobileVideoPreviewFrames():this.syncDesktopVideoPreviewFrames()}handleManualVideoIntent(e){var t,i,o,r;if(this.shouldAutoplayFeedVideos()||this.overlaySuspended)return;if(B(e.target))return;const n=null!=(o=U(e.target))?o:null==(i=null==(t=e.target)?void 0:t.closest)?void 0:i.call(t,bo);if(!n||!(null==(r=this.root)?void 0:r.contains(n)))return;if(j(n))return;this.ensureVideoSource(n,{preload:"auto"});const s=this.getMediaRootFromElement(n);s&&this.syncPostVideoPosters(s),this.enforceHydratedVideoCap([n,...this.getMobileHydrationCandidates()])}releaseAll(){(this.root||document).querySelectorAll(bo).forEach((e=>{this.dequeueVideoFromHydration(e),q(e)}))}usesMobileLifecycle(){return window.matchMedia("(max-width: 767px)").matches}shouldAutoplayFeedVideos(){return this.autoplay||!this.usesMobileLifecycle()}getVideoHydrationRangeThreshold(){const e=window.innerHeight||document.documentElement.clientHeight||0;return Math.max(300,Math.round(.45*e))}getFarVideoReleaseThreshold(){const e=window.innerHeight||document.documentElement.clientHeight||0;return this.usesMobileLifecycle()?Math.max(600,Math.round(.75*e)):Math.max(1400,Math.round(3*e))}getPassiveVideoSettleDelay(){return this.usesMobileLifecycle()?80:90}getFeedScrollStopDelay(){return this.usesMobileLifecycle()?150:60}getMaxHydratedVideos(){return this.usesMobileLifecycle()?2:8}getHydrationBatchDelay(){return this.usesMobileLifecycle()?120:100}getFeedVideos(){if(this.feedVideosCache)return this.feedVideosCache;const e=this.root||document;return e.querySelectorAll?(this.feedVideosCache=[...e.querySelectorAll(bo)],this.feedVideosCache):[]}
13getViewportHeight(){return window.innerHeight||document.documentElement.clientHeight||0}getMobileActiveZoneBounds(){const e=this.getViewportHeight();return{top:.2*e,bottom:.8*e}}isVideoInActiveZone(e){const t=e.getBoundingClientRect(),{top:i,bottom:o}=this.getMobileActiveZoneBounds(),r=t.top+t.height/2;return r>=i&&r<=o}isVideoWithinRange(e,t=200){const i=e.getBoundingClientRect(),o=this.getViewportHeight();return i.bottom>=-t&&i.top<=o+t}getVideoDistanceFromViewportCenter(e){const t=e.getBoundingClientRect(),i=this.getViewportHeight(),o=t.top+t.height/2,r=i/2;return Math.abs(o-r)}getVideoHydrationPriority(e){const t=e.getBoundingClientRect(),i=this.getViewportHeight();return t.bottom>=0&&t.top<=i?0:t.top>i?t.top-i+1:Math.abs(t.bottom)+1}getMobileActiveZoneVideos(){return this.getFeedVideos().filter((e=>this.isVideoInActiveZone(e))).sort(((e,t)=>this.getVideoDistanceFromViewportCenter(e)-this.getVideoDistanceFromViewportCenter(t)))}getMobilePrimaryVideo(){var e;return null!=(e=this.getMobileActiveZoneVideos()[0])?e:null}getMobileHydrationCandidates(){return this.getFeedVideos().filter((e=>this.isVideoWithinRange(e,0))).sort(((e,t)=>this.getVideoDistanceFromViewportCenter(e)-this.getVideoDistanceFromViewportCenter(t))).slice(0,this.getMaxHydratedVideos())}getPrimaryFeedVideo(){var e,t;return null!=(t=null==(e=this.getFeedVideos().filter((e=>"true"===e.dataset.socialFeedVisible)).map((e=>({video:e,ratio:Number.parseFloat(e.dataset.socialFeedIntersectRatio||"0")||0,enterGen:Number.parseInt(e.dataset.socialFeedEnterGen||"0",10)||0,distance:this.getVideoDistanceFromViewportCenter(e)}))).filter((({ratio:e})=>e>.05)).sort(((e,t)=>t.enterGen!==e.enterGen?t.enterGen-e.enterGen:t.ratio!==e.ratio?t.ratio-e.ratio:e.distance-t.distance))[0])?void 0:e.video)?t:null}pauseAllFeedVideos(){this.getFeedVideos().forEach((e=>{e.paused||e.pause()}))}enforceHydratedVideoCap(e=[]){const t=new Set(e.filter(Boolean)),i=this.getMaxHydratedVideos();this.getFeedVideos().filter((e=>!t.has(e)&&"true"===e.dataset.videoHydrated)).sort(((e,t)=>{const i=this.isVideoInActiveZone(e);return i!==this.isVideoInActiveZone(t)?i?1:-1:this.getVideoDistanceFromViewportCenter(t)-this.getVideoDistanceFromViewportCenter(e)})).slice(Math.max(0,i-t.size)).forEach((e=>{this.dequeueVideoFromHydration(e),q(e)}))}ensureVideoSource(e,{preload:t="metadata"}={}){if(!e)return;const i=e.dataset.videoSrc;if(!i)return;if("true"===e.dataset.videoHydrated)return;const o=e.getAttribute("src");if(null!==o&&""!==o)return e.preload&&"none"!==e.preload||(e.preload=t),void(e.dataset.videoHydrated="true");e.preload=t,e.src=i,e.load(),e.dataset.videoHydrated="true"}initVideoObserver(){this.videoObserver=new IntersectionObserver((e=>{e.forEach((e=>{this.handleVideoIntersection(e)})),this.usesMobileLifecycle()||this.overlaySuspended||this.isFeedScrolling||this.schedulePassiveVideoSettle(0)}),{threshold:[0,.1,.25,.5],rootMargin:this.usesMobileLifecycle()?"0px":"0px 0px 10% 0px"}),this.observeVisibleVideos()}handleVideoIntersection(e){var t;const i=e.target,o="true"===i.dataset.socialFeedVisible;i.dataset.socialFeedVisible=e.isIntersecting?"true":"false",i.dataset.socialFeedIntersectRatio=String(null!=(t=e.intersectionRatio)?t:0),e.isIntersecting&&!o?(this.videoEnterGeneration+=1,i.dataset.socialFeedEnterGen=String(this.videoEnterGeneration)):e.isIntersecting||delete i.dataset.socialFeedEnterGen,this.overlaySuspended&&!i.paused&&i.pause(),this.usesMobileLifecycle()||this.isFeedScrolling||(e.isIntersecting?j(i)&&i.pause():i.paused||i.pause())}observeVisibleVideos(){if(!this.videoObserver)return;(this.root||document).querySelectorAll(`${bo}:not([data-autoplay-observed])`).forEach((e=>{e.setAttribute("data-autoplay-observed","true"),e.dataset.socialFeedVisible="false",e.dataset.socialFeedIntersectRatio="0",this.videoObserver.observe(e)}))}queueVisibleVideosForHydration(){const e=this.getFeedVideos().filter((e=>this.isVideoWithinRange(e,this.getVideoHydrationRangeThreshold()))).sort(((e,t)=>this.getVideoHydrationPriority(e)-this.getVideoHydrationPriority(t)));e.length&&(e.forEach((e=>{this.queueVideoForHydration(e,{prioritize:!0,startBatch:!1})})),this.flushVideoHydrationBatch())}queueVideoForHydration(e,{prioritize:t=!1,startBatch:i=!0}={}){e&&"true"!==e.dataset.videoHydrated&&(this.videoHydrationQueuedVideos.has(e)?t&&(this.videoHydrationQueue=[e,...this.videoHydrationQueue.filter((t=>t!==e))],i&&this.flushVideoHydrationBatch()):(this.videoHydrationQueuedVideos.add(e),t?this.videoHydrationQueue.unshift(e):this.videoHydrationQueue.push(e),i&&!this.videoHydrationBatchTimeout&&(this.videoHydrationBatchTimeout=window.setTimeout((()=>{this.hydrateNextVideoBatch()}),this.getHydrationBatchDelay()))))}hydrateNextVideoBatch(){window.clearTimeout(this.videoHydrationBatchTimeout),this.videoHydrationBatchTimeout=null;const e=this.videoHydrationQueue.shift();e&&(this.videoHydrationQueuedVideos.delete(e),this.ensureVideoSource(e,{preload:"auto"}),this.videoHydrationQueue.length&&(this.videoHydrationBatchTimeout=window.setTimeout((()=>{this.hydrateNextVideoBatch()}),this.getHydrationBatchDelay())))}dequeueVideoFromHydration(e){e&&(this.videoHydrationQueuedVideos.delete(e),this.videoHydrationQueue=this.videoHydrationQueue.filter((t=>t!==e)))}flushVideoHydrationBatch(){window.clearTimeout(this.videoHydrationBatchTimeout),this.videoHydrationBatchTimeout=null,this.hydrateNextVideoBatch()}releaseFarVideos(){const e=this.getFarVideoReleaseThreshold();
13this.getFeedVideos().forEach((t=>{t instanceof HTMLVideoElement&&(this.isVideoWithinRange(t,e)||(this.dequeueVideoFromHydration(t),q(t)))}))}releaseFarVideosSoon(){this.videoReleaseRaf||(this.videoReleaseRaf=window.requestAnimationFrame((()=>{this.videoReleaseRaf=null,this.releaseFarVideos()})))}schedulePassiveVideoSettle(e=this.getPassiveVideoSettleDelay()){window.clearTimeout(this.videoSettleTimeout),this.videoSettleTimeout=window.setTimeout((()=>{this.videoSettleTimeout=null,this.flushPassiveVideoState()}),e)}flushPassiveVideoState(){if(!this.overlaySuspended&&!this.isFeedScrolling)return this.shouldAutoplayFeedVideos()?void(this.usesMobileLifecycle()?this.syncMobilePlaybackAfterScrollStop():(this.queueVisibleVideosForHydration(),this.syncDesktopFeedVideoPlayback(),this.releaseFarVideos())):(this.pauseAllFeedVideos(),void(this.usesMobileLifecycle()?this.syncMobileVideoPreviewFrames():(this.releaseFarVideos(),this.syncDesktopFeedImages(),this.syncDesktopVideoPreviewFrames())))}syncMobilePlaybackAfterScrollStop(){this.syncMobileVideoPreviewFrames();const e=this.getMobilePrimaryVideo();this.getFeedVideos().forEach((t=>{if(j(t))return void(t.paused||t.pause());t===e?!t.ended&&t.hasAttribute("playsinline")&&t.paused&&t.play().catch((()=>{})):t.paused||t.pause()})),this.releaseFarVideos(),this.releaseFarFeedImages()}syncMobileVideoPreviewFrames(){if(!this.usesMobileLifecycle()||this.overlaySuspended||this.isFeedScrolling)return;const e=this.getMobileHydrationCandidates();e.forEach((e=>{this.ensureVideoSource(e,{preload:"metadata"})})),this.enforceHydratedVideoCap(e)}syncDesktopVideoPreviewFrames(){if(this.usesMobileLifecycle()||this.overlaySuspended||this.shouldAutoplayFeedVideos())return;const e=this.getViewportHeight();this.getFeedVideos().forEach((t=>{if(j(t))return;const i=t.getBoundingClientRect();i.bottom<=0||i.top>=e||this.ensureVideoSource(t,{preload:"metadata"})}))}syncDesktopFeedVideoPlayback(){if(!this.shouldAutoplayFeedVideos())return void this.pauseAllFeedVideos();const e=this.getPrimaryFeedVideo();this.getFeedVideos().forEach((t=>{j(t)?t.paused||t.pause():t===e?(this.ensureVideoSource(t,{preload:"auto"}),!t.ended&&t.hasAttribute("playsinline")&&t.paused&&t.play().catch((()=>{}))):t.paused||t.pause()}))}markFeedScrolling(){this.isFeedScrolling||(this.isFeedScrolling=!0,window.clearTimeout(this.videoHydrationBatchTimeout),this.videoHydrationBatchTimeout=null,this.videoHydrationQueue=[],this.videoHydrationQueuedVideos.clear(),window.clearTimeout(this.videoSettleTimeout),this.videoSettleTimeout=null),this.pauseAllFeedVideos(),this.syncMobileFeedImagesSoon(),this.releaseFarFeedImagesSoon(),this.releaseFarVideosSoon(),window.clearTimeout(this.feedScrollStopTimeout),this.feedScrollStopTimeout=window.setTimeout((()=>{this.feedScrollStopTimeout=null,this.isFeedScrolling=!1,this.shouldAutoplayFeedVideos()?this.schedulePassiveVideoSettle(this.getPassiveVideoSettleDelay()):this.usesMobileLifecycle()&&this.syncMobileVideoPreviewFrames(),this.scheduleEnforceLivePostCap()}),this.getFeedScrollStopDelay())}handleScroll(){this.usesMobileLifecycle()?(this.lastScrollY=window.scrollY,this.markFeedScrolling()):this.schedulePassiveVideoSettle(this.shouldAutoplayFeedVideos()?this.getPassiveVideoSettleDelay():this.getFeedScrollStopDelay())}}function To(e){(null==e?void 0:e.querySelectorAll)&&e.querySelectorAll(bo).forEach((e=>{q(e)}))}function ko(e,{includeBentoFooter:t=!1}={}){if(!(e instanceof Element))return null;if(e.matches(".brand-resources"))return[...e.querySelectorAll(":scope > .brand-hero, :scope > .brand-section-nav-anchor > .brand-section-nav, :scope > .brand-section, :scope > .pin-spacer > .brand-section, :scope > .brand-download")];if(!(e.matches(".bento-page")&&e.querySelector(":scope > .bento-page-bg")))return e;const i=[...e.querySelectorAll(":scope > .bento-grid > [data-bento-card], :scope > [data-page-social-overlay-card]")];return t&&i.push(...e.querySelectorAll(":scope > [data-bento-made-on]")),i.length?i:e}function Eo(e){return e instanceof Element&&e.matches(".bento-page")?0:10}function Co(e,t=null){var i;if(!e||"function"!=typeof e.querySelectorAll)return null;const o=t?`[data-router-view="${t}"]`:"[data-router-view]",r=e.querySelectorAll(`:scope > ${o}`);if(r.length)return r[r.length-1];const n=null==(i=e.querySelector)?void 0:i.call(e,o);if(n&&"object"==typeof n)return n;let s=e.lastElementChild;for(;s&&"SCRIPT"===s.tagName;)s=s.previousElementSibling;return s&&"object"==typeof s?s:null}function Po(e){e instanceof HTMLElement&&(e.style.minHeight=`${Math.max(e.offsetHeight,document.documentElement.scrollHeight-e.getBoundingClientRect().top)}px`)}function _o(e,t){var i;if(!(e instanceof HTMLElement))return null;const o=e.querySelectorAll(":scope > [data-router-view]"),r=t instanceof HTMLElement&&e.contains(t)&&(null==(i=t.matches)?void 0:i.call(t,"[data-router-view]"))?t:null,n=null!=r?r:o[o.length-1];if(!(n instanceof HTMLElement))return Co(e);for(const a of[...e.children])a!==n&&("function"==typeof a.matches&&a.matches("[data-router-view]")&&(z(s=a),To(s)),a.remove());var s;return n}function No(e){let t=!1;return()=>{t||(t=!0,e())}}function xo(e,t){const i=No(t);window.setTimeout(i,400);try{if(!e.duration())return void i();e.eventCallback("onComplete",i)}catch{i()}}class Ro extends Te{async out({done:e,from:t}){var i,o,r,n,s,a;const l=(null==(i=null==t?void 0:t.matches)?void 0:i.call(t,".bento-page"))?t.querySelector(":scope > .bento-page-bg"):null,d=No((()=>
13{l&&(l.style.opacity="0"),e()}));window.setTimeout(d,500);try{await Promise.race([Promise.resolve(null==(r=null==(o=c.coreNav)?void 0:o.whenMobileNavClosed)?void 0:r.call(o)),new Promise((e=>window.setTimeout(e,250)))])}catch{}if(Po(null==t?void 0:t.parentElement),function(e){if(!(e instanceof HTMLElement))return;const t=e.getBoundingClientRect(),i=c.pjaxOutgoingViewRect,o=Number.isFinite(null==i?void 0:i.top)?i.top:t.top,r=Number.isFinite(null==i?void 0:i.left)?i.left:t.left,n=Number.isFinite(null==i?void 0:i.width)?i.width:t.width;Object.assign(e.style,{position:"fixed",top:`${o}px`,left:`${r}px`,width:`${n}px`,marginTop:"0",marginLeft:"0",zIndex:"1"}),e.setAttribute("data-pjax-outgoing-fixed","")}(t),null==(n=null==t?void 0:t.matches)?void 0:n.call(t,'[data-handle="profile"]')){const e=t.querySelector(".profile-sections");e&&(e.style.pointerEvents="none")}const u=null==(s=null==t?void 0:t.querySelectorAll)?void 0:s.call(t,"#likesFeed .profile-list > .list-item, #bookmarksFeed .profile-list > .list-item"),h=null==(a=null==t?void 0:t.querySelectorAll)?void 0:a.call(t,"#likesFeed .item-actions, #bookmarksFeed .item-actions"),m=ko(t,{includeBentoFooter:!0}),p=Eo(t);if(l&&W.setBackground("#0c0c0c",{animate:!1}),We())d();else try{const e=R.timeline();l&&e.to(l,{opacity:0,duration:.18,ease:"sine.inOut",overwrite:"auto"},0),(null==u?void 0:u.length)&&e.to(u,{autoAlpha:0,y:8,duration:.18,ease:"sine.inOut",force3D:!0,stagger:.012,overwrite:"auto"},0),(null==h?void 0:h.length)&&e.to(h,{autoAlpha:0,duration:.18,ease:"sine.inOut",overwrite:"auto"},0),e.to(m,{autoAlpha:0,y:p,duration:.18,ease:"sine.inOut",force3D:!0},0),xo(e,d)}catch{d()}}in({done:e,to:t}){var i;const o=document.querySelector("[data-router-wrapper]"),r=null!=(i=_o(o,t))?i:t,n=ko(r),s=Eo(r),a=No((()=>{!function(e){e instanceof HTMLElement&&e.hasAttribute("data-pjax-incoming-fixed")&&(e.removeAttribute("data-pjax-incoming-fixed"),["position","top","left","right","width","z-index"].forEach((t=>{e.style.removeProperty(t)})))}(r),o instanceof HTMLElement&&o.style.removeProperty("min-height"),e()}));if(window.setTimeout(a,600),!We()&&n)try{R.set(n,{autoAlpha:0,y:s,force3D:!0})}catch{}window.requestAnimationFrame((()=>{var e,t;const i=document.querySelector("[data-router-wrapper]"),o=null!=(e=_o(i,r))?e:r,n=!c.isPopstate,s=n&&o instanceof HTMLElement;if(i instanceof HTMLElement&&s&&Po(i),s){const e=R.getProperty(o,"y"),t=function(e){const t=window.location.hash.slice(1);if(!(t&&e instanceof HTMLElement))return null;let i=t;try{i=decodeURIComponent(t)}catch{}const o=document.getElementById(i);return o&&e.contains(o)?o:null}(o);t?(t.scrollIntoView({block:"start",inline:"nearest",behavior:"auto"}),"number"==typeof e&&0!==e&&window.scrollBy(0,-e)):window.scrollTo(0,0);const i=o.getBoundingClientRect().top-("number"==typeof e?e:0);o.setAttribute("data-pjax-incoming-fixed",""),Object.assign(o.style,{position:"fixed",top:`${i}px`,left:"0",right:"0",width:"100%",zIndex:"1"})}const l=null==(t=null==o?void 0:o.querySelector)?void 0:t.call(o,".profile-sections");l&&l.style.removeProperty("pointer-events");const d=n?"transform,position,top,left,right,width,zIndex":"transform";if(We())a();else try{const e=R.timeline();e.to(ko(o),{autoAlpha:1,y:0,duration:.2,ease:"sine.out",force3D:!0,clearProps:d},0),xo(e,a)}catch{a()}}))}}class Fo{constructor(){var e,t,i,o,r,n,s,a,l,d,u,h,m,p;if(this.header=c.coreHeader,this.headerSlot=null!=(t=null==(e=this.header)?void 0:e.closest(".core-header-slot"))?t:null,this.headerInner=null!=(o=null==(i=this.header)?void 0:i.querySelector(".core-header-inner"))?o:null,this.logoLink=null!=(n=null==(r=this.header)?void 0:r.querySelector(".core-logo-link"))?n:null,this.brandMenu=null!=(a=null==(s=this.header)?void 0:s.querySelector("[data-header-brand-menu]"))?a:null,this.brandMenuItems=this.brandMenu?[...this.brandMenu.querySelectorAll('[role="menuitem"]')]:[],this.lastScrollY=window.scrollY,this.scrollingUp=!1,this.upwardAccum=0,this.isVisible=!1,this.isDocked=!1,this._hideFallbackTimer=null,this._glassSettleTimer=null,this._revealFrame=null,this._revealMinScrollY=null,this._programmaticScrollDepth=0,this._scrollShift=0,this.contentShiftTargets=new Set,this.brandMenuFocusFrame=null,this.brandMenuFocusTimer=null,!this.header)return;$(this,["handleScroll","handleResize","handleLogoClick","handleLogoContextMenu","handleLogoKeyDown","handleBrandMenuClick","handleBrandMenuKeyDown","handleBrandMenuFocusOut","handleBrandMenuPointerDown","handleBrandMenuDocumentKeyDown","onTransitionEnd"]),null==(l=this.logoLink)||l.addEventListener("click",this.handleLogoClick),null==(d=this.logoLink)||d.addEventListener("contextmenu",this.handleLogoContextMenu),null==(u=this.logoLink)||u.addEventListener("keydown",this.handleLogoKeyDown),null==(h=this.brandMenu)||h.addEventListener("click",this.handleBrandMenuClick),null==(m
13=this.brandMenu)||m.addEventListener("keydown",this.handleBrandMenuKeyDown),null==(p=this.brandMenu)||p.addEventListener("focusout",this.handleBrandMenuFocusOut),document.addEventListener("pointerdown",this.handleBrandMenuPointerDown,!0),document.addEventListener("keydown",this.handleBrandMenuDocumentKeyDown);const v=()=>{requestAnimationFrame((()=>requestAnimationFrame((()=>this.restoreMobileHeader()))))};Y().then(v),window.addEventListener("pageshow",v),c.isReducedMotion||(window.addEventListener("scroll",this.handleScroll,{passive:!0}),window.addEventListener("resize",this.handleResize,{passive:!0}),this.handleScroll())}restoreMobileHeader(){const e=performance.getEntriesByType("navigation")[0];"reload"!==(null==e?void 0:e.type)&&"back_forward"!==(null==e?void 0:e.type)||window.matchMedia("(max-width: 1100px)").matches&&!this.isNavBusy()&&(this.lastScrollY=window.scrollY,window.scrollY<=this.getRevealMinScrollY()||(this.clearRevealFrame(),this.engageFixedDock(),this.isVisible=!0,this.removeState("animating","hiding"),this.addState("visible","glass-ready","glass-settled")))}getRevealMinScrollY(){var e,t,i,o,r;if(null!==this._revealMinScrollY)return this._revealMinScrollY;const n=null!=(t=null==(e=this.header)?void 0:e.offsetHeight)?t:0,s=null!=(r=null==(o=null==(i=this.header)?void 0:i.parentElement)?void 0:o.offsetHeight)?r:0,a=Math.max(n,s);return this._revealMinScrollY=a>0?a:100,this._revealMinScrollY}handleResize(){this.closeBrandMenu(),this._revealMinScrollY=null}handleLogoClick(e){var t,i,o,r,n,s;this.closeBrandMenu(),"home"===(null==(i=null==(t=c.body)?void 0:t.dataset)?void 0:i.page)&&(e.preventDefault(),e.stopImmediatePropagation(),null==(r=null==(o=c.coreNav)?void 0:o.closeMobileNav)||r.call(o),null==(s=null==(n=c.coreNav)?void 0:n.closeUserMenu)||s.call(n),window.scrollTo({top:0,left:0,behavior:c.isReducedMotion?"auto":"smooth"}))}handleLogoContextMenu(e){e.preventDefault(),e.stopPropagation(),this.openBrandMenu()}handleLogoKeyDown(e){("ContextMenu"===e.key||e.shiftKey&&"F10"===e.key)&&(e.preventDefault(),this.openBrandMenu())}openBrandMenu(){var e,t;this.brandMenu&&this.logoLink&&(window.clearTimeout(this.brandMenuFocusTimer),cancelAnimationFrame(this.brandMenuFocusFrame),null==(t=null==(e=c.coreNav)?void 0:e.closeUserMenu)||t.call(e),this.brandMenu.classList.add("is-open"),this.brandMenu.setAttribute("aria-hidden","false"),this.logoLink.setAttribute("aria-expanded","true"),this.brandMenuItems.forEach((e=>{e.tabIndex=e.closest("[inert]")?-1:0})),this.brandMenuFocusFrame=requestAnimationFrame((()=>{var e;this.brandMenu.classList.contains("is-open")&&(null==(e=this.brandMenuItems[0])||e.focus({preventScroll:!0}))})))}closeBrandMenu({restoreFocus:e=!1}={}){var t,i,o;if(!(null==(t=this.brandMenu)?void 0:t.classList.contains("is-open")))return;window.clearTimeout(this.brandMenuFocusTimer),cancelAnimationFrame(this.brandMenuFocusFrame);const r=this.brandMenu.contains(document.activeElement);this.brandMenu.classList.remove("is-open"),this.brandMenu.setAttribute("aria-hidden","true"),null==(i=this.logoLink)||i.setAttribute("aria-expanded","false"),this.brandMenuItems.forEach((e=>{e.tabIndex=-1})),(e||r)&&(null==(o=this.logoLink)||o.focus({preventScroll:!0}))}handleBrandMenuClick(e){var t,i,o,r;const n=null==(i=(t=e.target).closest)?void 0:i.call(t,"[data-brand-accordion-toggle]");if(n){const e="true"!==n.getAttribute("aria-expanded"),t=[...this.brandMenu.querySelectorAll(".core-logo-brand-menu__group")].map((e=>({item:e,body:e.querySelector(".core-logo-brand-menu__assets")})));K(this.brandMenu.querySelector(".core-logo-brand-menu__content"),t,(()=>{t.forEach((({item:t,body:i})=>{const o=t.querySelector("[data-brand-accordion-toggle]"),r=o===n&&e;o.setAttribute("aria-expanded",String(r)),i.hidden=!r,i.inert=!r,i.querySelectorAll('[role="menuitem"]').forEach((e=>{e.tabIndex=r?0:-1}))}))}))}else(null==(r=(o=e.target).closest)?void 0:r.call(o,'[role="menuitem"]'))&&this.closeBrandMenu()}handleBrandMenuKeyDown(e){if("Escape"===e.key)return e.preventDefault(),e.stopPropagation(),void this.closeBrandMenu({restoreFocus:!0});const t=this.brandMenuItems.filter((e=>!e.closest("[inert]"))),i=t.indexOf(document.activeElement);let o=null;"ArrowDown"===e.key?o=(Math.max(i,-1)+1)%t.length:"ArrowUp"===e.key?o=i<=0?t.length-1:i-1:"Home"===e.key?o=0:"End"===e.key&&(o=t.length-1),null!==o&&t[o]&&(e.preventDefault(),t[o].focus({preventScroll:!0}))}handleBrandMenuFocusOut(){window.clearTimeout(this.brandMenuFocusTimer),this.brandMenuFocusTimer=window.setTimeout((()=>{var e;(null==(e=this.brandMenu)?void 0:e.contains(document.activeElement))||document.activeElement===this.logoLink||this.closeBrandMenu()}),0)}handleBrandMenuPointerDown(e){var t,i;!(null==(t=this.brandMenu)?void 0:t.classList.contains("is-open"))||this.brandMenu.contains(e.target)||(null==(i=this.logoLink)?void 0:i.contains(e.target))||this.closeBrandMenu()}handleBrandMenuDocumentKeyDown(e){var t;"Escape"===e.key&&(null==(t=this.brandMenu)?void 0:t.classList.contains("is-open"))&&!this.brandMenu.contains(e.target)&&(e.preventDefault(),this.closeBrandMenu({restoreFocus:!0}))}isNavBusy(){return c.root.classList.contains("is-nav-open")||c.root.classList.contains("is-nav-closing")}beginProgrammaticScroll(){this._programmaticScrollDepth+=1,1===this._programmaticScrollDepth&&(this.upwardAccum=0,this.scrollingUp=!1)}endProgrammaticScroll(){this._programmaticScrollDepth<=0||(this._programmaticScrollDepth-=1,0===this._programmaticScrollDepth&&(this.lastScrollY=window.scrollY,this.upwardAccum=0,this.scrollingUp=!1))}clearHideFallback(){this._hideFallbackTimer&&(window.clearTimeout(this._hideFallbackTimer),this._hideFallbackTimer=null)}clearGlassSettleFallback(){this._glassSettleTimer&&(window.clearTimeout(this._glassSettleTimer),this._glassSettleTimer=null)}clearRevealFrame(){cancelAnimationFrame(this._revealFrame),this._revealFrame=null}addState(...e){this.setState(!0,e)}removeState(...e){this.setState(!1,e)}
13setState(e,t){for(const i of t)for(const[t,o]of[[this.header,"data-header"],[this.headerSlot,"data-header-slot"]]){const r=`${o}-${i}`;t&&t.hasAttribute(r)!==e&&t.toggleAttribute(r,e)}this.syncDocumentState()}syncDocumentState(){var e;for(const t of["fixed","visible","animating"]){const i=Boolean(null==(e=this.header)?void 0:e.hasAttribute(`data-header-${t}`)),o=`data-core-header-${t}`;c.root.hasAttribute(o)!==i&&c.root.toggleAttribute(o,i)}}settleGlass(){this.clearGlassSettleFallback(),this.isVisible&&this.isDocked&&!this.isNavBusy()&&(this.removeState("animating"),this.addState("glass-settled"))}scheduleGlassSettleFallback(){this.clearGlassSettleFallback(),this._glassSettleTimer=window.setTimeout((()=>{this.settleGlass()}),450)}reset(){this.closeBrandMenu(),this.releaseToTracking(window.scrollY,this.getRevealMinScrollY())}releaseToTracking(e,t){var i;this.clearRevealFrame(),this.clearHideFallback(),this.clearGlassSettleFallback(),null==(i=this.header)||i.removeEventListener("transitionend",this.onTransitionEnd),this.isVisible=!1,this.isDocked=!1,this.upwardAccum=0,this.removeState("fixed","visible","animating","hiding","glass-ready","glass-settled"),this.syncScrollShift(e,t)}dismissNavOverlays(){var e,t;this.closeBrandMenu(),null==(t=null==(e=c.coreNav)?void 0:e.closeUserMenu)||t.call(e)}registerContentShiftTarget(e){return this.contentShiftTargets.add(e),e.style.setProperty("--core-header-content-shift",`${this._scrollShift}px`),()=>{this.contentShiftTargets.delete(e),e.style.removeProperty("--core-header-content-shift")}}clearScrollShift(){var e,t;(0!==this._scrollShift||(null==(e=this.header)?void 0:e.style.getPropertyValue("--core-header-scroll-shift")))&&(this._scrollShift=0,null==(t=this.header)||t.style.removeProperty("--core-header-scroll-shift"),this.contentShiftTargets.forEach((e=>{e.style.removeProperty("--core-header-content-shift")})))}syncScrollShift(e,t){if(!this.header||this.isDocked||this.isNavBusy())return;const i=-Math.min(Math.max(0,e),t);i!==this._scrollShift&&(this._scrollShift=i,this.header.style.setProperty("--core-header-scroll-shift",`${i}px`),this.contentShiftTargets.forEach((e=>{e.style.setProperty("--core-header-content-shift",`${i}px`)})))}syncDockFromScroll(e,t){const i=e<=1,o=e<t;this.isDocked&&!this.isVisible&&o||this.isDocked&&this.isVisible&&i?this.releaseToTracking(e,t):(this.isDocked||this.syncScrollShift(e,t),e>=t&&this.engageFixedDock())}engageFixedDock(){this.isDocked||this.isNavBusy()||window.scrollY<this.getRevealMinScrollY()||(this.dismissNavOverlays(),this.clearGlassSettleFallback(),this.removeState("animating","visible","hiding","glass-ready","glass-settled"),this.isDocked=!0,this.addState("fixed"),this.clearScrollShift())}showRevealed(){var e;this.isVisible||this.isNavBusy()||(this.isDocked||this.engageFixedDock(),this.isDocked&&(this.clearRevealFrame(),this.clearHideFallback(),this.clearGlassSettleFallback(),null==(e=this.header)||e.removeEventListener("transitionend",this.onTransitionEnd),this.isVisible=!0,this.removeState("hiding","glass-settled"),this.addState("glass-ready","animating"),this._revealFrame=requestAnimationFrame((()=>{this._revealFrame=requestAnimationFrame((()=>{this._revealFrame=null,this.isVisible&&this.isDocked&&(this.addState("visible"),this.scheduleGlassSettleFallback())}))}))))}hideRevealed(){var e;this.isVisible&&(this.dismissNavOverlays(),this.clearRevealFrame(),this.clearHideFallback(),this.clearGlassSettleFallback(),this.isVisible=!1,this.upwardAccum=0,this.addState("animating"),this.removeState("glass-settled"),this.addState("hiding"),this.removeState("visible"),null==(e=this.header)||e.addEventListener("transitionend",this.onTransitionEnd),this._hideFallbackTimer=window.setTimeout((()=>{this.finishHide()}),450))}onTransitionEnd(e){e.target!==this.header||"transform"!==e.propertyName&&"top"!==e.propertyName||(this.isVisible?this.settleGlass():this.isVisible||this.finishHide())}finishHide(){var e;this.clearHideFallback(),this.clearGlassSettleFallback(),null==(e=this.header)||e.removeEventListener("transitionend",this.onTransitionEnd),this.removeState("animating","hiding","glass-ready","glass-settled")}handleScroll(){if("page-project-overlay"===document.documentElement.dataset.dialogScrollLockOwner)return;const e=window.scrollY;if(e!==this.lastScrollY&&this.closeBrandMenu(),c.root.classList.contains("is-pjax-transition"))return void(this.lastScrollY=e);if(this.isNavBusy())return;const t=e-this.lastScrollY,i=this.getRevealMinScrollY();if(this._programmaticScrollDepth>0)return this.lastScrollY=e,void this.syncDockFromScroll(e,i);this.lastScrollY=e,this.syncDockFromScroll(e,i),Math.abs(t)>=3&&(this.scrollingUp=t<0,this.scrollingUp?this.upwardAccum+=Math.abs(t):(this.upwardAccum=0,this.hideRevealed())),this.scrollingUp&&e>i&&this.upwardAccum>=14&&this.showRevealed()}}
14/*!
15 * paths 3.15.0
16 * https://gsap.com
17 *
18 * Copyright 2008-2026, GreenSock. All rights reserved.
19 * Subject to the terms at https://gsap.com/standard-license
20 * @author: Jack Doyle, [email protected]
21*/var Io=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Ho=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,Vo=Math.PI/180,Do=Math.sin,Oo=Math.cos,qo=Math.abs,jo=Math.sqrt,Bo=1e5,Uo=function(e){return Math.round(e*Bo)/Bo||0},Wo=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001};function zo(e,t,i,o,r,n,s,a,l){if(e!==a||t!==l){i=qo(i),o=qo(o);var d=r%360*Vo,c=Oo(d),u=Do(d),h=Math.PI,m=2*h,p=(e-a)/2,v=(t-l)/2,g=c*p+u*v,f=-u*p+c*v,y=g*g,b=f*f,w=y/(i*i)+b/(o*o);w>1&&(i=jo(w)*i,o=jo(w)*o);var L=i*i,S=o*o,M=(L*S-L*b-S*y)/(L*b+S*y);M<0&&(M=0);var A=(n===s?-1:1)*jo(M),T=A*(i*f/o),k=A*(-o*g/i),E=(e+a)/2+(c*T-u*k),C=(t+l)/2+(u*T+c*k),P=(g-T)/i,_=(f-k)/o,N=(-g-T)/i,x=(-f-k)/o,R=P*P+_*_,F=(_<0?-1:1)*Math.acos(P/jo(R)),I=(P*x-_*N<0?-1:1)*Math.acos((P*N+_*x)/jo(R*(N*N+x*x)));isNaN(I)&&(I=h),!s&&I>0?I-=m:s&&I<0&&(I+=m),F%=m,I%=m;var H,V=Math.ceil(qo(I)/(m/4)),D=[],O=I/V,q=4/3*Do(O/2)/(1+Oo(O/2)),j=c*i,B=u*i,U=u*-o,W=c*o;for(H=0;H<V;H++)g=Oo(r=F+H*O),f=Do(r),P=Oo(r+=O),_=Do(r),D.push(g-q*f,f+q*g,P+q*_,_-q*P,P,_);for(H=0;H<D.length;H+=2)g=D[H],f=D[H+1],D[H]=g*j+f*U+E,D[H+1]=g*B+f*W+C;return D[H-2]=a,D[H-1]=l,D}}
22/*!
23 * CustomEase 3.15.0
24 * https://gsap.com
25 *
26 * @license Copyright 2008-2026, GreenSock. All rights reserved.
27 * Subject to the terms at https://gsap.com/standard-license
28 * @author: Jack Doyle, [email protected]
29*/
30var $o,Yo,Ko=function(){return $o||"undefined"!=typeof window&&($o=window.gsap)&&$o.registerPlugin&&$o},Qo=function(){($o=Ko())?($o.registerEase("_CE",er.create),Yo=1):console.warn("Please gsap.registerPlugin(CustomEase)")},Go=function(e){return~~(1e3*e+(e<0?-.5:.5))/1e3},Xo=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,Zo=/[cLlsSaAhHvVtTqQ]/g,Jo=function e(t,i,o,r,n,s,a,l,d,c,u){var h,m=(t+o)/2,p=(i+r)/2,v=(o+n)/2,g=(r+s)/2,f=(n+a)/2,y=(s+l)/2,b=(m+v)/2,w=(p+g)/2,L=(v+f)/2,S=(g+y)/2,M=(b+L)/2,A=(w+S)/2,T=a-t,k=l-i,E=Math.abs((o-a)*k-(r-l)*T),C=Math.abs((n-a)*k-(s-l)*T);return c||(c=[{x:t,y:i},{x:a,y:l}],u=1),c.splice(u||c.length-1,0,{x:M,y:A}),(E+C)*(E+C)>d*(T*T+k*k)&&(h=c.length,e(t,i,m,p,b,w,M,A,d,c,u),e(M,A,L,S,f,y,a,l,d,c,u+1+(c.length-h))),c},er=function(){function e(e,t,i){Yo||Qo(),this.id=e,this.setData(t,i)}var t=e.prototype;return t.setData=function(e,t){t=t||{};var i,o,r,n,s,a,l,d,c,u=(e=e||"0,0,1,1").match(Xo),h=1,m=[],p=[],v=t.precision||1,g=v<=1;if(this.data=e,(Zo.test(e)||~e.indexOf("M")&&e.indexOf("C")<0)&&(u=function(e){var t,i,o,r,n,s,a,l,d,c,u,h,m,p,v,g=(e+"").replace(Ho,(function(e){var t=+e;return t<1e-4&&t>-1e-4?0:t})).match(Io)||[],f=[],y=0,b=0,w=2/3,L=g.length,S=0,M="ERROR: malformed path: "+e,A=function(e,t,i,o){c=(i-e)/3,u=(o-t)/3,a.push(e+c,t+u,i-c,o-u,i,o)};if(!e||!isNaN(g[0])||isNaN(g[1]))return console.log(M),f;for(t=0;t<L;t++)if(m=n,isNaN(g[t])?s=(n=g[t].toUpperCase())!==g[t]:t--,o=+g[t+1
30],r=+g[t+2],s&&(o+=y,r+=b),t||(l=o,d=r),"M"===n)a&&(a.length<8?f.length-=1:S+=a.length,Wo(a)),y=l=o,b=d=r,a=[o,r],f.push(a),t+=2,n="L";else if("C"===n)a||(a=[0,0]),s||(y=b=0),a.push(o,r,y+1*g[t+3],b+1*g[t+4],y+=1*g[t+5],b+=1*g[t+6]),t+=6;else if("S"===n)c=y,u=b,"C"!==m&&"S"!==m||(c+=y-a[a.length-4],u+=b-a[a.length-3]),s||(y=b=0),a.push(c,u,o,r,y+=1*g[t+3],b+=1*g[t+4]),t+=4;else if("Q"===n)c=y+(o-y)*w,u=b+(r-b)*w,s||(y=b=0),y+=1*g[t+3],b+=1*g[t+4],a.push(c,u,y+(o-y)*w,b+(r-b)*w,y,b),t+=4;else if("T"===n)c=y-a[a.length-4],u=b-a[a.length-3],a.push(y+c,b+u,o+(y+1.5*c-o)*w,r+(b+1.5*u-r)*w,y=o,b=r),t+=2;else if("H"===n)A(y,b,y=o,b),t+=1;else if("V"===n)A(y,b,y,b=o+(s?b-y:0)),t+=1;else if("L"===n||"Z"===n)"Z"===n&&(o=l,r=d,a.closed=!0),("L"===n||qo(y-o)>.5||qo(b-r)>.5)&&(A(y,b,o,r),"L"===n&&(t+=2)),y=o,b=r;else if("A"===n){if(p=g[t+4],v=g[t+5],c=g[t+6],u=g[t+7],i=7,p.length>1&&(p.length<3?(u=c,c=v,i--):(u=v,c=p.substr(2),i-=2),v=p.charAt(1),p=p.charAt(0)),h=zo(y,b,+g[t+1],+g[t+2],+g[t+3],+p,+v,(s?y:0)+1*c,(s?b:0)+1*u),t+=i,h)for(i=0;i<h.length;i++)a.push(h[i]);y=a[a.length-2],b=a[a.length-1]}else console.log(M);return(t=a.length)<6?(f.pop(),t=0):Wo(a),f.totalPoints=S+t,f}(e)[0]),4===(i=u.length))u.unshift(0,0),u.push(1,1),i=8;else if((i-2)%6)throw"Invalid CustomEase";for(0==+u[0]&&1==+u[i-2]||function(e,t,i){i||0===i||(i=Math.max(+e[e.length-1],+e[1]));var o,r=-1*+e[0],n=-i,s=e.length,a=1/(+e[s-2]+r),l=-t||(Math.abs(+e[s-1]-+e[1])<.01*(+e[s-2]-+e[0])?function(e){var t,i=e.length,o=1e20;for(t=1;t<i;t+=6)+e[t]<o&&(o=+e[t]);return o}(e)+n:+e[s-1]+n);for(l=l?1/l:-a,o=0;o<s;o+=2)e[o]=(+e[o]+r)*a,e[o+1]=(+e[o+1]+n)*l}(u,t.height,t.originY),this.segment=u,n=2;n<i;n+=6)o={x:+u[n-2],y:+u[n-1]},r={x:+u[n+4],y:+u[n+5]},m.push(o,r),Jo(o.x,o.y,+u[n],+u[n+1],+u[n+2],+u[n+3],r.x,r.y,1/(2e5*v),m,m.length-1);for(i=m.length,n=0;n<i;n++)l=m[n],d=m[n-1]||l,(l.x>d.x||d.y!==l.y&&d.x===l.x||l===d)&&l.x<=1?(d.cx=l.x-d.x,d.cy=l.y-d.y,d.n=l,d.nx=l.x,g&&n>1&&Math.abs(d.cy/d.cx-m[n-2].cy/m[n-2].cx)>2&&(g=0),d.cx<h&&(d.cx?h=d.cx:(d.cx=.001,n===i-1&&(d.x-=.001,h=Math.min(h,.001),g=0)))):(m.splice(n--,1),i--);if(s=1/(i=1/h+1|0),a=0,l=m[0],g){for(n=0;n<i;n++)c=n*s,l.nx<c&&(l=m[++a]),o=l.y+(c-l.x)/l.cx*l.cy,p[n]={x:c,cx:s,y:o,cy:0,nx:9},n&&(p[n-1].cy=o-p[n-1].y);a=m[m.length-1],p[i-1].cy=a.y-o,p[i-1].cx=a.x-p[p.length-1].x}else{for(n=0;n<i;n++)l.nx<n*s&&(l=m[++a]),p[n]=l;a<m.length-1&&(p[n-1]=m[m.length-2])}return this.ease=function(e){var t=p[e*i|0]||p[i-1];return t.nx<e&&(t=t.n),t.y+(e-t.x)/t.cx*t.cy},this.ease.custom=this,this.id&&$o&&$o.registerEase(this.id,this.ease),this},t.getSVGData=function(t){return e.getSVGData(this,t)},e.create=function(t,i,o){return new e(t,i,o).ease},e.register=function(e){$o=e,Qo()},e.get=function(e){return $o.parseEase(e)},e.getSVGData=function(t,i){var o,r,n,s,a,l,d,c,u,h,m=(i=i||{}).width||100,p=i.height||100,v=i.x||0,g=(i.y||0)+p,f=$o.utils.toArray(i.path)[0];if(i.invert&&(p=-p,g=0),"string"==typeof t&&(t=$o.parseEase(t)),t.custom&&(t=t.custom),t instanceof e)o=function(e){"number"==typeof e[0]&&(e=[e]);var t,i,o,r,n="",s=e.length;for(i=0;i<s;i++){for(r=e[i],n+="M"+Uo(r[0])+","+Uo(r[1])+" C",t=r.length,o=2;o<t;o++)n+=Uo(r[o++])+","+Uo(r[o++])+" "+Uo(r[o++])+","+Uo(r[o++])+" "+Uo(r[o++])+","+Uo(r[o])+" ";r.closed&&(n+="z")}return n}(function(e,t,i,o,r,n,s){for(var a,l,d,c,u,h=e.length;--h>-1;)for(l=(a=e[h]).length,d=0;d<l;d+=2)c=a[d],u=a[d+1],a[d]=c*t+u*o+n,a[d+1]=c*i+u*r+s;return e._dirty=1,e}([t.segment.slice(0)],m,0,0,-p,v,g));else{for(o=[v,g],s=1/(d=Math.max(5,200*(i.precision||1))),c=5/(d+=2),u=Go(v+s*m),r=((h=Go(g+t(s)*-p))-g)/(u-v),n=2;n<d;n++)a=Go(v+n*s*m),l=Go(g+t(n*s)*-p),(Math.abs((l-h)/(a-u)-r)>c||n===d-1)&&(o.push(u,h),r=(l-h)/(a-u)),u=a,h=l;o="M"+o.join(",")}return f&&f.setAttribute("d",o),o},e}();er.version="3.15.0",er.headless=!0,Ko()&&$o.registerPlugin(er),R.registerPlugin(er);const tr="opacity,visibility",ir="opacity,visibility,transform",or="opacity,transition",rr="width,left,right",nr="position,left,right,top,bottom,width,height,pointerEvents",sr="height,minHeight",ar=er.create("headerEnterFade","M0,0 C0.72,0 0.4,0.88 0.58,0.96 0.78,1 0.9,1 1,1");class lr{constructor(e=c.coreHeader){this.header=e instanceof Element?e:null,this.enabled=Boolean(this.header)&&c.firstLoad&&"true"!==document.documentElement.dataset.headerIntroSeen&&!c.isReducedMotion,this.ctx=null,this.tl=null,this.ctaTl=null,this.linkRollTl=null,this.played=!1,this.metrics=null,this.enterRolledLinks=[]}shouldAnimate(){return this.enabled&&Boolean(this.header)&&!this.played&&!c.isReducedMotion}prepare(){var e,t;if(this.shouldAnimate())try{const i=this.getTargets();if(!i.shell||!i.pill||!i.logo)return void this.clearPending();null==(t=null==(e=this.header)?void 0:e.setAttribute)||t.call(e,"data-header-enter-ctas-pending",""),this.metrics=this.measure(i),this.isCompactHeader()?this.applyFadeOnlyCollapsedState(i,this.metrics):this.applyCollapsedState(i,this.metrics)}catch(i){this.recoverVisible()}else this.clearPending()}recoverVisible(){this.enabled=!1,this.kill(),this.snapExpanded(this.getTargets()),this.clearPending()}isCompactHeader(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(max-width: 1100px)").matches}play(){return this.shouldAnimate()?Y().then((()=>this.playNow())).catch((()=>{this.recoverVisible()})):(this.clearPending(),Promise.resolve())}playNow(){var e,t;if(!this.shouldAnimate())return this.clearPending(),Promise.resolve();document.documentElement.dataset.headerIntroSeen="true";try{sessionStorage.setItem("okaydev:header-intro-seen","1")}catch(o){}const i=this.metrics;return this.kill(),this.metrics=i,null==(t=null==(e=this.header)?void 0:e.setAttribute)||t.call(e,"data-header-enter-ctas-pending",""),new Promise((e=>{this.ctx=R.context((()=>{var t;const i=this.getTargets(),{shell:o,pill:r,logo:n,backdrop:s,nav:a,links:l,mobileNavBtn:d}=i;if(!o||!r||!n)return this.clearPending(),void e();const u=null!=(t=this.metrics)?t:this.measure(i);this.metrics=u;const h=this.isCompactHeader();h?this.applyFadeOnlyCollapsedState(i,u):this.applyCollapsedState(i,u),this.clearEnterPending();const m=()=>{this.clearCtasPending(),this.played=!0,e()};if(!h&&u.ratio>=.98)return this.snapExpanded(i),void m();let p=Promise.resolve(),v=Promise.resolve();const g=R.timeline({onComplete:()=>{Promise.all([p,v]).then(m)}});g.fromTo(r,{autoAlpha:0},{autoAlpha:1,duration:.52,ease:ar,clearProps:tr},0),s&&u.backdropOpacity>0&&g.fromTo(s,{opacity:0}
30,{opacity:u.backdropOpacity,duration:.78,ease:ar,clearProps:or},0),g.fromTo(n,{autoAlpha:0},{autoAlpha:1,duration:.48,ease:ar,clearProps:tr},.04),g.call((()=>{let e=!1;const t=(i=0)=>{var o;if(!e)return(null==(o=c.headerLogoLetters)?void 0:o.playEnterSweep)?(e=!0,void c.headerLogoLetters.playEnterSweep()):void(i<40&&requestAnimationFrame((()=>t(i+1))))};t()}),null,.16);const f=h?0:.62;h||g.to(r,{width:u.fullWidth,duration:f,ease:"power3.inOut",onComplete:()=>{R.set(r,{clearProps:rr})}},.28);const y=h?.2:.28+.72*f;a&&g.set(a,{visibility:"visible",clearProps:nr},y),h||g.set(o,{clearProps:sr},y),d&&(this.prepHamburgerLines(d),g.set(d,{autoAlpha:1,clearProps:tr},y),this.getHamburgerLineTargets(d).forEach(((e,t)=>{g.to(e.el,{x:0,y:e.y,scaleX:e.scaleX,transformOrigin:"left center",duration:.34,ease:"power2.out",onComplete:()=>{R.set(e.el,{x:e.x,y:e.y,scaleX:e.scaleX,transformOrigin:e.transformOrigin,clearProps:"transform,transformOrigin"})}},y+.08*t)}))),g.call((()=>{v=this.playPrimaryLinkRollReveal(l)}),null,y),g.to({},{duration:.01},y),g.call((()=>{p=this.playCtaReveal()}),null,y+.1),g.to({},{duration:.01},y+.11),this.tl=g}),this.header)}))}playCtaReveal(){var e;return null==(e=this.ctaTl)||e.kill(),this.whenAuthChromeReady().then((()=>{const{guestAuth:e,shareBtn:t,avatar:i,menuIcon:o,menuIconLines:r}=this.getTargets();if(e.length||t||i||r.length)return this.applyCtaFromStates({guestAuth:e,shareBtn:t,avatar:i,menuIcon:o,menuIconLines:r}),this.clearCtasPending(),new Promise((n=>{const s=R.timeline({onComplete:n});let a=0;e.length&&(s.fromTo(e,{autoAlpha:0},{autoAlpha:1,duration:.36,ease:"power2.out",stagger:.07,clearProps:tr},a),a+=.08),t&&(s.fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.36,ease:"power2.out"},a),s.fromTo(t,{scale:.4,transformOrigin:"right center"},{scale:1,transformOrigin:"right center",duration:.72,ease:"elastic.out(1, 0.45)",clearProps:`${ir},transformOrigin`},a),a+=.08),i&&(s.fromTo(i,{autoAlpha:0},{autoAlpha:1,duration:.22,ease:"power3.out"},a),s.fromTo(i,{scale:.78},{scale:1,duration:.28,ease:"power3.out",clearProps:ir},a),a+=.06),o&&s.set(o,{autoAlpha:1,clearProps:tr},a),r.length&&s.fromTo(r,{scaleX:0,transformOrigin:"left center"},{scaleX:1,duration:.34,ease:"power2.out",stagger:.08,clearProps:"transform"},a),this.ctaTl=s}));this.clearCtasPending()}))}whenAuthChromeReady(){const e=document.getElementById("okaydev-navbar-auth-root");return e&&e.classList.contains("is-navbar-auth-user")&&e.querySelector(".navbar-auth-placeholder")?new Promise((t=>{let i=!1;const o=()=>{i||(i=!0,window.removeEventListener("servd.dynamicloaded",r),window.removeEventListener("okaydev:navbar-auth-refreshed",r),window.clearTimeout(n),t())},r=()=>{e.querySelector(".navbar-auth-placeholder")||o()},n=window.setTimeout(o,1200);window.addEventListener("servd.dynamicloaded",r),window.addEventListener("okaydev:navbar-auth-refreshed",r)})):Promise.resolve()}getPrimaryLinkAnchors(e){return(e||[]).map((e=>{var t;return null==(t=e.querySelector)?void 0:t.call(e,"a.label-1")})).filter((e=>e instanceof Element))}getPrimaryLinkRollTiming(){var e;const t=null==(e=this.header)?void 0:e.querySelector(".core-nav-list-primary");if(!t)return{duration:.24,stagger:.04};const i=getComputedStyle(t);return{duration:parseFloat(i.getPropertyValue("--core-nav-primary-link-roll-duration"))||.24,stagger:parseFloat(i.getPropertyValue("--core-nav-primary-link-roll-stagger"))||.04}}playPrimaryLinkRollReveal(e){var t,i;null==(t=this.linkRollTl)||t.kill(),this.clearPrimaryLinkRollStyles(this.enterRolledLinks);const o=this.getPrimaryLinkAnchors(e);if(!o.length)return this.enterRolledLinks=[],(null==e?void 0:e.length)&&R.set(e,{autoAlpha:1,clearProps:tr}),Promise.resolve();this.enterRolledLinks=o;const{duration:r,stagger:n}=this.getPrimaryLinkRollTiming(),s=.05*Math.max(0,o.length-1)+r+n;return o.forEach((e=>{e.classList.add("is-header-enter-link-prep")})),null==(i=o[0])||i.offsetWidth,(null==e?void 0:e.length)&&R.set(e,{autoAlpha:1,clearProps:tr}),new Promise((e=>{const t=R.timeline({onComplete:()=>{this.clearPrimaryLinkRollStyles(o),this.linkRollTl=null,e()}});o.forEach(((e,i)=>{t.call((()=>{e.classList.remove("is-header-enter-link-prep"),e.classList.add("is-header-enter-link-rolled")}),null,.05*i)})),t.to({},{duration:s},0),this.linkRollTl=t}))}
30clearPrimaryLinkRollStyles(e){(e||[]).forEach((e=>{if(!(e instanceof Element))return;const t=e.querySelectorAll(".core-nav-link-roll > span");t.forEach((e=>{e.style.transition="none"})),e.classList.remove("is-header-enter-link-prep","is-header-enter-link-rolled"),e.offsetWidth,t.forEach((e=>{e.style.transition=""}))})),this.enterRolledLinks=[]}measure({shell:e,pill:t,logo:i,backdrop:o,nav:r}){R.set(t,{clearProps:rr}),R.set(e,{clearProps:sr}),R.set(i,{clearProps:tr}),o&&R.set(o,{clearProps:or}),r&&R.set(r,{clearProps:nr});const n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),a=i.getBoundingClientRect(),l=getComputedStyle(e),d=parseFloat(l.paddingLeft)||0,c=parseFloat(l.paddingRight)||0,u=s.width||n.width,h=a.width,m=Math.min(u,Math.max(h+d+c,1));return{fullWidth:u,narrowWidth:m,ratio:u>0?Math.min(1,m/u):1,shellHeight:n.height,backdropOpacity:o?Math.min(1,Math.max(0,parseFloat(getComputedStyle(o).opacity)||0)):0}}applyCtaFromStates({guestAuth:e,shareBtn:t,avatar:i,menuIcon:o,menuIconLines:r}){e.length&&R.set(e,{autoAlpha:0}),t&&R.set(t,{autoAlpha:0,scale:.4,transformOrigin:"right center"}),i&&R.set(i,{autoAlpha:0,scale:.78,transformOrigin:"50% 50%"}),o&&R.set(o,{autoAlpha:0}),r.length&&R.set(r,{scaleX:0,transformOrigin:"left center"})}getHamburgerLineTargets(e){if(!(e instanceof Element))return[];const t=e.querySelector(".mobile-nav-toggle-line-top"),i=e.querySelector(".mobile-nav-toggle-line-bottom"),o=[];return t&&o.push({el:t,x:0,y:-3.5,scaleX:1,transformOrigin:"center center"}),i&&o.push({el:i,x:-2.85,y:3.5,scaleX:.7,transformOrigin:"center center"}),o}prepHamburgerLines(e){this.getHamburgerLineTargets(e).forEach((({el:e,y:t})=>{R.set(e,{x:0,y:t,scaleX:0,transformOrigin:"left center"})}))}applyFadeOnlyCollapsedState(e,t){const{pill:i,logo:o,backdrop:r,links:n,mobileNavBtn:s}=e,{backdropOpacity:a}=t;n.length&&R.set(n,{autoAlpha:0}),s&&(R.set(s,{autoAlpha:0}),this.prepHamburgerLines(s)),this.applyCtaFromStates(e),R.set(i,{autoAlpha:0,clearProps:rr}),r&&a>0&&R.set(r,{opacity:0,transition:"none"}),R.set(o,{autoAlpha:0})}applyCollapsedState(e,t){const{shell:i,pill:o,logo:r,backdrop:n,nav:s,links:a,mobileNavBtn:l}=e,{narrowWidth:d,shellHeight:c,backdropOpacity:u}=t;s&&R.set(s,{position:"absolute",left:0,right:0,top:0,bottom:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none"}),c>0&&R.set(i,{height:c,minHeight:c}),a.length&&R.set(a,{autoAlpha:0}),l&&(R.set(l,{autoAlpha:0}),this.prepHamburgerLines(l)),this.applyCtaFromStates(e),R.set(o,{width:d,left:0,right:"auto",autoAlpha:0}),n&&u>0&&R.set(n,{opacity:0,transition:"none"}),R.set(r,{autoAlpha:0})}snapExpanded(e,t=this.metrics){const{shell:i,pill:o,logo:r,backdrop:n,nav:s,links:a,guestAuth:l,shareBtn:d,avatar:c,menuIcon:u,menuIconLines:h,mobileNavBtn:m}=e;R.set(o,{autoAlpha:1,clearProps:`${rr},${tr}`}),R.set(r,{autoAlpha:1,clearProps:tr}),n&&(null==t?void 0:t.backdropOpacity)>0&&R.set(n,{opacity:t.backdropOpacity,clearProps:or}),s&&R.set(s,{visibility:"visible",clearProps:nr}),R.set(i,{clearProps:sr}),a.length&&R.set(a,{autoAlpha:1,clearProps:tr}),l.length&&R.set(l,{autoAlpha:1,clearProps:tr}),d&&R.set(d,{autoAlpha:1,scale:1,clearProps:`${ir},transformOrigin`}),c&&R.set(c,{autoAlpha:1,scale:1,clearProps:ir}),u&&R.set(u,{autoAlpha:1,clearProps:tr}),h.length&&R.set(h,{scaleX:1,clearProps:"transform"}),m&&(R.set(m,{autoAlpha:1,clearProps:tr}),this.getHamburgerLineTargets(m).forEach((({el:e})=>{R.set(e,{clearProps:"transform,transformOrigin"})}))),this.clearPrimaryLinkRollStyles(this.enterRolledLinks),this.clearCtasPending()}getTargets(){const e=this.header;if(!e)return{shell:null,pill:null,logo:null,backdrop:null,nav:null,links:[],guestAuth:[],shareBtn:null,avatar:null,menuIcon:null,menuIconLines:[],mobileNavBtn:null};const t=e.querySelector(".core-header-inner"),i=e.querySelector(".core-header-pill"),o=e.querySelector(".core-logo-container"),r=e.querySelector(".header-backdrop"),n=e.querySelector(".core-nav"),s=R.utils.toArray(e.querySelectorAll(".core-nav-list-primary > li:not(.is-empty)")).filter((e=>!e.hasAttribute("hidden")&&"true"!==e.getAttribute("aria-hidden"))),a=[e.querySelector(".okaydev-navbar-auth-root .sign-in"),e.querySelector(".okaydev-navbar-auth-root .sign-up")].filter((e=>this.isDisplayed(e))),l=e.querySelector(".okaydev-navbar-auth-root .btn-core-add-project"),d=e.querySelector(".okaydev-navbar-auth-root .btn-core-user-container"),c=e.querySelector(".okaydev-navbar-auth-root .btn-core-user-menu-icon"),u=c?R.utils.toArray(c.querySelectorAll("rect")):[];return{shell:t,pill:i,logo:o,backdrop:r,nav:n,links:s,guestAuth:a,shareBtn:l,avatar:d,menuIcon:c,menuIconLines:u,mobileNavBtn:this.isDisplayed(e.querySelector(".btn-mobile-nav"))?e.querySelector(".btn-mobile-nav"):null}}isDisplayed(e){return e instanceof Element&&"none"!==window.getComputedStyle(e).display}clearEnterPending(){var e,t;null==(t=null==(e=this.header)?void 0:e.removeAttribute)||t.call(e,"data-header-enter-pending")}clearCtasPending(){var e,t;null==(t=null==(e=this.header)?void 0:e.removeAttribute)||t.call(e,"data-header-enter-ctas-pending")}clearPending(){this.clearEnterPending(),this.clearCtasPending()}kill(){var e,t,i,o;null==(e=this.tl)||e.kill(),this.tl=null,null==(t=this.ctaTl)||t.kill(),this.ctaTl=null,null==(i=this.linkRollTl)||i.kill(),this.linkRollTl=null,this.clearPrimaryLinkRollStyles(this.enterRolledLinks),null==(o=this.ctx)||o.revert(),this.ctx=null}destroy(){this.kill(),this.clearPending(),this.header=null,this.enabled=!1,this.metrics=null}}function dr(){return document.getElementById("notifications-badge")}function cr(){return Array.from(document.querySelectorAll("#avatar-notif-circle, #avatar-notif-circle-mobile"))}function ur(e){const t=function(){const e=document.getElementById("okaydev-notification-bell-icon");if(!e)return null;const t=e.content.cloneNode(!0),i=document.createElement("div");return i.appendChild(t),i.innerHTML}();t&&(e.innerHTML=t)}function hr(e=""){var t;const i=dr(),o=document.querySelector("#notifications-badge .badge"),r=cr(),n=function(e){return e.trim().replace(/^\+/,"")}(null!=(t=null==o?void 0:o.textContent)?t:""),s="0"!==n&&""!==n,a="true"===(null==i?void 0:i.dataset.hasNotifications),l=r.some((e=>e.classList.contains("has-new"))),d=s||a||l;return{hasNotifications:d,countText:n,displayCountText:s?n:d?e||"1":""}}function mr(){const e=document.querySelector("#nav-notifications .badge");if(!e)return;const t=hr(e.textContent.trim());e.textContent=t.displayCountText,e.hidden=!t.hasNotifications,e.setAttribute("aria-hidden",t.hasNotifications?"fal
30se":"true"),e.classList.toggle("has-notifications",t.hasNotifications)}function pr({hasNotifications:e,countText:t=""}){const i=dr();cr().forEach((t=>{t.classList.toggle("has-new",e)})),i&&(i.classList.toggle("has-notifications",e),i.classList.toggle("has-unread-notifications",e),i.dataset.hasNotifications=e?"true":"false",e?function(e,t){var i;null==(i=e.querySelector("svg"))||i.remove();let o=e.querySelector(".badge");o||(o=document.createElement("span"),o.className="badge icon-notification-count",e.appendChild(o)),o.textContent=function(e){const t=e.trim();return!t||t.startsWith("+")?t:`+${t}`}(t)}(i,t):ur(i)),mr()}const vr=3.5;class gr{constructor(){this.userMenuDismissVersion=0,this.userMenuDismissedUntilLeave=!1,this.initVars(),this.initPage()}initVars(){this.coreNav=c.body.querySelector(".core-nav"),this.coreNavUserContainer=c.body.querySelector(".core-nav-user-container"),this.coreNavUserList=c.body.querySelector(".core-nav-user-list"),this.btnMobileNav=c.body.querySelector(".btn-mobile-nav"),this.mobileNavToggleLineTop=c.body.querySelector(".mobile-nav-toggle-line-top"),this.mobileNavToggleLineMiddle=c.body.querySelector(".mobile-nav-toggle-line-middle"),this.mobileNavToggleLineBottom=c.body.querySelector(".mobile-nav-toggle-line-bottom"),this.coreNavList=c.body.querySelector(".core-nav-list"),this.mobileNavPanelBg=c.body.querySelector(".core-nav-mobile-panel-bg"),this.navbarAuthRoot=c.body.querySelector(".okaydev-navbar-auth-root"),this.mobileNavAccountBg=c.body.querySelector(".core-nav-mobile-account-bg"),this.mobileNavAccountDivider=c.body.querySelector(".core-nav-mobile-account-divider"),this.mobileContentCover=c.body.querySelector(".mobile-content-cover"),this.mobileNavScrollX=0,this.mobileNavScrollY=0,this._mobileNavScrollLock=null,this.mobileNavTl=null,this.mobileNavToggleTl=null,this.mobileNavCloseTween=null,this.mobileNavClosePromise=null,this.mobileNavCloseResolve=null,this.mobileNavMediaQuery=window.matchMedia("(max-width: 1100px)"),this.primaryNavLinks=[],this._primaryNavLinkRollMs=null,this.shareWorkCta=null,this._shareWorkOpenMs=null,this._shareWorkCloseMs=null,this.userMenuTrigger=null,this._userMenuOpenDurationMs=null,this._userMenuCloseMs=null,this._notificationMenuRefreshTimer=null,this.markAllNotificationsButton=null}initPage(){this.addListeners()}addListeners(){const e=this;$(e,["toggleMobileNav","onSamePageNavLinkCapture","scrollWindowToTop","onDocumentKeydown","membershipsCtaMouseOver","membershipsCtaFocusIn","membershipsCtaShineEnd","primaryNavLinkActivate","primaryNavLinkPointerLeave","primaryNavLinkFocusOut","shareWorkCtaActivate","shareWorkCtaPointerLeave","userMenuActivate","userMenuPointerLeave","markAllNotificationsRead","onMobileNavReverseComplete","finalizeMobileNavClose","handleMobileNavViewportChange","onServdDynamicLoaded","onNavbarAuthRefreshed","onNotificationsBadgeSwap"]),this.btnMobileNav&&this.btnMobileNav.addEventListener("click",e.toggleMobileNav),this.mobileContentCover&&this.mobileContentCover.addEventListener("click",e.toggleMobileNav),document.addEventListener("keydown",e.onDocumentKeydown),document.addEventListener("htmx:afterSwap",e.onNotificationsBadgeSwap),this.coreNav&&(this.coreNav.addEventListener("mouseover",e.membershipsCtaMouseOver),this.coreNav.addEventListener("focusin",e.membershipsCtaFocusIn),this.coreNav.addEventListener("animationend",e.membershipsCtaShineEnd),this.coreNav.addEventListener("click",e.onSamePageNavLinkCapture,!0)),this.bindPrimaryNavLinkRoll(),this.bindShareWorkCta(),this.bindUserMenu(),window.addEventListener("servd.dynamicloaded",e.onServdDynamicLoaded),window.addEventListener("okaydev:navbar-auth-refreshed",e.onNavbarAuthRefreshed),this.mobileNavMediaQuery.addEventListener("change",e.handleMobileNavViewportChange)}rebindAuthChrome(){this.coreNavUserContainer=c.body.querySelector(".core-nav-user-container"),this.coreNavUserList=c.body.querySelector(".core-nav-user-list"),this.refreshMobileNavAnimationTargets(),this.killMobileNavAnimation(),c.root.classList.contains("is-nav-open")&&this.setMobileNavInstantState(!0),this.bindShareWorkCta(),this.bindUserMenu()}onServdDynamicLoaded(){c.body.querySelector(".core-nav-user-container")&&this.rebindAuthChrome()}onNavbarAuthRefreshed(){this.rebindAuthChrome()}onNotificationsBadgeSwap(e){var t,i,o;const r=null==(t=null==e?void 0:e.detail)?void 0:t.target,n=(null==(i=null==e?void 0:e.detail)?void 0:i.elt)||r;if("notifications-badge"!==((null==n?void 0:n.id)||(null==r?void 0:r.id)||"")||!this.coreNavUserList)return;const s=hr(),a=document.getElementById("notifications-badge"),l="true"===(null==a?void 0:a.dataset.hasNotifications)||""!==s.countText&&"0"!==s.countText,d=this.coreNavUserList.classList.contains("has-notification-preview"),c=this.coreNavUserList.dataset.notificationCount||"0",u=s.countText||"0";if(l===d&&u===c)return;this._notificationMenuRefreshTimer&&window.clearTimeout(this._notificationMenuRefreshTimer);const h=(null==(o=this.coreNavUserContainer)?void 0:o.classList.contains("is-core-nav-user-menu-open"))||!this.userMenuDismissedUntilLeave&&this.isUserMenuPointerActive(),m=this.userMenuDismissVersion;this._notificationMenuRefreshTimer=window.setTimeout((async()=>{this._notificationMenuRefreshTimer=null;const e=Boolean(document.querySelector('[data-handle="notifications"]'));"valid"===await Ke({notificationsOnly:e})&&h&&m===this.userMenuDismissVersion&&this.canUserMenuLatch()&&this.coreNavUserContainer&&(this.coreNavUserContainer.classList.add("is-core-nav-user-menu-open"),this.coreNavUserContainer._userMenuOpenActivatedAt=Date.now())}),60)}bindPrimaryNavLinkRoll(){this.unbindPrimaryNavLinkRoll(),this.canPrimaryNavLinkRoll()&&(this.primaryNavLinks=[...this.coreNav.querySelectorAll(".core-nav-list-primary a.label-1, .okaydev-navbar-auth-root .sign-in a.label-1")],this.primaryNavLinks.forEach((e=>{e.addEventListener("pointerenter",this.primaryNavLinkActivate),e.addEventListener("pointerleave",this.primaryNavLinkPointerLeave),e.addEventListener("focusin",this.primaryNavLinkActivate),e.addEventListener("focusout",this.primaryNavLinkFocusOut)})))}
30unbindPrimaryNavLinkRoll(){this.primaryNavLinks.forEach((e=>{e.removeEventListener("pointerenter",this.primaryNavLinkActivate),e.removeEventListener("pointerleave",this.primaryNavLinkPointerLeave),e.removeEventListener("focusin",this.primaryNavLinkActivate),e.removeEventListener("focusout",this.primaryNavLinkFocusOut),this.clearPrimaryNavLinkRollState(e)})),this.primaryNavLinks=[],this._primaryNavLinkRollMs=null}canPrimaryNavLinkRoll(){return this.coreNav&&window.matchMedia("(min-width: 1101px) and (hover: hover) and (pointer: fine)").matches&&!c.isReducedMotion}getPrimaryNavLinkRollMs(){var e;if(null!=this._primaryNavLinkRollMs)return this._primaryNavLinkRollMs;const t=null==(e=this.coreNav)?void 0:e.querySelector(".core-nav-list-primary");if(!t)return 280;const i=getComputedStyle(t),o=1e3*parseFloat(i.getPropertyValue("--core-nav-primary-link-roll-duration"))||240,r=1e3*parseFloat(i.getPropertyValue("--core-nav-primary-link-roll-stagger"))||40;return this._primaryNavLinkRollMs=o+r,this._primaryNavLinkRollMs}isPrimaryNavLinkActive(e){return e.matches(":hover")||e.matches(":focus-visible")}clearPrimaryNavLinkRollState(e){e._rollReleaseTimer&&(window.clearTimeout(e._rollReleaseTimer),e._rollReleaseTimer=null),e.classList.remove("is-core-nav-link-rolled"),delete e._rollActivatedAt}primaryNavLinkActivate(e){const t=e.currentTarget;t._rollReleaseTimer&&(window.clearTimeout(t._rollReleaseTimer),t._rollReleaseTimer=null),t._rollActivatedAt=Date.now(),t.classList.add("is-core-nav-link-rolled")}schedulePrimaryNavLinkRelease(e){const t=Date.now()-(e._rollActivatedAt||0),i=Math.max(0,this.getPrimaryNavLinkRollMs()-t);e._rollReleaseTimer&&window.clearTimeout(e._rollReleaseTimer),e._rollReleaseTimer=window.setTimeout((()=>{e._rollReleaseTimer=null,this.isPrimaryNavLinkActive(e)||e.classList.remove("is-core-nav-link-rolled")}),i)}primaryNavLinkPointerLeave(e){const t=e.currentTarget;e.relatedTarget&&t.contains(e.relatedTarget)||this.schedulePrimaryNavLinkRelease(t)}primaryNavLinkFocusOut(e){const t=e.currentTarget;e.relatedTarget&&t.contains(e.relatedTarget)||this.schedulePrimaryNavLinkRelease(t)}bindShareWorkCta(){var e;this.unbindShareWorkCta(),this.canShareWorkCtaLatch()&&(this.shareWorkCta=null==(e=this.coreNav)?void 0:e.querySelector(".core-nav-user-container > a.btn-core-add-project"),this.shareWorkCta&&(this.shareWorkCta.addEventListener("pointerenter",this.shareWorkCtaActivate),this.shareWorkCta.addEventListener("pointerleave",this.shareWorkCtaPointerLeave)))}unbindShareWorkCta(){this.shareWorkCta&&(this.shareWorkCta.removeEventListener("pointerenter",this.shareWorkCtaActivate),this.shareWorkCta.removeEventListener("pointerleave",this.shareWorkCtaPointerLeave),this.clearShareWorkCtaState(this.shareWorkCta)),this.shareWorkCta=null,this._shareWorkOpenMs=null,this._shareWorkCloseMs=null}canShareWorkCtaLatch(){return this.coreNav&&window.matchMedia("(min-width: 1101px) and (hover: hover) and (pointer: fine)").matches&&!c.isReducedMotion}getShareWorkOpenMs(){return null!=this._shareWorkOpenMs||(this._shareWorkOpenMs=this.getShareWorkIntentMs()+this.getShareWorkOpenDurationMs()),this._shareWorkOpenMs}getShareWorkIntentMs(){return this.getHeaderHoverIntentMs()}getHeaderHoverIntentMs(){const e=getComputedStyle(document.documentElement);return 1e3*parseFloat(e.getPropertyValue("--core-header-hover-intent"))||100}getShareWorkOpenDurationMs(){var e;const t=this.shareWorkCta||(null==(e=this.coreNav)?void 0:e.querySelector(".core-nav-user-container > a.btn-core-add-project"));if(!t)return 480;const i=getComputedStyle(t);return 1e3*parseFloat(i.getPropertyValue("--btn-core-add-project-open-duration"))||480}getShareWorkCloseMs(){var e;if(null!=this._shareWorkCloseMs)return this._shareWorkCloseMs;const t=this.shareWorkCta||(null==(e=this.coreNav)?void 0:e.querySelector(".core-nav-user-container > a.btn-core-add-project"));if(!t)return 120;const i=getComputedStyle(t),o=1e3*parseFloat(i.getPropertyValue("--btn-core-add-project-close-duration"))||100;return this._shareWorkCloseMs=o+20,this._shareWorkCloseMs}isShareWorkCtaActive(e){return e.matches(":hover")||e.matches(":focus-visible")}clearShareWorkCtaTimers(e){e._shareWorkIntentTimer&&(window.clearTimeout(e._shareWorkIntentTimer),e._shareWorkIntentTimer=null),e._shareWorkOpenReleaseTimer&&(window.clearTimeout(e._shareWorkOpenReleaseTimer),e._shareWorkOpenReleaseTimer=null),e._shareWorkCloseReleaseTimer&&(window.clearTimeout(e._shareWorkCloseReleaseTimer),e._shareWorkCloseReleaseTimer=null)}clearShareWorkCtaState(e){this.clearShareWorkCtaTimers(e),e.classList.remove("is-btn-core-add-project-open"),delete e._shareWorkOpenActivatedAt,delete e._shareWorkCloseActivatedAt}restartShareWorkCtaOpen(e){e.classList.remove("is-btn-core-add-project-open"),e.offsetWidth,e.classList.add("is-btn-core-add-project-open")}shareWorkCtaActivate(e){const t=e.currentTarget;if(this.clearShareWorkCtaTimers(t),t._shareWorkCloseActivatedAt)return delete t._shareWorkCloseActivatedAt,this.restartShareWorkCtaOpen(t),void(t._shareWorkOpenActivatedAt=Date.now());t.classList.contains("is-btn-core-add-project-open")?t._shareWorkOpenActivatedAt=Date.now():t._shareWorkIntentTimer=window.setTimeout((()=>{t._shareWorkIntentTimer=null,this.isShareWorkCtaActive(t)&&(t.classList.add("is-btn-core-add-project-open"),t._shareWorkOpenActivatedAt=Date.now())}
30),this.getShareWorkIntentMs())}scheduleShareWorkCtaOpenRelease(e){const t=Date.now()-(e._shareWorkOpenActivatedAt||0),i=Math.max(0,this.getShareWorkOpenDurationMs()-t);e._shareWorkOpenReleaseTimer&&window.clearTimeout(e._shareWorkOpenReleaseTimer),e._shareWorkOpenReleaseTimer=window.setTimeout((()=>{e._shareWorkOpenReleaseTimer=null,this.isShareWorkCtaActive(e)||(e.classList.remove("is-btn-core-add-project-open"),e._shareWorkCloseActivatedAt=Date.now(),this.scheduleShareWorkCtaCloseRelease(e))}),i)}scheduleShareWorkCtaCloseRelease(e){const t=Date.now()-(e._shareWorkCloseActivatedAt||0),i=Math.max(0,this.getShareWorkCloseMs()-t);e._shareWorkCloseReleaseTimer&&window.clearTimeout(e._shareWorkCloseReleaseTimer),e._shareWorkCloseReleaseTimer=window.setTimeout((()=>{e._shareWorkCloseReleaseTimer=null,delete e._shareWorkCloseActivatedAt}),i)}shareWorkCtaPointerLeave(e){const t=e.currentTarget;if(!e.relatedTarget||!t.contains(e.relatedTarget))return t._shareWorkIntentTimer?(window.clearTimeout(t._shareWorkIntentTimer),void(t._shareWorkIntentTimer=null)):void(t.classList.contains("is-btn-core-add-project-open")?this.scheduleShareWorkCtaOpenRelease(t):t._shareWorkCloseActivatedAt&&this.scheduleShareWorkCtaCloseRelease(t))}bindUserMenu(){var e;this.unbindUserMenu(),this.canUserMenuLatch()&&(this.userMenuTrigger=null==(e=this.coreNavUserContainer)?void 0:e.querySelector(".current-user-container"),this.coreNavUserContainer&&this.userMenuTrigger&&this.coreNavUserList&&(this.userMenuTrigger.addEventListener("pointerenter",this.userMenuActivate),this.coreNavUserList.addEventListener("pointerenter",this.userMenuActivate),this.userMenuTrigger.addEventListener("pointerleave",this.userMenuPointerLeave),this.coreNavUserList.addEventListener("pointerleave",this.userMenuPointerLeave),this.rebindNotificationMenuActions()))}rebindNotificationMenuActions(){var e,t,i;null==(e=this.markAllNotificationsButton)||e.removeEventListener("click",this.markAllNotificationsRead),this.markAllNotificationsButton=null==(t=this.coreNavUserList)?void 0:t.querySelector(".core-nav-user-notifications-mark-all"),null==(i=this.markAllNotificationsButton)||i.addEventListener("click",this.markAllNotificationsRead)}unbindUserMenu(){this.userMenuTrigger&&(this.userMenuTrigger.removeEventListener("pointerenter",this.userMenuActivate),this.userMenuTrigger.removeEventListener("pointerleave",this.userMenuPointerLeave)),this.coreNavUserList&&(this.coreNavUserList.removeEventListener("pointerenter",this.userMenuActivate),this.coreNavUserList.removeEventListener("pointerleave",this.userMenuPointerLeave)),this.markAllNotificationsButton&&this.markAllNotificationsButton.removeEventListener("click",this.markAllNotificationsRead),this.coreNavUserContainer&&this.clearUserMenuState(this.coreNavUserContainer),this.userMenuTrigger=null,this.markAllNotificationsButton=null,this._userMenuOpenDurationMs=null,this._userMenuCloseMs=null}async markAllNotificationsRead(e){var t,i;const o=e.currentTarget,r=window.csrfTokenValue||window.csrfToken||(null==(t=document.querySelector('meta[name="csrf-token"]'))?void 0:t.getAttribute("content"));if(!o||o.disabled||!r)return;const n=[...this.coreNavUserList.querySelectorAll(".core-nav-user-notification-toast[data-notification-id]")].map((e=>e.getAttribute("data-notification-id"))).filter((e=>e&&/^\d+$/.test(e)));if(0===n.length)return;const s=(null==(i=this.coreNavUserContainer)?void 0:i.classList.contains("is-core-nav-user-menu-open"))||!this.userMenuDismissedUntilLeave&&this.isUserMenuPointerActive(),a=this.userMenuDismissVersion;o.disabled=!0,o.setAttribute("aria-busy","true");try{const e=new URLSearchParams;n.forEach((t=>{e.append("notificationIds[]",t)}));const t=await fetch("/actions/okaynotifications/okay-notifications/mark-all-as-read",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest","X-CSRF-Token":r},body:e});if(!t.ok)throw new Error(`Unable to mark notifications as read (${t.status}).`);"valid"===await Ke({force:!0,notificationsOnly:!0})&&s&&a===this.userMenuDismissVersion&&this.coreNavUserContainer&&(this.coreNavUserContainer.classList.add("is-core-nav-user-menu-open"),this.coreNavUserContainer._userMenuOpenActivatedAt=Date.now()),window.dispatchEvent(new CustomEvent("okaydev:notifications-marked-all-read"))}catch(l){o.disabled=!1,o.removeAttribute("aria-busy")}}canUserMenuLatch(){return this.coreNav&&window.matchMedia("(min-width: 1101px) and (hover: hover) and (pointer: fine)").matches&&!c.isReducedMotion}getUserMenuOpenDurationMs(){if(null!=this._userMenuOpenDurationMs)return this._userMenuOpenDurationMs;const e=this.coreNavUserList;if(!e)return 280;const t=getComputedStyle(e),i=1e3*parseFloat(t.getPropertyValue("--core-nav-user-menu-open-duration"))||280,o=1e3*parseFloat(t.getPropertyValue("--core-nav-user-menu-item-stagger-spread"))||140,r=1e3*parseFloat(t.getPropertyValue("--core-nav-user-menu-item-open-duration"))||140;return this._userMenuOpenDurationMs=Math.max(i,o+r),this._userMenuOpenDurationMs}getUserMenuCloseMs(){if(null!=this._userMenuCloseMs)return this._userMenuCloseMs;const e=this.coreNavUserList;if(!e)return 140;const t=getComputedStyle(e);return this._userMenuCloseMs=1e3*parseFloat(t.getPropertyValue("--core-nav-user-menu-close-duration"))||140,this._userMenuCloseMs}isUserMenuPointerActive(){var e,t;return(null==(e=this.userMenuTrigger)?void 0:e.matches(":hover"))||(null==(t=this.coreNavUserList)?void 0:t.matches(":hover"))}isRelatedTargetInUserMenuZone(e){var t,i;return!!e&&((null==(t=this.userMenuTrigger)?void 0:t.contains(e))||(null==(i=this.coreNavUserList)?void 0:i.contains(e)))}clearUserMenuTimers(e){e._userMenuIntentTimer&&(window.clearTimeout(e._userMenuIntentTimer),e._userMenuIntentTimer=null),e._userMenuOpenReleaseTimer&&(window.clearTimeout(e._userMenuOpenReleaseTimer),e._userMenuOpenReleaseTimer=null),e._userMenuCloseReleaseTimer&&(window.clearTimeout(e._userMenuCloseReleaseTimer),e._userMenuCloseReleaseTimer=null)}clearUserMenuState(e){this.clearUserMenuTimers(e),e.classList.remove("is-core-nav-user-menu-open"),delete e._userMenuOpenActivatedAt,delete e._userMenuCloseActivatedAt}
30closeUserMenu(){this.userMenuDismissVersion+=1,this.userMenuDismissedUntilLeave=this.userMenuDismissedUntilLeave||Boolean(this.isUserMenuPointerActive()),this.coreNavUserContainer&&this.canUserMenuLatch()&&this.clearUserMenuState(this.coreNavUserContainer)}userMenuActivate(){const e=this.coreNavUserContainer;if(e&&!this.userMenuDismissedUntilLeave&&!c.root.classList.contains("is-pjax-transition")){if(this.clearUserMenuTimers(e),e._userMenuCloseActivatedAt)return delete e._userMenuCloseActivatedAt,e.classList.add("is-core-nav-user-menu-open"),void(e._userMenuOpenActivatedAt=Date.now());e.classList.contains("is-core-nav-user-menu-open")?e._userMenuOpenActivatedAt=Date.now():e._userMenuIntentTimer=window.setTimeout((()=>{e._userMenuIntentTimer=null,this.isUserMenuPointerActive()&&!c.root.classList.contains("is-pjax-transition")&&(e.classList.add("is-core-nav-user-menu-open"),e._userMenuOpenActivatedAt=Date.now())}),this.getHeaderHoverIntentMs())}}scheduleUserMenuOpenRelease(e){const t=Date.now()-(e._userMenuOpenActivatedAt||0),i=Math.max(0,this.getUserMenuOpenDurationMs()-t);e._userMenuOpenReleaseTimer&&window.clearTimeout(e._userMenuOpenReleaseTimer),e._userMenuOpenReleaseTimer=window.setTimeout((()=>{e._userMenuOpenReleaseTimer=null,this.isUserMenuPointerActive()||(e.classList.remove("is-core-nav-user-menu-open"),e._userMenuCloseActivatedAt=Date.now(),this.scheduleUserMenuCloseRelease(e))}),i)}scheduleUserMenuCloseRelease(e){const t=Date.now()-(e._userMenuCloseActivatedAt||0),i=Math.max(0,this.getUserMenuCloseMs()-t);e._userMenuCloseReleaseTimer&&window.clearTimeout(e._userMenuCloseReleaseTimer),e._userMenuCloseReleaseTimer=window.setTimeout((()=>{e._userMenuCloseReleaseTimer=null,delete e._userMenuCloseActivatedAt}),i)}userMenuPointerLeave(e){const t=this.coreNavUserContainer,i=e.currentTarget;if(t&&!(e.relatedTarget&&i.contains(e.relatedTarget)||this.isRelatedTargetInUserMenuZone(e.relatedTarget))){if(c.root.classList.contains("is-pjax-transition")||(this.userMenuDismissedUntilLeave=!1),t._userMenuIntentTimer)return window.clearTimeout(t._userMenuIntentTimer),void(t._userMenuIntentTimer=null);t.classList.contains("is-core-nav-user-menu-open")?this.scheduleUserMenuOpenRelease(t):t._userMenuCloseActivatedAt&&this.scheduleUserMenuCloseRelease(t)}}removeListeners(e={}){var t;const{preserveOpenMobileNav:i=!1}=e,o=this;this.btnMobileNav&&this.btnMobileNav.removeEventListener("click",o.toggleMobileNav),this.mobileContentCover&&this.mobileContentCover.removeEventListener("click",o.toggleMobileNav),document.removeEventListener("keydown",o.onDocumentKeydown),document.removeEventListener("htmx:afterSwap",o.onNotificationsBadgeSwap),window.removeEventListener("servd.dynamicloaded",o.onServdDynamicLoaded),window.removeEventListener("okaydev:navbar-auth-refreshed",o.onNavbarAuthRefreshed),this.mobileNavMediaQuery.removeEventListener("change",o.handleMobileNavViewportChange),this.coreNav&&(this.coreNav.removeEventListener("mouseover",o.membershipsCtaMouseOver),this.coreNav.removeEventListener("focusin",o.membershipsCtaFocusIn),this.coreNav.removeEventListener("animationend",o.membershipsCtaShineEnd),this.coreNav.removeEventListener("click",o.onSamePageNavLinkCapture,!0),this.coreNav.querySelectorAll("a.memberships-cta.is-memberships-cta-shining").forEach((e=>{e.classList.remove("is-memberships-cta-shining")}))),this.unbindPrimaryNavLinkRoll(),this.unbindShareWorkCta(),this.unbindUserMenu(),this._notificationMenuRefreshTimer&&(window.clearTimeout(this._notificationMenuRefreshTimer),this._notificationMenuRefreshTimer=null),this.killMobileNavAnimation(),i||!c.root.classList.contains("is-nav-open")&&!c.root.classList.contains("is-nav-closing")||(c.root.classList.remove("is-nav-open","is-nav-closing"),null==(t=this.btnMobileNav)||t.setAttribute("aria-expanded","false"),this.unlockMobileNavScroll(),this.setMobileNavInstantState(!1)),this.settleMobileNavClose()}destroy(){this.closeMobileNav(),this.removeListeners()}rebindAfterNavReplace(){var e;const t=this.isMobileNavViewport()&&c.root.classList.contains("is-nav-open")&&!c.root.classList.contains("is-nav-closing"),i=this.mobileNavScrollX,o=this.mobileNavScrollY,r=this._mobileNavScrollLock;this.removeListeners({preserveOpenMobileNav:t}),this.initVars(),t&&(this.mobileNavScrollX=i,this.mobileNavScrollY=o,this._mobileNavScrollLock=r),this.addListeners(),this.rebindAuthChrome(),t&&(null==(e=this.btnMobileNav)||e.setAttribute("aria-expanded","true"))}isMobileNavViewport(){return this.mobileNavMediaQuery.matches}refreshMobileNavAnimationTargets(){this.coreNavList=c.body.querySelector(".core-nav-list"),this.mobileNavPanelBg=c.body.querySelector(".core-nav-mobile-panel-bg"),this.navbarAuthRoot=c.body.querySelector(".okaydev-navbar-auth-root"),this.mobileNavAccountBg=c.body.querySelector(".core-nav-mobile-account-bg"),this.mobileNavAccountDivider=c.body.querySelector(".core-nav-mobile-account-divider"),this.mobileNavToggleLineTop=c.body.querySelector(".mobile-nav-toggle-line-top"),this.mobileNavToggleLineMiddle=c.body.querySelector(".mobile-nav-toggle-line-middle"),this.mobileNavToggleLineBottom=c.body.querySelector(".mobile-nav-toggle-line-bottom")}getMobileNavPrimaryRows(){var e;const t=null==(e=this.coreNavList)?void 0:e.querySelector(".core-nav-list-primary");return t?[[".core-nav-list-social",".core-nav-list-directory"],[".core-nav-list-gallery, .core-nav-list-projects",".core-nav-list-articles"],[".core-nav-list-jobs",".core-nav-list-pricing"]].map((e=>e.map((e=>
30t.querySelector(e))).filter(Boolean))).filter((e=>e.length)):[]}getMobileNavAnimationTargets(){var e,t,i;this.refreshMobileNavAnimationTargets();const o=this.getMobileNavPrimaryRows(),r=o.flat();return{panel:this.coreNavList,panelBg:this.mobileNavPanelBg,primaryItems:r,primaryRows:o,accountBg:this.mobileNavAccountBg,accountDivider:this.mobileNavAccountDivider,toggleLineTop:this.mobileNavToggleLineTop,toggleLineMiddle:this.mobileNavToggleLineMiddle,toggleLineBottom:this.mobileNavToggleLineBottom,userCard:null==(e=this.coreNavList)?void 0:e.querySelector(".core-nav-user-card"),userLinks:this.coreNavUserList?[...this.coreNavUserList.querySelectorAll("li")]:[],shareWorkCta:null==(t=this.coreNavUserContainer)?void 0:t.querySelector("a.btn-core-add-project"),guestRail:(null==(i=this.navbarAuthRoot)?void 0:i.classList.contains("is-navbar-auth-guest"))?this.navbarAuthRoot:null,guestRailItems:this.navbarAuthRoot?[this.navbarAuthRoot.querySelector(".sign-up"),this.navbarAuthRoot.querySelector(".sign-in"),this.navbarAuthRoot.querySelector(".core-nav-guest-extra")].filter(Boolean):[]}}killMobileNavAnimation(){this.mobileNavCloseTween&&(this.mobileNavCloseTween.kill(),this.mobileNavCloseTween=null),this.settleMobileNavClose(),this.mobileNavTl?(this.mobileNavTl.kill(),this.mobileNavTl=null,this.mobileNavToggleTl&&(this.mobileNavToggleTl.kill(),this.mobileNavToggleTl=null)):this.mobileNavToggleTl&&(this.mobileNavToggleTl.kill(),this.mobileNavToggleTl=null)}clearMobileNavInlineState(){const e=this.getMobileNavAnimationTargets(),t=[e.panel,e.panelBg,...e.primaryItems,e.accountBg,e.accountDivider,e.toggleLineTop,e.toggleLineMiddle,e.toggleLineBottom,e.userCard,...e.userLinks,e.shareWorkCta,e.guestRail,...e.guestRailItems].filter(Boolean);R.killTweensOf(t),R.set(t,{clearProps:"opacity,visibility,transform,transformOrigin,pointerEvents,x,y,scale,scaleX,scaleY,rotation"})}resetMobileNavForDesktop(){var e;this.killMobileNavAnimation(),c.root.classList.remove("is-nav-open","is-nav-closing"),null==(e=this.btnMobileNav)||e.setAttribute("aria-expanded","false"),this.unlockMobileNavScroll(),this.clearMobileNavInlineState(),this.settleMobileNavClose()}handleMobileNavViewportChange(e){if(e.matches)return this.unbindPrimaryNavLinkRoll(),this.unbindShareWorkCta(),this.unbindUserMenu(),void this.setMobileNavInstantState(!1);this.resetMobileNavForDesktop(),this.bindPrimaryNavLinkRoll(),this.bindShareWorkCta(),this.bindUserMenu()}setMobileNavInstantState(e,t={}){const{includeToggleIcon:i=!0}=t,o=this.getMobileNavAnimationTargets(),r=[o.panel,o.panelBg,...o.primaryItems,o.accountBg,o.accountDivider,o.userCard,...o.userLinks,o.shareWorkCta,o.guestRail,...o.guestRailItems].filter(Boolean);i&&r.push(...[o.toggleLineTop,o.toggleLineMiddle,o.toggleLineBottom].filter(Boolean)),R.killTweensOf(r),o.panel&&R.set(o.panel,{autoAlpha:e?1:0,scale:e?1:.97,pointerEvents:e?"auto":"none",transformOrigin:"center top"}),o.panelBg&&R.set(o.panelBg,{autoAlpha:e?1:0,scaleY:e?1:0,transformOrigin:"center top"}),R.set(o.primaryItems,{autoAlpha:e?1:0,y:e?0:-10}
30),o.accountBg&&R.set(o.accountBg,{autoAlpha:e?1:0}),o.accountDivider&&R.set(o.accountDivider,{autoAlpha:e?1:0,scaleX:e?1:0,transformOrigin:"center center"}),i&&o.toggleLineTop&&R.set(o.toggleLineTop,{autoAlpha:1,rotation:e?45:0,scaleX:1,transformOrigin:"center center",x:0,y:e?0:-3.5}),i&&o.toggleLineMiddle&&R.set(o.toggleLineMiddle,{autoAlpha:0,rotation:0,scaleX:0,x:0,y:0}),i&&o.toggleLineBottom&&R.set(o.toggleLineBottom,{autoAlpha:1,rotation:e?-45:0,scaleX:e?1:.7,transformOrigin:"center center",x:e?0:-2.85,y:e?0:vr}),o.userCard&&R.set(o.userCard,{autoAlpha:e?1:0,y:e?0:12}),R.set(o.userLinks,{autoAlpha:e?1:0,y:e?0:10}),o.shareWorkCta&&R.set(o.shareWorkCta,{autoAlpha:e?1:0,scale:e?1:.94,y:e?0:12}),o.guestRailItems.length&&R.set(o.guestRailItems,{clearProps:"opacity,visibility,transform,x,y"}),o.guestRail&&(R.set(o.guestRail,{clearProps:"x"}),R.set(o.guestRail,{autoAlpha:e?1:0,y:e?0:8}))}createMobileNavTimeline(){if(this.mobileNavTl)return this.mobileNavTl;if(!this.isMobileNavViewport()||c.isReducedMotion)return null;const e=this.getMobileNavAnimationTargets();return e.panel?(this.setMobileNavInstantState(!1),this.mobileNavTl=R.timeline({paused:!0,defaults:{ease:"power2.out",easeReverse:!0},onStart:()=>{R.set(e.panel,{pointerEvents:"auto"})},onReverseComplete:this.onMobileNavReverseComplete}),this.mobileNavTl.to(e.panel,{autoAlpha:1,scale:1,duration:.18,ease:"power2.out",easeReverse:!0},0),e.panelBg&&this.mobileNavTl.to(e.panelBg,{autoAlpha:1,scaleY:1,duration:.52,ease:"power3.out",easeReverse:"power2.in"},0),e.primaryRows.length&&e.primaryRows.forEach(((e,t)=>{this.mobileNavTl.to(e,{autoAlpha:1,y:0,duration:.32,ease:"power2.out",easeReverse:!0},.12+.06*t)})),e.accountDivider&&this.mobileNavTl.to(e.accountDivider,{autoAlpha:1,scaleX:1,duration:.26,ease:"power2.out",easeReverse:!0},.26),e.accountBg&&this.mobileNavTl.to(e.accountBg,{autoAlpha:1,duration:.28,ease:"power2.out",easeReverse:!0},.28),e.userCard&&this.mobileNavTl.to(e.userCard,{autoAlpha:1,x:0,y:0,duration:.32,ease:"power2.out",easeReverse:!0},.36),e.userLinks.length&&this.mobileNavTl.to(e.userLinks,{autoAlpha:1,y:0,duration:.28,ease:"power2.out",easeReverse:!0,stagger:.035},.43),e.shareWorkCta&&this.mobileNavTl.to(e.shareWorkCta,{autoAlpha:1,scale:1,y:0,duration:.32,ease:"power2.out",easeReverse:!0},.54),e.guestRail&&this.mobileNavTl.to(e.guestRail,{autoAlpha:1,y:0,duration:.42,ease:"power2.out",easeReverse:!0},.34),this.mobileNavTl):null}playMobileNavToggleIcon(e){if(c.isReducedMotion)return void this.setMobileNavInstantState(e);const t=this.getMobileNavAnimationTargets(),i=[t.toggleLineTop,t.toggleLineBottom].filter(Boolean);if(2===i.length){if(this.mobileNavToggleTl&&this.mobileNavToggleTl.kill(),R.killTweensOf(i),this.mobileNavToggleTl=R.timeline({defaults:{ease:"power3.inOut"}}),e)return this.mobileNavToggleTl.to(t.toggleLineTop,{y:0,rotation:45,duration:.22,ease:"power3.inOut"},0),void this.mobileNavToggleTl.to(t.toggleLineBottom,{x:0,y:0,rotation:-45,scaleX:1,transformOrigin:"center center",duration:.22,ease:"power3.inOut"},0);this.mobileNavToggleTl.to(t.toggleLineTop,{rotation:0,y:-3.5,transformOrigin:"center center",duration:.22,ease:"power3.inOut"},0),this.mobileNavToggleTl.to(t.toggleLineBottom,{rotation:0,x:-2.85,y:vr,scaleX:.7,transformOrigin:"center center",duration:.22,ease:"power3.inOut"},0)}}onMobileNavReverseComplete(){var e;c.root.classList.remove("is-nav-open"),null==(e=this.btnMobileNav)||e.setAttribute("aria-expanded","false"),this.unlockMobileNavScroll(),this.setMobileNavInstantState(!1,{includeToggleIcon:!1}),this.settleMobileNavClose()}finalizeMobileNavClose(){var e;this.mobileNavCloseTween=null,c.root.classList.remove("is-nav-open","is-nav-closing"),null==(e=this.btnMobileNav)||e.setAttribute("aria-expanded","false"),this.unlockMobileNavScroll(),this.setMobileNavInstantState(!1,{includeToggleIcon:!1}),this.repaintFallbackHeaderGlass(),this.settleMobileNavClose()}repaintFallbackHeaderGlass(){var e;c.root.hasAttribute("data-core-header-fixed")&&(null==(e=c.coreHeader)?void 0:e.hasAttribute("data-header-visible"))&&window.requestAnimationFrame((()=>{const e=c.body.querySelector(".core-header .header-backdrop");if(!e)return;const t=e.style.transform;e.style.transform="translateZ(0) scale(1.0001)",e.getBoundingClientRect(),window.requestAnimationFrame((()=>{e.style.transform=t}))}))}canMembershipsCtaShine(){return window.matchMedia("(hover: hover) and (pointer: fine)").matches&&!c.isReducedMotion}membershipsCtaMouseOver(e){if(!this.canMembershipsCtaShine())return;const t=e.target.closest("a.memberships-cta");t&&this.coreNav.contains(t)&&(e.relatedTarget&&t.contains(e.relatedTarget)||this.startMembershipsCtaShine(t))}membershipsCtaFocusIn(e){if(!this.canMembershipsCtaShine())return;const t=e.target.closest("a.memberships-cta");t&&this.coreNav.contains(t)&&this.startMembershipsCtaShine(t)}startMembershipsCtaShine(e){e.classList.contains("is-memberships-cta-shining")||e.classList.add("is-memberships-cta-shining")}membershipsCtaShineEnd(e){if("memberships-cta-shine"!==e.animationName)return;const t=e.target.closest("a.memberships-cta");t&&t.classList.remove("is-memberships-cta-shining")}lockMobileNavScroll(){this.isMobileNavViewport()&&(this.mobileNavScrollX=window.scrollX,this.mobileNavScrollY=window.scrollY,this._mobileNavScrollLock=!0)}unlockMobileNavScroll(){if(!this._mobileNavScrollLock)return;const e=this.mobileNavScrollX,t=this.mobileNavScrollY;this._mobileNavScrollLock=null,window.scrollTo({top:t,left:e,behavior:"auto"})}onDocumentKeydown(e){"Escape"===e.key&&this.closeMobileNav()}beginMobileNavClosePromise(){return this.mobileNavClosePromise||(this.mobileNavClosePromise=new Promise((e=>{this.mobileNavCloseResolve=e}))),this.mobileNavClosePromise}settleMobileNavClose(){const e=this.mobileNavCloseResolve;this.mobileNavCloseResolve=null,this.mobileNavClosePromise=null,e&&e()}whenMobileNavClosed(){return this.mobileNavClosePromise||Promise.resolve()}closeMobileNav(){var e,t;if(!c.root.classList.contains("is-nav-open"))return Promise.resolve();if(c.root.classList.contains("is-nav-closing"))return this.mobileNavClosePromise||Promise.resolve();const i=this.beginMobileNavClosePromise();if(!this.isMobileNavViewport()||c.isReducedMotion)return c.root.classList.remove("is-nav-open","is-nav-closing"),null==(e=this.btnMobileNav)||e.setAttribute("aria-expanded","fal
30se"),this.unlockMobileNavScroll(),this.setMobileNavInstantState(!1),this.settleMobileNavClose(),i;this.mobileNavTl&&(this.mobileNavTl.kill(),this.mobileNavTl=null),this.playMobileNavToggleIcon(!1);const o=this.getMobileNavAnimationTargets();return o.panel?(c.root.classList.remove("is-nav-open"),c.root.classList.add("is-nav-closing"),this.mobileNavCloseTween&&this.mobileNavCloseTween.kill(),this.mobileNavCloseTween=R.timeline({onComplete:this.finalizeMobileNavClose}),this.mobileNavCloseTween.to(o.panel,{autoAlpha:0,scale:.94,transformOrigin:"center top",duration:.2,ease:"power2.in"},0),o.panelBg&&this.mobileNavCloseTween.to(o.panelBg,{autoAlpha:0,duration:.28,ease:"power2.out"},.12),i):(c.root.classList.remove("is-nav-open","is-nav-closing"),null==(t=this.btnMobileNav)||t.setAttribute("aria-expanded","false"),this.unlockMobileNavScroll(),this.setMobileNavInstantState(!1),this.settleMobileNavClose(),i)}openMobileNav(){var e;if(c.root.classList.contains("is-nav-closing")&&(this.mobileNavCloseTween&&(this.mobileNavCloseTween.kill(),this.mobileNavCloseTween=null),this.settleMobileNavClose(),c.root.classList.remove("is-nav-closing"),c.root.classList.add("is-nav-open")),c.root.classList.contains("is-nav-open")){const e=this.createMobileNavTimeline();return e&&e.timeScale(1).play(),void this.playMobileNavToggleIcon(!0)}if(c.root.classList.add("is-nav-open"),this.lockMobileNavScroll(),null==(e=this.btnMobileNav)||e.setAttribute("aria-expanded","true"),!this.isMobileNavViewport()||c.isReducedMotion)return void this.setMobileNavInstantState(!0);const t=this.createMobileNavTimeline();t?(this.playMobileNavToggleIcon(!0),t.timeScale(1).play()):this.setMobileNavInstantState(!0)}isSamePageLink(e){return e.protocol===window.location.protocol&&e.host===window.location.host&&e.pathname===window.location.pathname&&e.search===window.location.search}scrollWindowToTop(){window.scrollTo({top:0,left:0,behavior:c.isReducedMotion?"auto":"smooth"})}onSamePageNavLinkCapture(e){if(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;const t=e.target.closest("a[href]");if(!t||!this.coreNav.contains(t))return;if(t.target&&"_self"!==t.target)return;if(t.hash&&"#"!==t.hash)return;if(!this.isSamePageLink(t))return;e.preventDefault(),e.stopImmediatePropagation();c.root.classList.contains("is-nav-open")||c.root.classList.contains("is-nav-closing")?this.closeMobileNav().then(this.scrollWindowToTop):(this.closeUserMenu(),this.scrollWindowToTop())}toggleMobileNav(){const e=c.root.classList.contains("is-nav-closing");!c.root.classList.contains("is-nav-open")||e?this.openMobileNav():this.closeMobileNav()}}vt(),gt();const fr=Object.assign({
30"./plugins/pjax/renderers/account-settings-business-renderer.js":()=>C((()=>import("./account-settings-business-renderer-DQJ13V4Z.js")),__vite__mapDeps([15,16,3,4,17,7,18,5,6,19])),
30"./plugins/pjax/renderers/account-settings-renderer.js":()=>C((()=>import("./account-settings-renderer-CFHW8Jb6.js")),__vite__mapDeps([20,16,3,4,17,7,18,5,6,21])),
30"./plugins/pjax/renderers/article-renderer.js":()=>C((()=>import("./article-renderer-N9wvx6g6.js")),__vite__mapDeps([22,16,3,4,17,7,18,5,6,23,24,25,26,1,27])),
30"./plugins/pjax/renderers/articles-listing-renderer.js":()=>C((()=>import("./articles-listing-renderer-B0QbAm8v.js")),__vite__mapDeps([28,16,3,4,17,7,18,5,6,29,26])),
30"./plugins/pjax/renderers/bento-renderer.js":()=>C((()=>import("./bento-renderer-CzP9pqFs.js")),__vite__mapDeps([30,16,3,4,17,7,18,5,6,31,32,33,34,35,24,36,37,38,13,14,39,40,0,41])),
30"./plugins/pjax/renderers/bento-social-renderer.js":()=>C((()=>import("./bento-social-renderer-CGA_kPKo.js")),__vite__mapDeps([42,16,3,4,17,7,18,5,6,2,8,9,10,11,12,13,14,0,1])),
30"./plugins/pjax/renderers/brand-renderer.js":()=>C((()=>import("./brand-renderer-CAxLU20A.js")),__vite__mapDeps([43,16,3,4,17,7,18,5,6,32])),
30"./plugins/pjax/renderers/business-sign-up-renderer.js":()=>C((()=>import("./business-sign-up-renderer-BvBRoVC1.js")),__vite__mapDeps([44,16,3,4,17,7,18,5,6,45,46])),
30"./plugins/pjax/renderers/default-renderer.js":()=>C((()=>import("./default-renderer-BZKN5ad1.js").then((e=>e.b))),__vite__mapDeps([16,3,4,17,7,18,5,6])),
30"./plugins/pjax/renderers/directory-renderer.js":()=>C((()=>import("./directory-renderer-CF8fOdct.js")),__vite__mapDeps([47,16,3,4,17,7,18,5,6,40,48,49,37,50,51])),
30"./plugins/pjax/renderers/edit-portfolio-renderer.js":()=>C((()=>import("./edit-portfolio-renderer-DXT3KJON.js")),__vite__mapDeps([52,16,3,4,17,7,18,5,6,14,53,54,12,10,11,48,39,32,55,56,57,58,51])),
30"./plugins/pjax/renderers/edit-profile-renderer.js":()=>C((()=>import("./edit-profile-renderer-BuKHbQ9u.js")),__vite__mapDeps([59,16,3,4,17,7,18,5,6,51])),
30"./plugins/pjax/renderers/forgot-password-renderer.js":()=>C((()=>import("./forgot-password-renderer-B5u6II2k.js")),__vite__mapDeps([60,16,3,4,17,7,18,5,6,45,61])),
30"./plugins/pjax/renderers/gallery-renderer.js":()=>C((()=>import("./gallery-renderer-BsR5BqNr.js")),__vite__mapDeps([62,16,3,4,17,7,18,5,6,40,48,49,37,38,36,63,51])),
30"./plugins/pjax/renderers/gallery-review-renderer.js":()=>C((()=>import("./gallery-review-renderer-BK8DXVPy.js")),__vite__mapDeps([64,16,3,4,17,7,18,5,6,38,63])),
30"./plugins/pjax/renderers/home-renderer.js":()=>C((()=>import("./home-renderer-C1u7KAbf.js")),__vite__mapDeps([65,16,3,4,17,7,18,5,6,34,32,66,1,27])),
30"./plugins/pjax/renderers/interview-qa-renderer.js":()=>C((()=>import("./interview-qa-renderer-Db7KkIWU.js")),__vite__mapDeps([67,16,3,4,17,7,18,5,6,68,26,1,27])),
30"./plugins/pjax/renderers/interview-renderer.js":()=>C((()=>import("./interview-renderer-B28uRPXm.js")),__vite__mapDeps([69,16,3,4,17,7,18,5,6,23,24,70,26,1,27])),
30"./plugins/pjax/renderers/job-listing-renderer.js":()=>C((()=>import("./job-listing-renderer-B0ghFFg_.js")),__vite__mapDeps([71,16,3,4,17,7,18,5,6,48,49,72,51])),
30"./plugins/pjax/renderers/job-post-renderer.js":()=>C((()=>import("./job-post-renderer-CvcR2HN2.js")),__vite__mapDeps([73,16,3,4,17,7,18,5,6])),
30"./plugins/pjax/renderers/job-post-submission-renderer.js":()=>C((()=>import("./job-post-submission-renderer-CaZkfU3V.js")),__vite__mapDeps([74,16,3,4,17,7,18,5,6,75])),
30"./plugins/pjax/renderers/login-renderer.js":()=>C((()=>import("./login-renderer-yQ620Aus.js")),__vite__mapDeps([76,16,3,4,17,7,18,5,6,45,77])),
30"./plugins/pjax/renderers/manage-portfolio-renderer.js":()=>C((()=>import("./manage-portfolio-renderer-DcZqXvcG.js")),__vite__mapDeps([78,16,3,4,17,7,18,5,6,79])),
30"./plugins/pjax/renderers/manage-team-renderer.js":()=>C((()=>import("./manage-team-renderer-ilO5vR7y.js")),__vite__mapDeps([80,16,3,4,17,7,18,5,6,9,48,39,32,81,51])),
30"./plugins/pjax/renderers/membership-renderer.js":()=>C((()=>import("./membership-renderer-Cxlm_Brc.js")),__vite__mapDeps([82,16,3,4,17,7,18,5,6,83])),
30"./plugins/pjax/renderers/notifications-renderer.js":()=>C((()=>import("./notifications-renderer-_u833I6-.js")),__vite__mapDeps([84,16,3,4,17,7,18,5,6,53,85])),
30"./plugins/pjax/renderers/page-error-renderer.js":()=>C((()=>import("./page-error-renderer-7qmzYNm_.js")),__vite__mapDeps([86,16,3,4,17,7,18,5,6])),
30"./plugins/pjax/renderers/portfolio-renderer.js":()=>C((()=>import("./portfolio-renderer-BXTHD5iR.js")),__vite__mapDeps([87,3,4,16,17,7,18,5,6,35,24,36,37,38,56,57,58,1])),
30"./plugins/pjax/renderers/pricing-renderer.js":()=>C((()=>import("./pricing-renderer-C-XiE3J-.js")),__vite__mapDeps([88,16,3,4,17,7,18,5,6,89])),
30"./plugins/pjax/renderers/profile-renderer.js":()=>C((()=>import("./profile-renderer-Bgekj5gI.js")),__vite__mapDeps([90,16,3,4,17,7,18,5,6,24,36,37,38,8,9,10,11,12,33,34,91,41,1,27])),
30"./plugins/pjax/renderers/sign-up-renderer.js":()=>C((()=>import("./sign-up-renderer-CwnktU5D.js")),__vite__mapDeps([92,16,3,4,17,7,18,5,6,45,93])),
30"./plugins/pjax/renderers/social-post-renderer.js":()=>C((()=>import("./social-post-renderer-Dz0iwImq.js")),__vite__mapDeps([94,16,3,4,17,7,18,5,6,8,9,10,11,12,24,95,1,27])),
30"./plugins/pjax/renderers/social-renderer.js":()=>C((()=>import("./social-renderer-CEcTcIMb.js")),__vite__mapDeps([96,16,3,4,17,7,18,5,6,8,9,10,11,12,95,1,27])),
30"./plugins/pjax/renderers/tutorial-renderer.js":()=>C((()=>import("./tutorial-renderer-Cjm_TVbX.js")),__vite__mapDeps([97,16,3,4,17,7,18,5,6,23,24,98,26,1,27])),
30"./plugins/pjax/renderers/video-posters-audit-renderer.js":()=>C((()=>import("./video-posters-audit-renderer-DvW-Y27h.js")),__vite__mapDeps([99,16,3,4,17,7,18,5,6,12]))
30}),yr=e=>fr[`./plugins/pjax/renderers/${e}`],br={default:yr("default-renderer.js"),pricing:yr("pricing-renderer.js"),login:yr("login-renderer.js"),forgotPassword:yr("forgot-password-renderer.js"),signUp:yr("sign-up-renderer.js"),businessSignUp:yr("business-sign-up-renderer.js"),accountSettings:yr("account-settings-renderer.js"),accountSettingsBusiness:yr("account-settings-business-renderer.js"),notifications:yr("notifications-renderer.js"),home:yr("home-renderer.js"),social:yr("social-renderer.js"),socialPost:yr("social-post-renderer.js"),gallery:yr("gallery-renderer.js"),galleryReview:yr("gallery-review-renderer.js"),directory:yr("directory-renderer.js"),articlesListing:yr("articles-listing-renderer.js"),article:yr("article-renderer.js"),tutorial:yr("tutorial-renderer.js"),interview:yr("interview-renderer.js"),interviewQA:yr("interview-qa-renderer.js"),jobListing:yr("job-listing-renderer.js"),jobPost:yr("job-post-renderer.js"),jobPostSubmission:yr("job-post-submission-renderer.js"),profile:yr("profile-renderer.js"),bento:yr("bento-renderer.js"),bentoSocial:yr("bento-social-renderer.js"),brand:yr("brand-renderer.js"),editProfile:yr("edit-profile-renderer.js"),portfolio:yr("portfolio-renderer.js"),editPortfolio:yr("edit-portfolio-renderer.js"),manageTeam:yr("manage-team-renderer.js"),managePortfolio:yr("manage-portfolio-renderer.js"),membership:yr("membership-renderer.js"),videoPostersAudit:yr("video-posters-audit-renderer.js"),pageError:yr("page-error-renderer.js")};R.registerPlugin(Q);new class{constructor(){this.setup()}setupInputModality(){const e=()=>{c.body.classList.remove("is-using-keyboard")};window.addEventListener("keydown",(e=>{e.metaKey||e.ctrlKey||e.altKey||c.body.classList.add("is-using-keyboard")}),!0),window.addEventListener("pointerdown",e,!0),window.addEventListener("mousedown",e,!0),window.addEventListener("touchstart",e,!0)}scheduleDeferredPjaxPrefetch(e){if(!X)return;if(!e||"function"!=typeof e._prefetchURL)return;if("selective"===Z)return void function(e){if(!(null==e?void 0:e._prefetchURL))return()=>{};if(me.has(e))return me.get(e);const t=[...pe,...ve];let i,o,r,n=!0,s="complete"===document.readyState,a=!1,l=0,d=0,c=0;const u=()=>{var e,t;return(null==(e=navigator.connection)?void 0:e.saveData)||/^(slow-)?2g$/.test((null==(t=navigator.connection)?void 0:t.effectiveType)||"")||matchMedia("(prefers-reduced-data: reduce)").matches},h=()=>{d=Date.now()},m=()=>{var e;clearTimeout(i),null!=o&&(null==(e=window.cancelIdleCallback)||e.call(window,o)),i=o=null},p=()=>{n=!1,m(),clearTimeout(r),window.removeEventListener("load",f),window.removeEventListener("pagehide",p),document.removeEventListener("visibilitychange",y);for(const e of["pointerdown","keydown","wheel"])document.removeEventListener(e,h)},v=e=>{n&&s&&!a&&(m(),c=Math.max(c,Date.now()+e),i=window.setTimeout((()=>{i=null,"requestIdleCallback"in window?o=window.requestIdleCallback((()=>{o=null,g()})):g()}),Math.max(0,c-Date.now())))},g=async()=>{var i;if(!n||a)return;if(u()||!1===navigator.onLine||Date.now()<(e._prefetchPausedUntil||0))return p();if("hidden"===document.visibilityState)return;if(e.transitioning||(null==(i=e.prefetching)?void 0:i.size)||Date.now()-d<1e3)return void v(1e3);const o=new URL(t[l],location.origin).href;l++,a=!0;try{await e._prefetchURL(o,{priority:l>pe.length?"low":"auto"})}catch(r){}a=!1,n&&(l===t.length||Date.now()<(e._prefetchPausedUntil||0)?p():v(l===pe.length?5e3:1e3))},f=()=>{s=!0,r=window.setTimeout(p,9e4),v(3e3)},y=()=>{"hidden"===document.visibilityState?m():v(1e3)};if(me.set(e,p),u())return p(),p;for(const b of["pointerdown","keydown","wheel"])document.addEventListener(b,h,{passive:!0});document.addEventListener("visibilitychange",y),window.addEventListener("pagehide",p,{once:!0}),s?f():window.addEventListener("load",f,{once:!0})}(e);const t=["/gallery","/directory"],i=()=>{var i;(null==(i=navigator.connection)?void 0:i.saveData)||matchMedia("(prefers-reduced-data: reduce)").matches||t.forEach((t=>{const i=()=>e._prefetchURL(new URL(t,window.location.href).href);"requestIdleCallback"in window?window.requestIdleCallback(i,{timeout:4e3}):window.setTimeout(i,0)}))},o=()=>{window.setTimeout(i,3e3)};"complete"===document.readyState?o():window.addEventListener("load",o,{once:!0})}setup(){J(),function(){const e=document.documentElement;if(e.classList.contains(ro))return;if(window.matchMedia("(hover: none), (pointer: coarse)").matches)return void e.classList.add(ro);window.addEventListener("pointermove",(()=>{e.classList.add(ro)}),{once:!0,passive:!0,capture:!0})}(),ee(),te(),be.addClasses(c.body),Object.assign(c,be.getInfos()),W.syncFromDom(),this.setupInputModality(),!c.isDesktop||c.isFirefox||c.isReducedMotion||(Object.assign(c,{isSmooth:!0}),c.body.classList.add("is-smooth")),R.config({nullTargetWarn:!1}),this.init()}init(){var e;const t=this;!function(e=document){const t=e.documentElement,i=()=>{for(const[i,o]of no){const r=Boolean(e.querySelector(i));t.hasAttribute(o)!==r&&t.toggleAttribute(o,r)}},o=e=>1===e.nodeType&&(e.matches(so)||e.querySelector(so)),r=new MutationObserver((e=>{e.some((e=>"attributes"===e.type?e.target.matches("dialog.okay-dialog"):[...e.addedNodes,...e.removedNodes].some(o)))&&i()})),n=o=>{var r,n;if(!(null==(n=(r=o.target).matches)?void 0:n.call(r,"dialog.okay-dialog")))return;const s=[...e.querySelectorAll("dialog.okay-dialog[open]")].some((e=>e!==o.target));t.toggleAttribute("data-okay-dialog-open","open"===o.newState||s),queueMicrotask(i)};i(),e.addEventListener("beforetoggle",n,!0),r.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open"]})}(),ue().catch((()=>{})),he(),"scrollRestoration"in history&&(history.scrollRestoration="manual"),this.coreHeader=new Fo,c.coreHeaderController=this.coreHeader,this.headerEnterReveal=new lr,this.headerEnterReveal.prepare(),this.headerEnterReveal.play(),this.refreshHeaderLogoLetters(),this.refreshFooterLogoLetters(),window.addEventListener("load",(()=>{this.refreshHeaderLogoLetters(),this.refreshFooterLogoLetters()}),{once:!0}),null==(e=c.coreHeader)||e.addEventListener("pointerover",(e=>{var t,i,o,r;"touch"!==e.pointerType&&(null==(i=null==(t=e.target)?void 0:t.closest)?void 0:i.call(t,".core-logo-link"))&&!c.headerLogoLetters&&
30(this.refreshHeaderLogoLetters(),null==(r=null==(o=c.headerLogoLetters)?void 0:o.onPointerEnter)||r.call(o,e))})),this.coreNav=new gr,c.coreNav=this.coreNav,ie(),document.documentElement.dataset.prefetchMode=Z,this.initPjax(),Y().then((()=>n())),/(?:^|;\s*)okaydev_signup_pending=/.test(document.cookie)&&Ke({force:!0}),document.addEventListener("freeform-ajax-success",(()=>{/(?:^|;\s*)okaydev_signup_pending=/.test(document.cookie)&&Ke({force:!0})})),window.addEventListener("servd.dynamicloaded",(()=>n())),oe({htmx:E,refreshNavbarAuth:Ke}),document.addEventListener("DOMContentLoaded",(()=>{t.siteLoaded()}));if(window.addEventListener("load",(()=>{requestAnimationFrame((()=>{b(document.querySelector(".core-nav"))?window.setTimeout((()=>{document.querySelector("#okaydev-navbar-auth-root .navbar-auth-placeholder")&&Ye()}),w):Ye(),ut()}))}),{once:!0}),window.addEventListener("servd.dynamicloaded",(e=>{requestAnimationFrame((()=>{Ye(),ut()}))})),window.addEventListener("popstate",(()=>{c.isPopstate=!0;const e=window.location.hash.substring(1);if(e){const t=`[data-scroll-to-name='${e}']`,i=c.body.querySelector(t);i&&i.scrollIntoView({behavior:"smooth"})}Q.refresh()})),c.firstLoad){const e="background: #6d42ed; font-weight: 700; font-size: 11px; padding: 5px 0 3px;";console.log("%c OkayDev — A creative community for designers, developers, and builders. %c\n%cby Eric Van Holtz — https://okaydev.co/u/eric",`${e} border-radius: 12px;`,"","font-size: 10px; line-height: 1.6; padding-top: 6px;")}}refreshHeaderLogoLetters({retry:e=0}={}){var t;const i=null==(t=c.coreHeader)?void 0:t.querySelector(".logo-name");i&&"none"!==getComputedStyle(i).display&&i.getClientRects().length>0?c.headerLogoLetters?this.headerLogoLetters=c.headerLogoLetters:(this.headerLogoLetters=new re,!c.headerLogoLetters&&e<240&&requestAnimationFrame((()=>this.refreshHeaderLogoLetters({retry:e+1}
30)))):e<240&&requestAnimationFrame((()=>this.refreshHeaderLogoLetters({retry:e+1})))}refreshFooterLogoLetters(){var e;const t=null==(e=c.coreFooter)?void 0:e.querySelector("[data-bento-made-on-logo]"),i=null==t?void 0:t.querySelector(".logo-okaydev");t instanceof HTMLElement&&i instanceof SVGElement&&"hidden"!==getComputedStyle(c.coreFooter).visibility&&t.getClientRects().length>0&&(c.footerLogoLetters instanceof re||(this.footerLogoLetters=new re({root:i,hoverTrigger:t,touchTrigger:t,storeKey:"footerLogoLetters",mode:"singlePop"})))}siteLoaded(){ue().catch((()=>{})),c.body.classList.add("is-loaded"),ne.emit("siteLoaded")}initPjax(){var e;window.addEventListener("popstate",qe,!0),se(),Bi(),Zi(),c.pjax=new Ae({prefetchMode:Z,shouldPrefetchLink:e=>!De(e.href,window.location.href)&&!ae(e),renderers:br,transitions:{default:Ro},manualScrollRestoration:!1,onLeave:[oo]});const t=c.pjax,i=()=>{t._eventMask&&(t._eventMask.hidden=!t.transitioning)};null==(e=t._eventMask)||e.setAttribute("data-pjax-event-mask",""),i(),function(e){const t=e.properties.renderer,i=e.beforeFetch.bind(e);let o=null;e.beforeFetch=function(){return this.From?i():(o||(o=t.then((()=>i()))),o)}}(t),ft||(ft=!0,document.addEventListener("click",(e=>{var t,i;const o=null==(i=(t=e.target).closest)?void 0:i.call(t,"button[data-okay-pick-project], a[data-okay-pick-project]");if(!o)return;e.preventDefault(),e.stopImmediatePropagation();const r=++yt;C((()=>import("./OkayPickCertificateDialog-BuVHOjf3.js").then((e=>e.O))),__vite__mapDeps([100,3,4,54,33,34,101])).then((({default:e})=>{r===yt&&o.isConnected&&e.open(o)})).catch((()=>{o.setAttribute("title","Certificate could not load. Please try again.")}))}),!0)),le(),Pi(),this.scheduleDeferredPjaxPrefetch(t),t.detach(t.links),t.links=[];const o=t.navigate.bind(t);let r=0;const s=()=>{var e,t,i,o;c.root.classList.remove("is-pjax-transition"),c.pjaxOutgoingViewRect=null,c.pjaxTargetPage=null;try{null==(t=null==(e=c.coreHeaderController)?void 0:e.reset)||t.call(e),null==(o=null==(i=c.headerLogoLetters)?void 0:i.cancelInteraction)||o.call(i,{settle:!0,suspendUntilPointerExit:!0})}catch{}requestAnimationFrame((()=>{this.refreshHeaderLogoLetters(),this.refreshFooterLogoLetters()}))},a=()=>{if(We())return;c.root.classList.add("is-pjax-transition");const e=++r;window.setTimeout((()=>{e===r&&c.root.classList.contains("is-pjax-transition")&&s()}),1500)},l=e=>{var i,o;if(e===(null==(i=t.location)?void 0:i.href))return c.pjaxOutgoingViewRect=null,void(c.pjaxTargetPage=null);c.pjaxTargetPage=(e=>{const t=new URL(e,window.location.href).pathname.split("/")[1];return t.length>1?t:"home"})(e),a(),function(e,t="http://localhost"){if(!e)return!1;try{const i=new URL(e,t);return/\/bento\/?$/.test(i.pathname)}catch{return!1}}(e,window.location.href)||Be(!1);const r=document.querySelector("[data-router-wrapper]"),n=null==(o=null==r?void 0:r.querySelector)?void 0:o.call(r,":scope > [data-router-view]");if(!(r instanceof HTMLElement&&n instanceof HTMLElement))return void(c.pjaxOutgoingViewRect=null);const s=n.getBoundingClientRect();c.pjaxOutgoingViewRect={top:s.top,left:s.left,width:s.width},r.style.minHeight=`${Math.max(r.offsetHeight,document.documentElement.scrollHeight-r.getBoundingClientRect().top)}px`,Object.assign(n.style,{position:"fixed",top:`${s.top}px`,left:`${s.left}px`,width:`${s.width}px`,zIndex:"1"}),n.setAttribute("data-pjax-outgoing-fixed","")};t.navigate=function(e){var i,r;if(!(e.defaultPrevented||0!==e.button||e.shiftKey||e.altKey||(null==(i=e.currentTarget)?void 0:i.hasAttribute("download")))){if(!e.metaKey&&!e.ctrlKey&&e.currentTarget instanceof HTMLAnchorElement){const i=e.currentTarget;if(De(i.href,window.location.href))return;if(i.closest(".redactor-toolbar, .redactor-dropdown, .redactor-modal, .redactor-overlay, .redactor-air, .redactor-context-toolbar"))return;const o=i.getAttribute("href");if(null!=o&&/^\s*#/.test(o))return void e.preventDefault();if(i.hasAttribute("data-action")&&i.closest(".cc-w, .social-comments"))return void e.preventDefault();if(function(e,t,i){if(!e||!t||!i)return!1;let o,r,n;try{o=new URL(e),r=new URL(t),n=new URL(i)}catch{return!1}return o.origin===r.origin&&o.origin===n.origin&&o.href!==r.href&&o.href===n.href}(i.href,window.location.href,null==(r=t.location)?void 0:r.href))return e.preventDefault(),t.location=t.Helpers.getLocation(window.location.href),l(i.href),void t.redirect(i.href,!1,i);l(i.href)}return o(e)}},t._navigate=t.navigate.bind(t),d(),c.pjax.addEventListener("NAVIGATE_IN",(()=>{document.body.style.removeProperty("cursor"),c.forceServdHydrateNextEnter=!0,c.firstLoad=!1,c.isLoading=!1,c.scrolled=!1,c.scrollBottom=!1}));c.pjax.addEventListener("NAVIGATE_OUT",(()=>{i(),c.isLoading=!0,(()=>{var e,t,i,o,r,n;const s=document.activeElement;s&&"function"==typeof s.closest&&s.closest(".core-nav")&&s.blur(),null==(t=null==(e=c.coreNav)?void 0:e.closeMobileNav)||t.call(e),null==(o=null==(i=c.coreNav)?void 0:i.closeUserMe
30nu)||o.call(i),null==(n=null==(r=c.headerLogoLetters)?void 0:r.cancelInteraction)||n.call(r,{settle:!0,suspendUntilPointerExit:!0}),a()})()})),c.pjax.addEventListener("NAVIGATE_END",(e=>{i(),r+=1,s(),(e=>{var t,i,o;const r=(null==(i=null==(t=null==e?void 0:e.detail)?void 0:t.location)?void 0:i.href)||window.location.href;c.isDev||"function"!=typeof(null==(o=window.fathom)?void 0:o.trackPageview)||window.fathom.trackPageview({url:r})})(e),n(),ue(document.querySelector("[data-router-view]")).catch((()=>{})),de(document).catch((()=>{})),Ke()}));const u=()=>{requestAnimationFrame((()=>{d()}))};"complete"===document.readyState?u():window.addEventListener("load",u,{once:!0})}},Y().then(G);export{We as A,ko as B,er as C,Eo as D,Be as E,Ue as F,eo as G,hr as H,vt as I,gt as J,go as L,je as P,we as R,yo as S,po as T,e as __vite_legacy_guard,Mt as a,At as b,to as c,Xi as d,Ke as e,wt as f,Yi as g,pr as h,Ki as i,Ze as j,Di as k,Ii as l,Oi as m,ji as n,qi as o,Gi as p,To as q,Co as r,mr as s,lt as t,Qi as u,Hi as v,Vi as w,Xe as x,Ao as y,mo as z};

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.