PageSourceSearch

https://creased-web-staging-cqkynjijc-creased-7217fe76.vercel.app/…/static/immutable/chunks/44-cwarpvwtbu.js

js creased-web-staging-cqkynjijc-creased-7217fe76.vercel.app collected 2026-10-03 05:47:47 UTC 43,374 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,99103,e=>{"use strict";var t=e.i(58528);e.s(["signInWithCustomToken",()=>t.ae])},77012,12257,e=>{"use strict";var t=e.i(58528);e.s(["GoogleAuthProvider",()=>t.f],77012),e.s(["OAuthProvider",()=>t.g],12257)},33818,e=>{"use strict";e.s(["queryOptions",0,function(e){return e}])},21482,e=>{"use strict";var t=e.i(69637),r=e.i(92571),n=e.i(69230),i=class extends n.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:n}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:s,isError:o,isRefetchError:u}=i,l=n.fetchMeta?.fetchMore?.direction,c=o&&"forward"===l,d=a&&"forward"===l,h=o&&"backward"===l,m=a&&"backward"===l;return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.hasNextPage)(t,n.data),hasPreviousPage:(0,r.hasPreviousPage)(t,n.data),isFetchNextPageError:c,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:m,isRefetchError:u&&!c&&!h,isRefetching:s&&!d&&!m}}};e.s(["useInfiniteQuery",0,function(e,r){return(0,t.useBaseQuery)(e,i,r)}],21482)},54616,e=>{"use strict";var t=e.i(12598),r=e.i(71645),n=e.i(19273),i=e.i(15823),a=e.i(40143),s=e.i(14272),o=class extends i.Subscribable{#e;#t=void 0;#r;#n;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,n.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,n.hashKey)(t.mutationKey)!==(0,n.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onSubscribe(){1===this.listeners.size&&this.#r&&(this.#r.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#a()}mutate(e,t){return this.#n=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#i(){let e=this.#r?.state??(0,s.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#a(e){a.notifyManager.batch(()=>{if(this.#n&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#n.onSuccess?.(e.data,t,r,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(e.data,null,t,r,n)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#n.onError?.(e.error,t,r,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(void 0,e.error,t,r,n)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};e.s(["useMutation",0,function(e,i){let s=(0,t.useQueryClient)(i),[u]=r.useState(()=>new o(s,e));r.useEffect(()=>{u.setOptions(e)},[u,e]);let l=r.useSyncExternalStore(r.useCallback(e=>u.subscribe(a.notifyManager.batchCalls(e)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c=r.useCallback((...e)=>{u.mutate(e[0],e[1]).catch(n.noop)},[u]);if(l.error&&(0,n.shouldThrowError)(u.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}],54616)},90317,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return l},createAsyncLocalStorage:function(){return u},createSnapshot:function(){return c}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let a=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let o="u">typeof globalThis&&globalThis.AsyncLocalStorage;function u(){return o?new o:new s}function l(e){return o?o.bind(e):s.bind(e)}function c(){return o?o.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).createAsyncLocalStorage)()},63599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(42344)},9885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let n=e.r(32061);function i({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return u}});let n=e.r(43476),i=e.r(74080),a=e.r(63599),s=e.r(9885),o=e.r(43369);function u({moduleIds:e}){if("u">typeof window)return null;let t=a.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let l=(0,o.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,s.encodeURIPath)(e)}${l}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let n=e.r(43476),i=e.r(71645),a=e.r(67585),s=e.r(52157);function o(e){return{default:e&&"default"in e?e.default:e}}let u={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},l=function(e){let t={...u,...e},r=(0,i.lazy)(()=>t.loader().then(o)),l=t.loading;function c(e){let o=l?(0,n.jsx)(l,{isLoading:!0,pastDelay:!0,error:null}):null,u=!t.ssr||!!t.loading,c=u?i.Suspense:i.Fragment,d=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(c,{...u?{fallback:o}:{},children:d})}return c.displayName="LoadableComponent",c}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let n=e.r(55682)._(e.r(69093));function i(e,t){let r={};"function"==typeof e&&(r.loader=e);let i={...r,...t};return(0,n.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},35319,e=>{"use strict";var t=e.i(43476),r=e.i(64492),n=e.i(36767),i=e.i(70703),a=e.i(71645),s=e.i(24733),o=e.i(19071),u=e.i(99870),l=e.i(63940),c=e.i(87662),d=e.i(38869),h=e.i(67426),m=e.i(68447),p=e.i(68886),g=e.i(86643),y=e.i(89479),f=e.i(27281);let w=(0,i.default)(()=>e.A(54715).then(e=>e.PhoneLogin),{loadableGenerated:{modules:[12929]},ssr:!1,loading:()=>(0,t.jsx)(s.UnderlineLoader,{size:"sm",label:"Loading phone sign-in"})}),_=()=>void e.A(22095),v={password:"password","google.com":"google","apple.com":"apple",passkey:"passkey",resume:"session_resume"},b=e=>async t=>{let r=await (0,c.createWebSession)(t);return"ok"===r?(window.location.assign(e),null):"recent_sign_in_required"===r?"For your security, sign in again to continue."
1:"rejected"===r?(await (0,n.signOut)((0,h.firebaseAuth)()).catch(()=>void 0),"This account could not start a web session. Contact Creased support if this keeps happening."):"Creased could not finish signing you in. Check your connection and try again."};e.s(["LoginForm",0,({returnTo:e,notice:n})=>{let{readiness:i,status:C,user:S}=(0,l.useAuth)(),{passkeyOrigin:E}=(0,d.useClientConfig)(),{switchEnabled:P}=(0,o.useRuntimeConfig)({poll:!1}),k=b(e),[T,I]=(0,a.useState)(!1),[A,O]=(0,a.useState)(""),[x,M]=(0,a.useState)(""),[W,R]=(0,a.useState)(!1),[N,j]=(0,a.useState)(null),[q,U]=(0,a.useState)(null),[F,D]=(0,a.useState)(!1),L=(0,a.useRef)(!1),K=(0,a.useRef)(null),Q=(0,a.useRef)(null);(0,a.useEffect)(()=>{"signed-in"===C&&S&&!L.current&&(L.current=!0,O(S.email||""),j("resume"),(0,c.createWebSession)(S).then(t=>{"ok"===t?window.location.assign(e):j(null)}))},[e,C,S]);let $=async(e,t)=>{let r=v[e];U(null),j(e),(0,u.trackAuth)("login","attempted","started",{method:r});try{let e=await t(),n=await k(e.user);n&&((0,u.trackAuth)("login","failed","rejected",{method:r,errorCode:"web_session"}),U(n),j(null))}catch(i){if(j(null),(0,f.isCancelledSignIn)(i)||i?.name==="AbortError")return;let t=i?.code;(0,u.trackAuth)("login","auth/popup-blocked"===t||"PASSKEY_POPUP_BLOCKED"===t?"blocked":"failed","error",{method:r,errorCode:t});let n="passkey"===e?(0,g.passkeyErrorMessage)(i):(0,f.signInErrorMessage)(i);n&&U(n),"password"===e&&Q.current?.focus()}};if("ready"!==i)return(0,t.jsx)(s.Notice,{tone:"error",title:"Sign-in is unavailable",children:"This copy of Creased is not connected to its sign-in service. Try again later."});let Y=null!==N,B=P(y.PHONE_SIGN_IN_SWITCH,!1);return T&&B?(0,t.jsx)(w,{completeSignIn:k,onBack:()=>I(!1)}):(0,t.jsxs)(t.Fragment,{children:[n?(0,t.jsx)(s.Notice,{title:n}):null,q?(0,t.jsx)(s.Notice,{tone:"error",title:q}):null,(0,t.jsxs)("form",{className:"form",onSubmit:e=>{if(e.preventDefault(),!A.trim()||!x){D(!0),U("Enter your email and password."),(!A.trim()?K:Q).current?.focus();return}$("password",()=>(0,f.signInWithPassword)((0,h.firebaseAuth)(),A,x))},noValidate:!0,"data-qa":"login-form",children:[(0,t.jsx)(s.Field,{id:"login-email",label:"Email",type:"email",autoComplete:"username webauthn",inputMode:"email",value:A,error:F&&!A.trim()?"Enter your email.":void 0,onChange:e=>O(e.target.value),disabled:Y,required:!0,ref:K,"data-qa":"login-email"}),(0,t.jsxs)("div",{className:p.default.passwordWrap,children:[(0,t.jsx)(s.Field,{id:"login-password",label:"Password",type:W?"text":"password",autoComplete:"current-password",value:x,error:F&&!x?"Enter your password.":void 0,onChange:e=>M(e.target.value),disabled:Y,required:!0,ref:Q,"data-qa":"login-password"}),(0,t.jsx)("button",{type:"button",className:p.default.passwordToggle,onClick:()=>R(e=>!e),"aria-label":W?"Hide password":"Show password","aria-pressed":W,children:(0,t.jsx)(m.Icon,{name:W?"eyeOff":"eye",size:20})})]}),(0,t.jsx)(r.default,{className:p.default.inlineLink,href:`/forgot-password${A?`?email=${encodeURIComponent(A)}`:""}`,children:"Forgot password?"}),(0,t.jsx)(s.Button,{type:"submit",block:!0,busy:"password"===N||"resume"===N,disabled:Y,"data-qa":"login-submit",children:"resume"===N?"Signing you in…":"Log in"})]}),(0,t.jsx)("div",{className:p.default.divider,children:"or"}),(0,t.jsxs)("div",{className:p.default.providers,children:[(0,t.jsxs)(s.Button,{variant:"secondary",block:!0,busy:"google.com"===N,disabled:Y,onClick:()=>$("google.com",()=>(0,f.signInWithProvider)((0,h.firebaseAuth)(),"google.com")),"data-qa":"login-google",children:[(0,t.jsx)("img",{className:p.default.providerIcon,src:"/brand/google-g.png",alt:"",width:18,height:18}),"Continue with Google"]}),(0,t.jsxs)(s.Button,{variant:"secondary",block:!0,busy:"apple.com"===N,disabled:Y,onClick:()=>$("apple.com",()=>(0,f.signInWithProvider)((0,h.firebaseAuth)(),"apple.com")),"data-qa":"login-apple",children:[(0,t.jsx)("svg",{className:p.default.providerIcon,viewBox:"0 0 24 24","aria-hidden":"true",fill:"currentColor",children:(0,t.jsx)("path",{d:"M16.4 12.6c0-2.4 2-3.6 2.1-3.7-1.2-1.7-3-1.9-3.6-2-1.5-.2-3 .9-3.8.9-.8 0-2-.9-3.3-.9-1.7 0-3.3 1-4.2 2.5-1.8 3.1-.5 7.7 1.3 10.2.9 1.2 1.9 2.6 3.2 2.6 1.3-.1 1.8-.8 3.3-.8 1.5 0 2 .8 3.3.8 1.4 0 2.3-1.3 3.1-2.5 1-1.4 1.4-2.8 1.4-2.9 0 0-2.7-1-2.7-4.2zM14 5.3c.7-.8 1.2-2 1-3.1-1 0-2.2.7-2.9 1.5-.6.7-1.2 1.9-1 3 1.1.1 2.2-.6 2.9-1.4z"})}),"Continue with Apple"]}),(0,t.jsxs)(s.Button,{variant:"secondary",block:!0,busy:"passkey"===N,disabled:Y,onClick:()=>$("passkey",()=>(0,g.signInWithPasskey)((0,h.firebaseAuth)(),E)),"data-qa":"login-passkey",children:[(0,t.jsx)(m.Icon,{name:"key",size:18}),"Sign in with a passkey"]}),B?(0,t.jsxs)(s.Button,{variant:"secondary",block:!0,disabled:Y,onPointerEnter:_,onFocus:_,onClick:()=>{U(null),I(!0)},"data-qa":"login-phone",children:[(0,t.jsx)(m.Icon,{name:"phone",size:18}),"Log in with phone number"]}):null]})]})},"useCompleteSignIn",0,b])},68886,e=>{e.v({beta:"auth-module__SUv9sW__beta",body:"auth-module__SUv9sW__body",codeInput:"auth-module__SUv9sW__codeInput",divider:"auth-module__SUv9sW__divider",footer:"auth-module__SUv9sW__footer",frame:"auth-module__SUv9sW__frame",inlineLink:"auth-module__SUv9sW__inlineLink",otherWays:"auth-module__SUv9sW__otherWays",panel:"auth-module__SUv9sW__panel",panelMark:"auth-module__SUv9sW__panelMark",passwordToggle:"auth-module__SUv9sW__passwordToggle",passwordWrap:"auth-module__SUv9sW__passwordWrap",phoneActions:"auth-module__SUv9sW__phoneActions",phoneActionsStacked:"auth-module__SUv9sW__phoneActionsStacked",phoneError:"auth-module__SUv9sW__phoneError",phoneField:"auth-module__SUv9sW__phoneField",phoneFlow:"auth-module__SUv9sW__phoneFlow",providerIcon:"auth-module__SUv9sW__providerIcon",providers:"auth-module__SUv9sW__providers",recaptcha:"auth-module__SUv9sW__recaptcha",row2:"auth-module__SUv9sW__row2",sentTo:"auth-module__SUv9sW__sentTo",step:"auth-module__SUv9sW__step",stepDone:"auth-module__SUv9sW__stepDone",steps:"auth-module__SUv9sW__steps",story:"auth-module__SUv9sW__story",storyFacts:"auth-module__SUv9sW__storyFacts",storyLead:"auth-module__SUv9sW__storyLead",storyMark:"auth-module__SUv9sW__storyMark",subtitle:"auth-module__SUv9sW__subtitle",textButton:"auth-module__SUv9sW__textButton",title:"auth-module__SUv9sW__title"})},86643,e=>{"use strict";var t=e.i(99103);let r=(e,t)=>Object.assign(Error(e),{code:t}),n=({auth:e,origin:t,mode:n,name:i})=>{if(!t)return Promise.reject(r("Passkeys are unavailable for this environment.","PASSKEY_NOT_CONFIGURED"));let a=crypto.randomUUID(),s=e.currentUser,o=new URLSearchParams({mode:n,state:a,parentOrigin:window.location.origin}),u=window.open(`${t}/passkeys?${o}`,`creased-passkey-${a}`,"popup,width=480,height=640");return u?new Promise((o,l)=>{let c=!1,d=(e,t)=>{c||(c=!0,window.removeEventListener("message",h),window.clearInterval(m),window.clearTimeout(p),u.close(),e?l(e):o(t||{}))},h=async o=>{let l=o.data;if(!c&&o.source===u&&o.origin===t&&l?.type==="creased-passkey"&&l.state===a){if(e.currentUser!==s)return void d(r("Your account changed. Try again.","PASSKEY_ACCOUNT_CHANGED"));if("ready"===l.outcome)try{let o="register"===n?await s?.getIdToken():void 0;if(c)return;if(e.currentUser!==s)return void d(r("Your account changed. Try again.","PASSKEY_ACCOUNT_CHANGED"));if("register"===n&&!o)throw Error("Sign in first");u.postMessage({type:"creased-passkey-start",state:a,token:o,name:i,email:s?.email},t)}catch{d(r("Your session could not be checked. Sign in again.","PASSKEY_SESSION"))}else if("success"===l.outcome){let e=l.result;"authenticate"!==n||"string"==typeof e?.token&&e.token&&"string"==typeof e?.uid?d(null,e):d(r("The passkey response was not val
1id. Try again.","PASSKEY_INVALID_RESPONSE"))}else"cancelled"===l.outcome&&d(new DOMException("Cancelled","AbortError"))}};window.addEventListener("message",h);let m=window.setInterval(()=>{u.closed&&d(new DOMException("Cancelled","AbortError"))},500),p=window.setTimeout(()=>d(r("The passkey prompt expired. Try again.","PASSKEY_TIMEOUT")),3e5)}):Promise.reject(r("Allow popups for Creased, then try again.","PASSKEY_POPUP_BLOCKED"))},i=async(e,i)=>{let a=await n({auth:e,origin:i,mode:"authenticate"});if(e.currentUser&&e.currentUser.uid!==a.uid)throw r("Sign out of the current account before using another passkey.","PASSKEY_ACCOUNT_CHANGED");return(0,t.signInWithCustomToken)(e,a.token)};e.s(["openPasskeyPrompt",0,n,"passkeyErrorMessage",0,e=>e?.name==="AbortError"?"":e?.code?.startsWith("PASSKEY_")&&e.message?e.message:"Passkeys could not finish. Try again or use another sign-in option.","signInWithPasskey",0,i])},89479,e=>{"use strict";var t=e.i(58528),t=t,r=e.i(99103),n=e.i(61238);let i="/api/auth/phone-login",a=/^[2-9](?!11)\d\d[2-9](?!11)\d{6}$/,s=async(e,t,a,s=()=>!0)=>{let o,u=e.currentUser?.uid??null;try{o=await fetch((0,n.buildApiUrl)(i),{method:"POST",headers:{accept:"application/json","content-type":"application/json",...(0,n.defaultRequestHeaders)(i)},body:JSON.stringify({verificationId:t,code:a}),credentials:"omit",cache:"no-store"})}catch{throw new n.ApiError("Offline",0,"NETWORK")}let l=await o.json().catch(()=>null);if(!o.ok)throw new n.ApiError("Phone sign-in failed",o.status,"string"==typeof l?.code?l.code:null,l);if("string"!=typeof l?.token||!l.token)throw new n.ApiError("Phone sign-in failed",503,"PHONE_AUTH_UNAVAILABLE",l);if(!s())throw new n.ApiError("Phone sign-in was abandoned",0,"PHONE_SIGN_IN_ABANDONED");if((e.currentUser?.uid??null)!==u)throw new n.ApiError("Another sign-in finished first",0,n.ACCOUNT_CHANGED);return(0,r.signInWithCustomToken)(e,l.token)},o=e=>{let t=e?.code;return"string"==typeof t?t:""};e.s(["CODE_LENGTH",0,6,"PHONE_SIGN_IN_SWITCH",0,"phone_sign_in","RESEND_SECONDS",0,30,"codeDigits",0,e=>e.replace(/\D/g,"").slice(0,6),"formatUsPhone",0,e=>{let t=(e||"").replace(/\D/g,"").replace(/^1(?=\d{10}$)/,"");return 10===t.length?`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`:e||""},"parseUsPhone",0,e=>{let t=e.trim();if(!t)return{ok:!1,reason:"empty"};let r=t.replace(/\D/g,"");return(t.startsWith("00")&&(r=r.slice(2)),(t.startsWith("+")||t.startsWith("00"))&&!r.startsWith("1"))?{ok:!1,reason:"not_us"}:(11===r.length&&r.startsWith("1")&&(r=r.slice(1)),a.test(r)?{ok:!0,e164:`+1${r}`}:{ok:!1,reason:"invalid"})},"phoneCredential",0,(e,r)=>t.i.credential(e,r),"phoneLinkProblem",0,e=>{switch(o(e)){case"auth/invalid-verification-code":return{field:"code",message:"That code doesn’t match. Check the newest text and try again."};case"auth/missing-verification-code":return{field:"code",message:"Enter the 6-digit code from the text."};case"auth/code-expired":case"auth/invalid-verification-id":case"auth/missing-verification-id":return{field:"code",expired:!0,message:"That code expired. Send a new one."};case"auth/account-exists-with-different-credential":case"auth/credential-already-in-use":return{field:"number",message:"This number already signs in to another Creased account. Use a different number."};case"auth/provider-already-linked":return{field:"form",message:"This account already has a sign-in number. Reload Security to see it, then use Change."};case"auth/user-mismatch":return{field:"form",message:"Your account changed in another tab. Reload Security and try again."};case"auth/requires-recent-login":return{field:"form",message:"For your security, close this and confirm it’s you again."};case"auth/too-many-requests":return{field:"form",message:"Too many tries. Wait a few minutes, then try again."};case"auth/network-request-failed":return{field:"form",message:"Check your connection and try again."};default:return{field:"form",message:"Your number couldn’t be saved. Try again."}}},"phoneLoginProblem",0,e=>{switch(o(e)){case"PHONE_CODE_INVALID":return{field:"code",message:"That code didn’t work. Check the newest text, or if this number isn’t on your account yet, log in another way and add it in Settings > Security."};case"PHONE_CODE_EXPIRED":return{field:"code",expired:!0,message:"That code expired. Send a new one."};case"PHONE_INPUT_INVALID":return{field:"code",expired:!0,message:"That code couldn’t be checked. Send a new one and try again."};case"PHONE_AUTH_RATE_LIMITED":case"auth/too-many-requests":return{field:"form",message:"Too many tries. Wait a few minutes, then try again."};case"auth/user-disabled":return{field:"form",message:"This account is disabled. Contact Creased support for help."};case"PHONE_US_ONLY":return{field:"form",message:"Creased texts codes to US mobile numbers only. Log in another way."};case"PHONE_ACCOUNT_REVIEW":return{field:"form",message:"Sign in another way to review your account status or contact Creased support."};case n.ACCOUNT_CHANGED:return{field:"form",message:"You signed in another way while this code was being checked. Reload the page to continue."};case"NETWORK":case"auth/network-request-failed":return{field:"form",message:"Check your connection and try again."};default:return{field:"form",message:"Phone sign-in isn’t available right now. Log in another way, or try again later."}}},"phoneNumberProblem",0,e=>"empty"===e?"Enter your mobile number.":"not_us"===e?"Creased texts codes to US numbers only. Enter a US mobile number.":"Enter a 10-digit US mobile number.","phoneSendProblem",0,e=>{switch(o(e)){case"auth/invalid-phone-number":case"auth/missing-phone-number":return{field:"number",message:"Enter a 10-digit US mobile number."};case"auth/operation-not-allowed":return{field:"number",message:"Creased can’t text this number. Use a US mobile number, or another way to sign in."};case"auth/too-many-requests":return{field:"form",message:"Too many codes were requested. Wait a few minutes, then try again."};case"auth/quota-exceeded":return{field:"form",message:"Creased can’t send texts right now. Try again later, or use another way to sign in."};case"auth/captcha-check-failed":case"auth/invalid-app-credential":case"auth/missing-app-credential":case"auth/invalid-recaptcha-token":return{field:"form",message:"We couldn’t confirm you’re a person. Try again."};case"auth/network-request-failed":return{field:"form",message:"Check your connection and try again."};default:return{field:"form",message:"The code couldn’t be sent. Try again."}}},"sendPhoneCode",0,(e,r,n)=>new t.i(e).verifyPhoneNumber(r,n),"signInWithPhoneCode",0,s],89479)},27281,49013,e=>{"use strict";var t=e.i(77012),r=e.i(12257),n=e.i(99103),i=e.i(58528);
1e.s(["signInWithEmailAndPassword",()=>i.af],49013);var i=i,a=i,s=e.i(61238);let o=new Set(["auth/invalid-credential","auth/invalid-login-credentials","auth/user-not-found","auth/wrong-password"]),u=async(e,t,r)=>{let a=t.trim().toLowerCase();try{return await (0,i.af)(e,a,r)}catch(i){if(!o.has(i?.code||""))throw i;let t=await s.api.post("/api/auth/alias-login",{email:a,password:r},{anonymous:!0}).catch(e=>{let t=e instanceof s.ApiError&&(0===e.status||e.status>=500);throw Object.assign(Error("sign-in failed"),{code:t?"auth/network-request-failed":"auth/invalid-credential"})});return(0,n.signInWithCustomToken)(e,t.token)}};e.s(["isCancelledSignIn",0,e=>{let t=e?.code;return"auth/popup-closed-by-user"===t||"auth/cancelled-popup-request"===t||"auth/user-cancelled"===t},"signInErrorMessage",0,e=>{switch(e?.code){case"auth/invalid-credential":case"auth/invalid-login-credentials":case"auth/user-not-found":case"auth/wrong-password":return"That email and password do not match. Check them, or reset your password.";case"auth/invalid-email":return"Enter a valid email address.";case"auth/account-exists-with-different-credential":case"auth/email-already-in-use":return"This email already has an account. Log in with your existing method, then connect this sign-in option in Settings > Security.";case"auth/credential-already-in-use":return"This sign-in already belongs to another Creased account. Choose a different account with this provider.";case"auth/user-disabled":return"This account is disabled. Contact Creased support for help.";case"auth/too-many-requests":return"Too many sign-in attempts. Wait a moment and try again.";case"auth/network-request-failed":return"Check your connection and try again.";case"auth/popup-blocked":return"Your browser blocked the sign-in window. Allow popups for Creased, then try again.";case"auth/operation-not-allowed":case"auth/unauthorized-domain":case"auth/invalid-oauth-client-id":return"This sign-in option is unavailable right now. Use another option and try again later.";default:return"Sign-in could not finish. Try again or use another sign-in option."}},"signInWithPassword",0,u,"signInWithProvider",0,(e,n)=>{if("google.com"===n){let r=new t.GoogleAuthProvider;return r.setCustomParameters({prompt:"select_account"}),(0,a.ai)(e,r)}let i=new r.OAuthProvider("apple.com");return i.addScope("email"),i.addScope("name"),(0,a.ai)(e,i)}],27281)},29855,e=>{"use strict";var t=e.i(43476),r=e.i(64492),n=e.i(90033),i=e.i(38935),a=e.i(24896),s=e.i(85035);let o=/^\/crew-invitation\/([^/?#]+)\/?(?:[?#]|$)/,u=e=>{let t=o.exec(e||"");if(!t?.[1])return null;try{let e=decodeURIComponent(t[1]);return(0,a.isCrewInviteToken)(e)?e:null}catch{return null}};e.s(["CrewInviteNotice",0,({next:e,mode:a})=>{let o=u(e),l=(0,i.useCrewInvitation)(o||"",{enabled:!!o}),c=l.data?.crew;return c?(0,t.jsxs)("div",{className:s.default.authNotice,"data-qa":"auth-crew-invite",children:[(0,t.jsx)(n.CrewMark,{id:c.id,name:c.name,image:c.image,size:40,className:"crew-mark"}),(0,t.jsxs)("p",{children:[(0,t.jsxs)("strong",{children:["You’re invited to join ",c.name||"a Crew"]}),"login"===a?(0,t.jsxs)(t.Fragment,{children:["Log in and you’ll land right in the Crew. New here?"," ",(0,t.jsx)(r.default,{className:"text-link",href:`/signup?next=${encodeURIComponent(e)}`,"data-qa":"auth-crew-invite-signup",children:"Create an account"})]}):"Create your account and you’ll land right in the Crew."]})]}):null},"invitationTokenFrom",0,u])},90033,e=>{"use strict";var t=e.i(43476);let r=[{base:"#FF4B3E",ink:"#111111"},{base:"#111111",ink:"#FFFFFF"},{base:"#2148C0",ink:"#FFFFFF"},{base:"#DDF23A",ink:"#111111"},{base:"#F4E7CE",ink:"#2B1A0D"},{base:"#0F5E3E",ink:"#FFFFFF"},{base:"#6B3FA0",ink:"#FFFFFF"},{base:"#7FB2E5",ink:"#0B2545"}],n=e=>r[[...e].reduce((e,t)=>31*e+t.charCodeAt(0)>>>0,7)%r.length];e.s(["CrewMark",0,({id:e,name:r,image:i,className:a,size:s=56})=>{let o=n(e);return(0,t.jsx)("span",{className:a,style:{width:s,height:s,background:i?void 0:o.base,color:o.ink},"aria-hidden":"true",children:i?(0,t.jsx)("img",{src:i,alt:"",loading:"lazy",decoding:"async"}):(r||"C").trim().charAt(0).toUpperCase()})},"crewColorway",0,n])},85035,e=>{e.v({authNotice:"crewInvite-module__1DTWzW__authNotice",badge:"crewInvite-module__1DTWzW__badge",dialogBody:"crew
1Invite-module__1DTWzW__dialogBody",eyebrow:"crewInvite-module__1DTWzW__eyebrow",glyph:"crewInvite-module__1DTWzW__glyph",lead:"crewInvite-module__1DTWzW__lead",linkField:"crewInvite-module__1DTWzW__linkField",linkPending:"crewInvite-module__1DTWzW__linkPending",markPending:"crewInvite-module__1DTWzW__markPending",meta:"crewInvite-module__1DTWzW__meta",name:"crewInvite-module__1DTWzW__name",namePending:"crewInvite-module__1DTWzW__namePending",senderDialog:"crewInvite-module__1DTWzW__senderDialog",status:"crewInvite-module__1DTWzW__status",statusError:"crewInvite-module__1DTWzW__statusError",ticket:"crewInvite-module__1DTWzW__ticket"})},38935,e=>{"use strict";var t=e.i(19273),r=e.i(21482),n=e.i(54616),i=e.i(66027),a=e.i(12598),s=e.i(84677),o=e.i(11469),u=e.i(61238),l=e.i(13433),c=e.i(26387);let d=encodeURIComponent,h=(e,t="")=>`/api/crews/${d(e)}${t}`,m=e=>["crew",e],p=e=>["crew",e,"members"],g=e=>["crew",e,"join-requests"],y=e=>["crew",e,"notification-preference"],f=["crews"],w=["crews","discover"],_=["crews","recommended"],v=(e,t,r)=>{let n=e=>e.id===t?{...e,...r}:e;e.setQueryData(m(t),e=>e?{...e,...r}:e),e.setQueriesData({queryKey:w},e=>e?.pages?{...e,pages:e.pages.map(e=>({...e,crews:e.crews?.map(n)}))}:e),e.setQueriesData({queryKey:_},e=>Array.isArray(e)?e.map(n):e)},b=(e,t)=>!(t instanceof u.ApiError&&t.status>=400&&t.status<500)&&e<2;e.s(["NOTIFICATION_MODES",0,[{value:"all",label:"All messages",description:"Every new message in the Crew chat."},{value:"mentions_and_replies",label:"Mentions and replies",description:"Only when someone mentions you or answers you."},{value:"muted",label:"Muted",description:"Nothing from this Crew. You can still read it any time."}],"crewPath",0,h,"useCreateCrew",0,()=>{let e=(0,a.useQueryClient)();return(0,n.useMutation)({mutationFn:e=>u.api.post("/api/crews",e).then(e=>e.crew),onSuccess:t=>{t?.id&&e.setQueryData(m(t.id),t),e.invalidateQueries({queryKey:f}),e.invalidateQueries({queryKey:o.CONVERSATIONS_KEY})}})},"useCreateCrewInviteLink",0,()=>(0,n.useMutation)({mutationFn:e=>u.api.post(h(e,"/invite-link"))}),"useCrew",0,(e,{enabled:t=!0}={})=>(0,i.useQuery)({queryKey:m(e),queryFn:()=>u.api.get(h(e)).then(e=>e.crew),enabled:t&&!!e,staleTime:3e4}),"useCrewInvitation",0,(e,{enabled:t=!0}={})=>(0,i.useQuery)({queryKey:["crew-invitation",e],queryFn:({signal:t})=>u.api.get(`/api/crew-invites/${d(e)}`,void 0,{anonymous:!0,signal:t}),enabled:t&&!!e,retry:b,staleTime:6e4}),"useCrewMembers",0,(e,{enabled:t=!0}={})=>(0,r.useInfiniteQuery)({queryKey:p(e),queryFn:({pageParam:t})=>u.api.get(h(e,"/members"),{page:t,limit:50}),initialPageParam:1,getNextPageParam:e=>e.pagination?.hasMore?(e.pagination.page||1)+1:void 0,enabled:t,staleTime:3e4}),"useCrewNotificationMode",0,(e,{enabled:t=!0}={})=>(0,i.useQuery)({queryKey:y(e),queryFn:()=>u.api.get(h(e,"/notification-preference")).then(e=>e.mode||"mentions_and_replies"),enabled:t,staleTime:6e4}),"useDeleteCrew",0,()=>{let e=(0,a.useQueryClient)();return(0,n.useMutation)({mutationFn:e=>u.api.del(h(e)),onSuccess:(t,r)=>{e.setQueryData(m(r),e=>e?{...e,isActive:!1}:e),e.invalidateQueries({queryKey:f}),e.invalidateQueries({queryKey:o.CONVERSATIONS_KEY})}})},"useDiscoverCrews",0,({category:e,search:n},{enabled:i=!0}={})=>(0,r.useInfiniteQuery)({queryKey:[...w,e||"all",n],queryFn:({pageParam:t,signal:r})=>u.api.get("/api/crews",{...t,limit:20,category:e||void 0,search:n||void 0},{signal:r}),initialPageParam:null,getNextPageParam:e=>e.nextCursor?{cursor:e.nextCursor}:e.pagination?.hasMore?{page:(e.pagination.page||1)+1}:void 0,placeholderData:t.keepPreviousData,enabled:i,staleTime:12e4}),"useJoinCrew",0,({refreshFeed:e=!0}={})=>{let t=(0,a.useQueryClient)();return(0,n.useMutation)({mutationFn:({crewId:e,message:t,inviteToken:r})=>u.api.post(h(e,"/join"),r?{inviteToken:r}:t?{message:t}:{}),onSuccess:(r,{crewId:n,crew:i})=>{v(t,n,(0,l.membershipPatch)(r,i)),t.invalidateQueries({queryKey:m(n)}),t.invalidateQueries({queryKey:c.MY_CREWS_KEY}),"joined"===(0,l.joinOutcome)(r,i)&&(t.invalidateQueries({queryKey:o.CONVERSATIONS_KEY}),e?(0,s.restartFeed)(t):t.invalidateQueries({queryKey:["home-feed"],refetchType:"none"}))}})},"useJoinRequests",0,(e,{enabled:t=!0}={})=>(0,i.useQuery)({queryKey:g(e),queryFn:()=>u.api.get(h(e,"/join-requests"),{status:"pending",limit:50}).then(e=>e.requests||[]),enabled:t,staleTime:15e3}),"useLeaveCrew",0,()=>{let e=(0,a.useQueryClient)();return(0,n.useMutation)({mutationFn:e=>u.api.del(h(e,"/leave")),onSuccess:(t,r)=>
1{v(e,r,l.LEFT_CREW_PATCH),e.invalidateQueries({queryKey:m(r)}),e.invalidateQueries({queryKey:f}),e.invalidateQueries({queryKey:o.CONVERSATIONS_KEY}),(0,s.restartFeed)(e)}})},"useProcessJoinRequest",0,e=>{let t=(0,a.useQueryClient)();return(0,n.useMutation)({mutationFn:({requestId:t,action:r})=>u.api.put(h(e,`/join-requests/${d(t)}`),{action:r}),onSuccess:(r,{requestId:n,action:i})=>{t.setQueryData(g(e),e=>e?.filter(e=>e.id!==n)),t.invalidateQueries({queryKey:g(e)}),"approve"===i&&(t.invalidateQueries({queryKey:p(e)}),t.invalidateQueries({queryKey:m(e),exact:!0}))}})},"useRecommendedCrews",0,({enabled:e=!0}={})=>(0,i.useQuery)({queryKey:_,queryFn:()=>u.api.get("/api/crews",{recommended:!0,isPublic:!0,excludeJoined:!0,limit:12}).then(e=>e.crews||[]),enabled:e,staleTime:12e4}),"useSetCrewNotificationMode",0,e=>{let t=(0,a.useQueryClient)();return(0,n.useMutation)({mutationFn:t=>u.api.put(h(e,"/notification-preference"),{mode:t}).then(e=>e.mode||t),onMutate:r=>{let n=t.getQueryData(y(e));return t.setQueryData(y(e),r),{previous:n}},onError:(r,n,i)=>{i?.previous&&t.setQueryData(y(e),i.previous)},onSuccess:r=>t.setQueryData(y(e),r)})},"useUpdateCrew",0,e=>{let t=(0,a.useQueryClient)();return(0,n.useMutation)({mutationFn:t=>u.api.put(h(e),t).then(e=>e.crew),onSuccess:r=>{r&&t.setQueryData(m(e),e=>({...e||{},...r})),t.invalidateQueries({queryKey:m(e),exact:!0}),t.invalidateQueries({queryKey:f})}})},"useUpdateMemberRole",0,e=>{let t=(0,a.useQueryClient)();return(0,n.useMutation)({mutationFn:({memberId:t,role:r})=>u.api.put(h(e,`/members/${d(t)}/role`),{role:r}),onSuccess:(r,{memberId:n,role:i})=>{t.setQueryData(p(e),e=>e?{...e,pages:e.pages.map(e=>({...e,members:e.members?.map(e=>e.userId===n?{...e,role:i}:e)}))}:e),t.invalidateQueries({queryKey:p(e)})}})}])},24896,e=>{"use strict";var t=e.i(61238);let r=/^[A-Za-z0-9_-]{32}$/;e.s(["CREW_INVITE_PROBLEM_ICONS",0,{expired:"calendar",closed:"link",unavailable:"link",full:"crews",limit:"crews",restricted:"lock",failed:"refresh"},"canInviteToCrew",0,(e,t)=>!!t&&(e?.joinability==="open"||"creator"===t||"admin"===t),"crewInviteMessage",0,e=>`Join me in ${e||"my Crew"} on Creased`,"crewInviteProblem",0,e=>{let r=e instanceof t.ApiError?e.status:0,n=e instanceof t.ApiError&&e.code||"";return 410===r?"CREW_INVITE_EXPIRED"===n?"expired":"closed":400===r&&"CREW_FULL"===n?"full":400===r&&"CREW_LIMIT_REACHED"===n?"limit":403===r&&/^ACCOUNT_(SUSPENDED|BANNED)$/.test(n)?"restricted":[400,403,404].includes(r)?"unavailable":"failed"},"crewInviteProblemCopy",0,(e,t)=>{switch(e){case"expired":return{title:"This invite expired",message:"Invite links work for 30 days. Ask whoever sent it for a new one."};case"closed":return{title:"This invite isn’t active anymore",message:"Ask whoever sent it for a new link."};case"unavailable":return{title:"This invite link doesn’t work",message:"It may be incomplete, or the Crew may be gone. Ask whoever sent it for a new link."};case"full":return{title:`${t||"This Crew"} is full`,message:"It has all the members it can take right now. Ask a Crew admin to make room, or find another Crew."};case"limit":return{title:"You’re in as many Crews as you can join",message:"Leave a Crew you’re done with, then open this invite again."};case"restricted":return{title:"Your account can’t join Crews right now",message:"Your account status explains why and what happens next."};default:return{title:"This invite didn’t open",message:"Check your connection and try again."}}},"isCrewInviteToken",0,e=>"string"==typeof e&&r.test(e),"wasAlreadyMember",0,e=>e?.kind==="already_joined"])},13433,e=>{"use strict";var t=e.i(61238);let r=[{value:"brands",label:"Brands",icon:"shop"},{value:"collecting",label:"Collecting",icon:"star"},{value:"reselling",label:"Reselling",icon:"tag"},{value:"trading",label:"Trading",icon:"refresh"},{value:"regional",label:"Regional",icon:"location"},{value:"general",label:"General",icon:"comment"}],n=e=>"creator"===e||"admin"===e||"member"===e?e:null,i=e=>{let t=n(e?.userRole??e?.role);return t||(e?.isMember===!0?"member":null)},a=e=>null!==i(e),s=e=>"creator"===e||"admin"===e,o=e=>
1"invite-only"===e||"invite"===e?"invite":"request-to-join"===e||"request"===e?"request":"open",u=e=>a(e)?"member":e?.joinRequestStatus==="pending"||e?.hasPendingRequest===!0?"pending":o(e?.joinability),l={card:{member:"Joined",pending:"Pending",open:"Join",request:"Request",invite:"Invite only"},bar:{member:"Joined",pending:"Request pending",open:"Join Crew",request:"Request to join",invite:"Invite only"}},c=(e,t)=>"boolean"==typeof e?.crew?.isMember?e.crew.isMember?"joined":"requested":e?.status==="pending"||e?.requestId?"requested":"open"===u(t)?"joined":"requested",d=["feed","threads","events","members"],h={nameMin:3,nameMax:50,descriptionMax:500,maxTags:10,tagMin:2,tagMax:30,summaryMax:280,maxKeywords:12,keywordMin:2,keywordMax:32},m=e=>e.trim().replace(/^#+/,"").toLowerCase(),p=(e,t=2)=>(Array.isArray(e.latestReplies)&&e.latestReplies.length?e.latestReplies:[e.latestReply]).filter(e=>!!e).slice(-t);e.s(["CREW_CATEGORIES",0,r,"CREW_LIMITS",0,h,"CREW_TAB_LABELS",0,{feed:"Feed",threads:"Threads",events:"Events",members:"Members"},"LEFT_CREW_PATCH",0,{isMember:!1,userRole:null,role:null,joinRequestStatus:null},"addTags",0,(e,t,{max:r,min:n=2,maxLength:i})=>{let a=[...e],s=null;for(let e of t.split(/[\s,]+/)){let t=m(e);if(!(!t||a.includes(t))){if(t.length<n){s=`Each one needs at least ${n} characters.`;continue}if(t.length>i){s=`Keep each one to ${i} characters or fewer.`;continue}if(a.length>=r){s=`You can add up to ${r}.`;break}a.push(t)}}return{tags:a,rejected:s}},"applyVote",0,(e,t)=>{let r=e.viewerVote??null,n=Number(e.upvotesCount)||0,i=Number(e.downvotesCount)||0;return"up"===r&&(n-=1),"down"===r&&(i-=1),"up"===t&&(n+=1),"down"===t&&(i+=1),n=Math.max(0,n),i=Math.max(0,i),{...e,upvotesCount:n,downvotesCount:i,score:n-i,viewerVote:"none"===t?null:t,totalInteractions:n+i+(Number(e.commentsCount)||0)}},"canChangeMemberRole",0,({viewerRole:e,viewerId:t,member:r})=>"creator"===e&&r.userId!==t&&"creator"!==n(r.role),"canLeaveCrew",0,e=>"admin"===e||"member"===e,"canManageCrew",0,s,"canManageEvent",0,({role:e,viewerId:t,organizerId:r})=>s(e)||!!(r&&r===t),"canRemoveContent",0,({role:e,viewerId:t,authorId:r})=>!!(r&&r===t)||s(e),"categoryIcon",0,e=>r.find(t=>t.value===e)?.icon??"comment","categoryLabel",0,e=>{let t=r.find(t=>t.value===e);return t?t.label:"string"==typeof e&&e?e.charAt(0).toUpperCase()+e.slice(1):""},"crewAccessProblem",0,e=>!(e instanceof t.ApiError)||e.code&&/^(RESTRICTED_|ACCOUNT_)/.test(e.code)?null:"crew_private"===e.code?"private":"crew_deleted"===e.code?"deleted":"crew_not_found"===e.code?"not-found":"crew_unavailable"===e.code||503===e.status?"unavailable":403===e.status?"members-only":404===e.status||410===e.status?"not-found":null,"crewPostImages",0,e=>(Array.isArray(e?.images)?e.images:[]).map(e=>{if("string"==typeof e)return e;if(e&&"object"==typeof e){let t=e.url||e.uri||e.downloadURL;return"string"==typeof t?t:null}return null}).filter(e=>!!e),"crewRoleOf",0,i,"crewTabsFor",0,e=>a(e)?[...d]:e?.isPublic===!1?[]:["feed","events"],"filterCrewsBySearch",0,(e,t)=>{let r=Array.isArray(e)?e:[],n=String(t??"").toLowerCase().split(/\s+/).filter(Boolean);return n.length?r.filter(e=>{let t=[e.name,e.description,e.category,...Array.isArray(e.tags)?e.tags:[]].filter(e=>"string"==typeof e&&!!e).join(" ").toLowerCase();return n.every(e=>t.includes(e))}):r},"isCrewCategory",0,e=>r.some(t=>t.value===e),"isCrewCreator",0,e=>"creator"===e,"isCrewMember",0,a,"joinActionLabel",0,(e,t="this Crew")=>"member"===e?`Joined ${t}, open Crew`:"pending"===e?`Request to join ${t} pending`:"request"===e?`Request to join ${t}`:"invite"===e?`${t} is invite only`:`Join ${t}`,"joinLabel",0,(e,t="card")=>l[t][e],"joinOutcome",0,c,"joinStateOf",0,u,"joinabilityOf",0,o,"membersLabel",0,e=>{let t=Number(e)||0;return`${t.toLocaleString("en-US")} ${1===t?"member":"members"}`},"membershipPatch",0,(e,t)=>"joined"===c(e,t)?{isMember:!0,userRole:"string"==typeof e?.crew?.userRole?e.crew.userRole:"member",joinRequestStatus:null,..."number"==typeof e?.crew?.memberCount?{memberCount:e.crew.memberCount}:{}}:{isMember:!1,userRole:null,joinRequestStatus:"pending"},"nextMemberRole",0,e=>"admin"===n(e.role)?"member":"admin","nextVote",0,(e,t)=>e===t?"none":t,"normalizeRole",0,n,"previewReplies",0,p,"resolve
1CrewTab",0,(e,t)=>t.find(t=>t===e)??t[0]??null,"roleLabel",0,e=>{let t=n(e);return"creator"===t?"Creator":"admin"===t?"Admin":"Member"},"sortPinnedFirst",0,e=>[...e].sort((e,t)=>Number(!0===t.isPinned)-Number(!0===e.isPinned)||(Date.parse(t.createdAt||"")||0)-(Date.parse(e.createdAt||"")||0)),"suggestableCrews",0,(e,t=6)=>(Array.isArray(e)?e:[]).filter(e=>e?.id&&!1!==e.isPublic&&"invite"!==u(e)).slice(0,t),"summaryChanged",0,(e,t,r)=>{let n=(e?.keywords||[]).map(e=>e.toLowerCase()),i=r.map(e=>e.toLowerCase());return(e?.text||"").trim()!==t.trim()||n.length!==i.length||n.some((e,t)=>e!==i[t])},"threadMessagesLabel",0,e=>{let t=Number(e)||0;return t<=0?"No messages yet":`${t.toLocaleString("en-US")} ${1===t?"message":"messages"}`},"validateCrewForm",0,({name:e,description:t,summaryText:r=""})=>{let n={},i=e.trim();return i?i.length<h.nameMin?n.name=`Crew names need at least ${h.nameMin} characters.`:i.length>h.nameMax&&(n.name=`Keep the name to ${h.nameMax} characters or fewer.`):n.name="Give your Crew a name.",t.trim().length>h.descriptionMax&&(n.description=`Keep the description to ${h.descriptionMax} characters or fewer.`),r.trim().length>h.summaryMax&&(n.summary=`Keep the summary to ${h.summaryMax} characters or fewer.`),n},"withReplyPreview",0,(e,t,r=2)=>{let n=[...p(e,r).filter(e=>!t.id||e.id!==t.id),t].slice(-r);return{...e,latestReplies:n,latestReply:n[n.length-1]||null}}])},26387,e=>{"use strict";var t=e.i(66027),r=e.i(61238);let n=e=>{let t=new Set;return(e||[]).filter(e=>!(!e?.id||t.has(e.id))&&(t.add(e.id),!0))},i=["crews","mine"];e.s(["MY_CREWS_KEY",0,i,"eachCrewOnce",0,n,"useMyCrews",0,({enabled:e=!0}={})=>(0,t.useQuery)({queryKey:i,queryFn:()=>r.api.get("/api/crews/users/me/crews").then(e=>n(e.crews)),enabled:e,staleTime:6e4})])},84677,e=>{"use strict";var t=e.i(21482),r=e.i(61238);let n=["home-feed"],i=async e=>{if(!e.length)return r.api.get("/api/discovery/feed",{limit:10});try{return await r.api.post("/api/discovery/feed",{limit:10,seenIds:e})}catch(e){if((0,r.isApiError)(e,404)||(0,r.isApiError)(e,405))return r.api.get("/api/discovery/feed",{limit:10});throw e}};e.s(["HOME_FEED_KEY",0,n,"flattenFeed",0,e=>{let t=new Set;return(e||[]).flatMap(e=>e?.items||[]).filter(e=>!(!e?.id||t.has(e.id))&&(t.add(e.id),!0))},"isFeedSessionExpired",0,e=>[403,404,410].some(t=>(0,r.isApiError)(e,t)),"restartFeed",0,e=>e.resetQueries({queryKey:n,exact:!0}),"useHomeFeed",0,(e,{enabled:a=!0}={})=>(0,t.useInfiniteQuery)({enabled:a,queryKey:n,queryFn:({pageParam:t})=>t?r.api.get("/api/discovery/feed",{limit:10,sessionId:t.sessionId,cursor:t.cursor||void 0}):i(e()),initialPageParam:null,getNextPageParam:e=>e?.hasMore&&e.sessionId?{sessionId:e.sessionId,cursor:e.nextCursor}:void 0,staleTime:3e5})])},11469,e=>{"use strict";var t=e.i(33818),r=e.i(61238);let n=["conversations"];e.s(["CONVERSATIONS_KEY",0,n,"conversationsQuery",0,()=>(0,t.queryOptions)({queryKey:n,queryFn:()=>r.api.get("/api/messages/conversations",{page:1,limit:100}),staleTime:2e4})])}]);

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.