PageSourceSearch

https://snowchat.ai/_next/static/immutable/chunks/1vd-fg9_-jebp.js

js snowchat.ai collected 2026-10-05 12:46:05 UTC 42,825 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0804f-85bc-70d3-ba5b-893846f94393")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,940358,e=>{"use strict";var t=e.i(943306),r=e.i(297068),n=e.i(746632),i=e.i(681891),a=e.i(14467),s=e.i(779786),o=e.i(352255);async function l(e,t){let r=await e.json().catch(()=>null);return(0,s.isObjectRecord)(r)&&"string"==typeof r.error?r.error:t}let c=(0,r.createContext)(void 0);e.s(["NotificationsProvider",0,function({children:e}){let{appNotificationEnabled:s,setAppNotificationEnabled:d}=(0,i.useUserPreferences)(),[u,m]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),[x,y]=(0,r.useState)(!0),[w,k]=(0,r.useState)(!1),[N,j]=(0,r.useState)(!1),C=(0,r.useRef)(!1),S=(0,r.useRef)(null),P=(0,r.useCallback)(async()=>C.current?(y(!1),S.current||Promise.resolve()):(S.current||(S.current=(async()=>{try{let e=(0,o.isPushSupported)();if(m(e),e){let e=(0,o.isNotificationPermissionGranted)(),t=(0,o.isNotificationPermissionDenied)();if(f(e),g(t),e){let e=await (0,o.getExistingSubscription)();b(null!==e)}}}catch(e){(0,a.captureException)(e,{tags:{context:"notifications-initialize",component:"NotificationsContext"},level:"error"})}finally{y(!1),C.current=!0}})()),S.current),[]),E=(0,r.useCallback)(async()=>{k(!0);try{let e=await (0,o.requestNotificationPermission)();if("granted"!==e)return void n.toast.error("Permission denied",{description:"Please enable notifications in your browser settings to receive alerts.",duration:5e3});f(!0),g(!1);let t=await (0,o.subscribeToPush)(),r=await fetch("/api/notifications/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await l(r,"Failed to save subscription");try{await (0,o.unsubscribeFromPush)()}catch(e){(0,a.captureException)(e,{tags:{context:"notifications-enable-rollback",component:"NotificationsContext"},level:"error"})}if(429===r.status)return void n.toast.error("Rate limit reached",{description:e||"Too many requests. Please wait a moment.",duration:5e3});n.toast.error("Failed to save subscription",{description:e||"Please try again",duration:4e3});return}await r.json(),b(!0)}catch{n.toast.error("Failed to enable notifications",{description:"An unexpected error occurred. Please try again.",duration:5e3})}finally{k(!1)}},[]),T=(0,r.useCallback)(async()=>{k(!0);try{let e=await (0,o.getExistingSubscription)();if(e){let t=await fetch("/api/notifications/subscribe",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:e.endpoint})});if(!t.ok){let e=await l(t,"Failed to remove subscription");if(429===t.status)return void n.toast.error("Rate limit reached",{description:e||"Too many requests. Please wait a moment.",duration:5e3});n.toast.error("Failed to remove subscription",{description:e||"Please try again",duration:4e3});return}await (0,o.unsubscribeFromPush)()}b(!1)}catch{n.toast.error("Failed to disable notifications",{description:"An unexpected error occurred. Please try again.",duration:4e3})}finally{k(!1)}},[]),R=(0,r.useCallback)(async()=>{d(!s),j(!0);try{let e=await fetch("/api/notifications/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_notification:!s})});if(!e.ok){let t=await l(e,"Failed to update preferences");429===e.status?n.toast.error("Rate limit reached",{description:t||"Too many requests. Please wait a moment.",duration:5e3}):n.toast.error("Failed to update preferences",{description:t||"Please try again",duration:4e3}),d(s);return}}catch{d(s),n.toast.error("Failed to update preferences",{description:"An unexpected error occurred. Please try again.",duration:4e3})}finally{j(!1)}},[s,d]);return(0,t.jsx)(c.Provider,{value:{isSupported:u,isPermissionGranted:p,isPermissionDenied:h,isSubscribed:v,isInitializing:x,appNotificationEnabled:s,setAppNotificationEnabled:d,isProcessing:w,isTogglingPreference:N,handleEnable:E,handleDisable:T,handleAppNotificationToggle:R,initialize:P},children:e})},"useNotifications",0,function(){let e=(0,r.use)(c);if(void 0===e)throw Error("useNotifications must be used within a NotificationsProvider");return e}])},681891,99876,e=>{"use strict";var t=e.i(943306),r=e.i(297068),n=e.i(96650),i=e.i(746632),a=e.i(720576),s=e.i(788794),o=e.i(778366);let l=["always","smart","never"],c="snow-skip-to-chat-mode";function d(e){return`snow-last-msg-ts:${(0,o.workspaceScopeKey)(e)}`}function u(e){return e&&l.includes(e)?e:"smart"}function m(e,t){return t?`${e}-${t.slice(-3)}`:null}var p=e.i(581427),f=e.i(779786);let h=["5m","10m","1h","never"];function g(e){return"string"==typeof e&&h.includes(e)}e.s(["DEFAULT_FORM_EXPIRY",0,"10m","FORM_EXPIRY_LABELS",0,{"5m":"5 minutes","10m":"10 minutes","1h":"1 hour",never:"Never"}
1,"FORM_EXPIRY_VALUES",0,h,"isFormExpiry",0,g],99876);let v="auto";function b(e){return e}function x(e){window.dispatchEvent(new StorageEvent("storage",{key:e}))}function y(e,t,n,i){let a=m(e,n),s=(0,r.useCallback)(e=>{let t=t=>{(t.key===a||null===t.key)&&e()};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[a]),o=(0,r.useCallback)(()=>{if(!a)return t;try{return i(localStorage.getItem(a))}catch{return t}},[t,i,a]),l=(0,r.useCallback)(()=>t,[t]);return(0,r.useSyncExternalStore)(s,o,l)}let w=(0,r.createContext)(void 0);async function k(e,t){let r=await e.json().catch(()=>null);return(0,f.isObjectRecord)(r)?{..."string"==typeof r.error?{error:r.error}:{},..."string"==typeof r.reason?{reason:r.reason}:{}}:{error:t}}e.s(["UserPreferencesProvider",0,function({children:e}){let o,l,h,N,{userId:j}=(0,n.useAuth)(),{workspace:C}=(0,p.useWorkspace)(),{requiresPlus:S,isResolved:P}=(0,a.useSignupAccess)(),E=(0,r.useRef)(null),T=(0,r.useRef)(0),R=(0,r.useRef)(null),[I,D]=(0,r.useState)(0),[O,A]=(0,r.useState)(!0),[F,U]=(0,r.useState)(v),[M,_]=(0,r.useState)(!1),[z,q]=(0,r.useState)("10m"),[L,$]=(0,r.useState)(!1),[B,K]=(0,r.useState)(null),[G,V]=(0,r.useState)(!1),W=y(c,"smart",j,u),H=y(d(C),null,j,b),J=(o=m("snow-location-enabled",j),l=(0,r.useCallback)(e=>{let t=t=>{(t.key===o||null===t.key)&&e()};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[o]),h=(0,r.useCallback)(()=>{if(!o)return!1;try{let e=localStorage.getItem(o);return null!==e&&"true"===e}catch{return!1}},[!1,o]),N=(0,r.useCallback)(()=>!1,[!1]),(0,r.useSyncExternalStore)(l,h,N)),[Y]=(0,r.useState)(()=>Date.now()),Z=function(e){let t="always"===e.storedMode||"never"===e.storedMode?e.storedMode:"smart";if("always"===t)return!0;if("never"===t||!e.lastMessageAt)return!1;let r=e.now-new Date(e.lastMessageAt).getTime();return Number.isFinite(r)&&r<e.thresholdMs}({storedMode:W,lastMessageAt:H,now:Y,thresholdMs:6e5}),[X,Q]=(0,r.useState)(!0);(0,r.useEffect)(()=>{let e=()=>{null!==R.current&&(window.clearTimeout(R.current),R.current=null)},t=()=>{e(),T.current=0},r=()=>{E.current=null,T.current=1,e(),R.current=window.setTimeout(()=>{R.current=null,D(e=>e+1)},1e3)};if(e(),!j){E.current=null,t(),A(!0),U(v),q("10m"),K(null),Q(!1);return}if(P&&S){E.current=null,t(),Q(!1);return}if(E.current!==j)return E.current=j,Q(!0),(async()=>{try{let e=await fetch("/api/user/preferences");if(!e.ok){let n=await k(e,"Failed to fetch preferences");if(403===e.status&&n.reason===s.PLUS_SUBSCRIPTION_REQUIRED_REASON){E.current=null,t();return}if(429===e.status&&i.toast.error("Rate limit reached",{description:n.error||"Too many requests. Please wait before refreshing.",duration:5e3}),e.status>=500&&0===T.current)return void r();throw Object.assign(Error(n.error||"Failed to fetch preferences"),{notified:429===e.status,retryable:e.status>=500})}let n=await e.json(),a=(0,f.isObjectRecord)(n)&&(0,f.isObjectRecord)(n.preferences)?n.preferences:{},o=(0,f.isObjectRecord)(a.notifications)?a.notifications:{},l=(0,f.isObjectRecord)(a.stt)?a.stt:{},c=(0,f.isObjectRecord)(a.forms)?a.forms:{},d=(0,f.isObjectRecord)(a.timezone)?a.timezone:null,u=d&&(void 0===d.name||"string"==typeof d.name)&&(void 0===d.mode||"auto"===d.mode||"manual"===d.mode)&&(void 0===d.dismissed||null===d.dismissed||"string"==typeof d.dismissed)?{..."string"==typeof d.name?{name:d.name}:{},..."auto"===d.mode||"manual"===d.mode?{mode:d.mode}:{},...null===d.dismissed||"string"==typeof d.dismissed?{dismissed:d.dismissed}:{}}:null;t(),A(!1!==o.app_notification);let m="string"==typeof l.languageCode&&l.languageCode||v;U(m);let p=c.expiry;q(g(p)?p:"10m"),K(u)}catch(e){if(E.current=null,0===T.current&&(!(e instanceof Error)||!1!==e.retryable))return void r();e instanceof Error&&e.notified||i.toast.error("Failed to load preferences",{description:e instanceof Error?e.message:"Could not load your settings",duration:5e3})}finally{Q(!1)}})(),()=>{e()}},[P,I,S,j]);let ee=(0,r.useCallback)(e=>{if(j)try{let t=m(c,j);if(!t)return;localStorage.setItem(t,e),x(t)}catch(e){i.toast.error("Failed to save preference",{description:"Could not save your chat preference",duration:3e3})}},[j]),et=(0,r.useCallback)(e=>{if(j)try{let t=m(d(C),j);if(!t)return;null===e?localStorage.removeItem(t):localStorage.setItem(t,e),x(t)}catch{}},[j,C]),er=(0,r.useCallback)(async e=>{if(j){if(e){if(!("geolocation"in navigator))return void i.toast.error("Geolocation not supported",{description:"Your browser doesn't support location services",duration:4e3});try{if("permissions"in navigator){let e=await navigator.permissions.query({name:"geolocation"});if("denied"===e.state)return void i.toast.error("Location access denied",{description:"Please enable location access in your browser settings and try again",duration:6e3})}await new Promise((e,t)=>
1{navigator.geolocation.getCurrentPosition(()=>e(),r=>{r.code===r.PERMISSION_DENIED?t(Error("Permission denied")):e()},{timeout:5e3})})}catch(e){i.toast.error("Location access required",{description:"Please enable location access in your browser settings to use this feature",duration:6e3});return}}try{let t=m("snow-location-enabled",j);if(!t)return;localStorage.setItem(t,String(e)),x(t)}catch(e){i.toast.error("Failed to save preference",{description:"Could not save your location preference",duration:3e3})}}},[j]),en=(0,r.useCallback)(async e=>{if(j){U(e),_(!0);try{let t=await fetch("/api/user/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stt:{languageCode:e}})});if(!t.ok){let e=await k(t,"Failed to save language preference");U(F),429===t.status?i.toast.error("Rate limit reached",{description:e.error||"Too many requests. Please wait a moment.",duration:5e3}):i.toast.error("Failed to save preference",{description:e.error||"Could not save language setting",duration:4e3})}}catch(e){U(F),i.toast.error("Failed to save preference",{description:"Could not save language setting",duration:4e3})}finally{_(!1)}}},[j,F]),ei=(0,r.useCallback)(async e=>{if(j){q(e),$(!0);try{(await fetch("/api/user/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({forms:{expiry:e}})})).ok||(q(z),i.toast.error("Failed to save preference",{description:"Could not save how long Snow waits for an answer",duration:4e3}))}catch(e){q(z),i.toast.error("Failed to save preference",{description:"Could not save how long Snow waits for an answer",duration:4e3})}finally{$(!1)}}},[j,z]),ea=(0,r.useCallback)(async(e,t)=>{if(!j)return!1;K({name:e.name,mode:e.mode,dismissed:e.dismissed??null}),V(!0);try{let r=await fetch("/api/user/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({timezone:{name:e.name,mode:e.mode,...e.dismissed?{dismissed:e.dismissed}:{}}})});if(!r.ok){let e=await k(r,"Failed to save time zone preference");return K(B),t?.silent||(429===r.status?i.toast.error("Rate limit reached",{description:e.error||"Too many requests. Please wait a moment.",duration:5e3}):i.toast.error("Failed to save preference",{description:e.error||"Could not save time zone setting",duration:4e3})),!1}return!0}catch(e){return K(B),t?.silent||i.toast.error("Failed to save preference",{description:"Could not save time zone setting",duration:4e3}),!1}finally{V(!1)}},[j,B]);return(0,t.jsx)(w.Provider,{value:{appNotificationEnabled:O,setAppNotificationEnabled:A,sttLanguage:F,setSttLanguage:en,isSavingSttLanguage:M,formExpiry:z,setFormExpiry:ei,isSavingFormExpiry:L,timezonePreference:B,saveTimezonePreference:ea,isSavingTimezone:G,skipToChatMode:W,setSkipToChatMode:ee,shouldSkipToChat:Z,setLastMessageTimestamp:et,locationEnabled:J,setLocationEnabled:er,isLoading:X},children:e})},"useUserPreferences",0,function(){let e=(0,r.use)(w);if(void 0===e)throw Error("useUserPreferences must be used within a UserPreferencesProvider");return e}],681891)},526135,e=>{"use strict";var t=e.i(513667);function r(e){return e.replace(/_/g," ")}let n=null;e.s(["formatTimezoneLabel",0,r,"getDeviceTimezone",0,function(){try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return e&&e.trim().length>0?e:void 0}catch{return}},"getTimezoneOptions",0,function(){let e;if(n)return n;try{e=Intl.supportedValuesOf("timeZone")}catch{e=[]}let i=new Date;return n=e.map(e=>({name:e,offset:(0,t.getUtcOffsetHours)(e,i)})).sort((e,t)=>e.offset-t.offset||e.name.localeCompare(t.name)).map(({name:e,offset:t})=>{let n,i,a;return{name:e,label:r(e),offsetLabel:(i=Math.floor(n=Math.abs(t)),a=Math.round((n-i)*60),`GMT${t<0?"-":"+"}${String(i).padStart(2,"0")}:${String(a).padStart(2,"0")}`)}})}])},669021,e=>{"use strict";var t,r=e.i(943306);e.s([],49176),e.i(49176);var n=e.i(297068),i=e.i(832817),a=e.i(410596),s=e.i(809937),o=e.i(47334),l=e.i(853607),c=e.i(722348),d=e.i(479995);let u=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.indeterminate="data-indeterminate",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t);var m=e.i(118619);function p(e){return n.useMemo(()=>({checked:t=>e.indeterminate?{}:t?{[u.checked]:""}:{[u.unchecked]:""},...m.fieldValidityMapping}),[e.indeterminate])}var f=e.i(190657),h=e.i(549822),g=e.i(243832),v=e.i(173714),b=e.i(673715),x=e.i(481024),y=e.i(849412),w=e.i(854016),k=e.i(980586),N=e.i(803688),j=e.i(285796),C=e.i(200622);let S=n.createContext(void 0);var P=e.i(593713),E=e.i(507679),T=e.i(440912);let R=n.forwardRef(function(e,t){let{checked:u,className:m,defaultChecked:C=!1,"aria-labelledby":R,disabled:I=!1,form:D,id:O,indeterminate:A=!1,inputRef:F,name:U,onCheckedChange:M,parent:_=!1,readOnly:z=!1,render:q,required:L=!1,uncheckedValue:$,value:
1B,nativeButton:K=!1,style:G,...V}=e,{clearErrors:W}=(0,w.useFormContext)(),{disabled:H,name:J,setDirty:Y,setFilled:Z,setFocused:X,setTouched:Q,state:ee,validationMode:et,validityData:er,validation:en}=(0,b.useFieldRootContext)(),ei=(0,y.useFieldItemContext)(),{labelId:ea,controlId:es,registerControlId:eo,getDescriptionProps:el}=(0,k.useLabelableContext)(),ec=(0,j.useCheckboxGroupContext)(),ed=ec?.parent,eu=ed&&ec.allValues,em=H||ei.disabled||ec?.disabled||I,ep=J??U,ef=B??ep,eh=(0,h.useBaseUiId)(),eg=(0,h.useBaseUiId)(),ev=es;eu?ev=_?eg:`${ed.id}-${ef}`:O&&(ev=O);let eb={};eu&&(_?eb=ec.parent.getParentProps():ef&&(eb=ec.parent.getChildProps(ef)));let{checked:ex=u,indeterminate:ey=A,onCheckedChange:ew,...ek}=eb,eN=ec?.value,ej=ec?.setValue,eC=ec?.defaultValue,eS=n.useRef(null),eP=(0,l.useRefWithInit)(()=>Symbol("checkbox-control")),eE=n.useRef(!1),{getButtonProps:eT,buttonRef:eR}=(0,v.useButton)({disabled:em,native:K}),eI=ec?.validation??en,[eD,eO]=(0,a.useControlled)({controlled:ef&&eN&&!_?eN.includes(ef):ex,default:ef&&eC&&!_?eC.includes(ef):C,name:"Checkbox",state:"checked"}),eA=eu?!!ex:eD,eF=eu&&ey||A;(0,s.useIsoLayoutEffect)(()=>{eo!==i.NOOP&&(eE.current=!0,eo(eP.current,ev))},[ev,eo,eP]),n.useEffect(()=>{let e=eP.current;return()=>{eE.current&&eo!==i.NOOP&&(eE.current=!1,eo(e,void 0))}},[eo,eP]),(0,x.useRegisterFieldControl)(eS,eh,eD,void 0,!ec&&!em,U);let eU=n.useRef(null),eM=(0,o.useMergedRefs)(F,eU,eI.inputRef,eI.registerInput),e_=(0,N.useAriaLabelledBy)(R,ea,eU,!K,ev??void 0);(0,s.useIsoLayoutEffect)(()=>{eU.current&&(eU.current.indeterminate=eF,eD&&Z(!0))},[eD,eF,Z]),(0,T.useValueChanged)(eD,()=>{ec||(W(ep),Z(eD),Y(eD!==er.initialValue),eI.change(eD))});let ez=(0,g.mergeProps)({checked:eD,disabled:em,form:D,name:_?void 0:ep,id:K?void 0:ev??void 0,required:L,ref:eM,style:ep?c.visuallyHiddenInput:c.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(z)return void e.preventDefault();let t=e.currentTarget.checked,r=(0,P.createChangeEventDetails)(E.REASONS.none,e.nativeEvent);M?.(t,r),r.isCanceled||(ew?.(t,r),!r.isCanceled&&(eO(t),ef&&eN&&ej&&!_&&!eu&&ej(t?[...eN,ef]:eN.filter(e=>e!==ef),r)))},onFocus(){eS.current?.focus()}},void 0!==B?{value:(ec?eD&&B:B)||""}:i.EMPTY_OBJECT,el,e=>eI.getValidationProps(em,e));n.useEffect(()=>{if(!ed||!ef)return;let e=ed.disabledStatesRef.current;return e.set(ef,em),()=>{e.delete(ef)}},[ed,em,ef]);let eq=n.useMemo(()=>({...ee,checked:eA,disabled:em,readOnly:z,required:L,indeterminate:eF}),[ee,eA,em,z,L,eF]),eL=p(eq),e$=(0,f.useRenderElement)("span",e,{state:eq,ref:[eR,eS,t,ec?.registerControlRef],props:[{id:K?ev??void 0:eh,role:"checkbox","aria-checked":eF?"mixed":eA,"aria-readonly":z||void 0,"aria-required":L||void 0,"aria-labelledby":e_,"data-parent":_?"":void 0,onFocus(){em||X(!0)},onBlur(){let e=eU.current;e&&(Q(!0),X(!1),"onBlur"===et&&eI.commit(ec?eN:e.checked))},onKeyDown(e){if("Enter"!==e.key||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=eU.current?.form??null,r=e.currentTarget,n=e.nativeEvent,i=e.preventDefault,a=n.preventDefault,s=!1;e.preventDefault=()=>{s=!0,i.call(e)},n.preventDefault=()=>{s=!0,a.call(n)},a.call(n),(0,d.ownerWindow)(r).queueMicrotask(()=>{e.preventDefault=i,n.preventDefault=a,s||(function(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(("BUTTON"===e||"INPUT"===e)&&"submit"===t.type)return t}return null})(t)?.click()})},onClick(e){if(z||em)return;e.preventDefault();let t=eU.current;t&&t.dispatchEvent(new((0,d.ownerWindow)(t)).PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}))}},V,ek,eT,el,e=>eI.getValidationProps(em,e)],stateAttributesMapping:eL});return(0,r.jsxs)(S.Provider,{value:eq,children:[e$,!eD&&!ec&&ep&&!_&&void 0!==$&&(0,r.jsx)("input",{type:"hidden",form:D,name:ep,value:$,disabled:em}),(0,r.jsx)("input",{...ez,suppressHydrationWarning:!0})]})});var I=e.i(752080),D=e.i(945039),O=e.i(487811);let A=n.forwardRef(function(e,t){let{render:r,className:i,style:a,keepMounted:s=!1,...o}=e,l=function(){let e=n.useContext(S);if(void 0===e)throw Error((0,C.default)(14));return e}(),c=l.checked||l.indeterminate,{mounted:d,transitionStatus:u,setMounted:h}=(0,D.useTransitionStatus)(c),g=n.useRef(null),v={...l,transitionStatus:u};(0,I.useOpenChangeComplete)({open:c,ref:g,onComplete(){c||h(!1)}});let b={...p(l),...O.transitionStatusMapping,...m.fieldValidityMapping},x=(0,f.useRenderElement)("span",e,{ref:[t,g],state:v,stateAttributesMapping:b,props:o});return s||d?x:null});e.s(["Indicator",0,A,"Root",0,R],473127);var F=e.i(473127),F=F,U=e.i(108034),M=e.i(839221);e.s(["Checkbox",0,function({className:e,...t}){return(0,r.jsx)(F.Root,{"data-slot":"checkbox",className:(0,M.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input bg-form-control shadow-2xs outline-hidden transition-shadow group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",e),...t,children:(0,r.jsx)(F.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,r.jsx)(U.CheckIcon,{})})})}],669021)},19831,e=>{"use strict";var t=e.i(943306),r=e.i(96650),n=e.i(297068),i=e.i(935214),a=e.i(440944),a=a,s=e.i(614811),s=s,o=e.i(92470),l=e.i(339877),l=l,c=e.i(473140),c=c,d=e.i(746632),u=e.i(903090),m=e.i(251545),p=e.i(712173),f=e.i(182851),h=e.i(572085),g=e.i(598825),v=e.i(809382),b=e.i(669021),x=e.i(694308),y=e.i(801720),w=e.i(143865),k=e.i(839221);function N({children:e}
1){let[r,j]=(0,n.useState)(null),[C,S]=(0,n.useState)(""),[P,E]=(0,n.useState)(!0),[T,R]=(0,n.useState)(!1),I=(0,n.useRef)(null),D=(0,n.useRef)(0),O=(0,n.useRef)(null),A=(0,n.useRef)(null),{user:F}=(0,i.useUser)(),U=(0,n.useCallback)((e,t)=>{let r=I.current;r&&r.id===e&&(I.current=null,O.current?.(),O.current=null,j(t=>t?.id===e?null:t),S(""),E(!0),R(!1),r.resolve(t))},[]),M=(0,n.useCallback)(async e=>{let t=I.current;t&&(I.current=null,O.current?.(),O.current=null,t.resolve({decision:"dismissed"}));let r=D.current+1;return D.current=r,j({id:r,request:e}),S("select-connection"===e.kind?e.connections[0]?.id??"":""),E("select-connection"!==e.kind||!0===e.rememberRequired||!1!==e.rememberByDefault),R(!1),new Promise(e=>{I.current={id:r,resolve:e}})},[]);(0,n.useEffect)(()=>()=>{D.current+=1;let e=I.current;I.current=null,O.current?.(),O.current=null,e?.resolve({decision:"dismissed"})},[]);let _=F?.id??null,z=(0,n.useCallback)(async()=>{if(!r)return;let{id:e,request:t}=r;if("select-connection"===t.kind)return C?void U(e,{decision:"selected",connectionId:C,rememberSelection:!0===t.rememberRequired||P}):void d.toast.error("Choose an account before continuing");if(!_)return void d.toast.error("Sign in to connect integrations");let n=null,i=new AbortController;function a(){null!==n&&(d.toast.dismiss(n),n=null)}function s(){return I.current?.id!==e&&(a(),!0)}function o(e){d.toast.error(e,{duration:f.INTEGRATION_CONNECT_ERROR_TOAST_DURATION_MS,...null!==n?{id:n}:{}}),n=null}O.current=()=>{i.abort(),a()},R(!0);let l=window.open(h.INTEGRATION_CONNECT_LOADING_PATH,"_blank");try{await (0,h.launchIntegrationConnectFlow)({connectionId:t.requestedConnectionId,popup:l,onClose:e=>{!s()&&(e.completed&&e.successful||(a(),O.current=null,R(!1)))},onError:e=>{s()||(o(e.message),O.current=null,R(!1))},onFinalizeStart:()=>{if(!s()){var e;e=`Finishing ${t.provider.name} connection...`,n=d.toast.loading(e,{duration:1/0,...null!==n?{id:n}:{}})}},onSuccess:async({connectionId:r})=>{if(!s()){var i;i="reconnect-account"===t.kind?`Reconnected ${t.provider.name}.`:`Connected ${t.provider.name}.`,(0,f.showIntegrationConnectSuccessToastWhenFocused)({duration:f.INTEGRATION_CONNECT_SUCCESS_TOAST_DURATION_MS,message:i,toastId:n}),n=null,U(e,{decision:"connected",connectionId:r})}},providerSlug:t.provider.slug,returnTo:(0,g.getCurrentSafeIntegrationReturnTo)(),signal:i.signal,workspace:t.connectionRequirement.workspace,connectionOwner:t.connectionRequirement.owner})}catch(e){if(s())return;o(e instanceof Error?e.message:"Failed to start integration connect"),O.current=null,R(!1)}},[r,P,U,C,_]),q=null!==r;(0,n.useEffect)(()=>{let e;return q&&(e=setTimeout(()=>{A.current?.focus()},50)),()=>{e&&clearTimeout(e)}},[q]);let L=(0,n.useMemo)(()=>({requestIntegrationPrompt:M}),[M]),$=r?.request??null,B=r?.id??0;return(0,t.jsxs)(m.AppIntegrationPromptContext.Provider,{value:L,children:[e,(0,t.jsx)(x.Dialog,{open:q,onOpenChange:e=>{e||T||!r||U(r.id,{decision:"dismissed"})},children:(0,t.jsx)(x.DialogContent,{showCloseButton:!T,className:"sm:max-w-[425px]",children:$?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.DialogHeader,{className:"items-center pb-2 text-center",children:[(0,t.jsxs)("div",{className:"mx-auto mb-4 flex items-center justify-center gap-3",children:[$.appId?(0,t.jsx)(u.AppIcon,{app:{id:$.appId,name:$.appName||"",image:$.appImage},size:"md"}):null,(0,t.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-muted/50 text-muted-foreground shadow-sm ring-1 ring-border/50",children:(0,t.jsx)(s.default,{className:"size-4"})}),(0,t.jsx)(p.IntegrationProviderIcon,{displayName:$.provider.name,iconUrl:$.provider.iconUrl||null,providerSlug:$.provider.slug,size:"lg"})]}),(0,t.jsx)(x.DialogTitle,{className:"text-xl font-medium tracking-tight",children:"select-connection"===$.kind?`Choose a ${$.provider.name} account`:"connect-account"===$.kind?`Connect ${$.provider.name}`:`Reconnect ${$.provider.name}`}),(0,t.jsx)(x.DialogDescription,{className:"text-[15px] leading-relaxed text-balance",children:function(e){if("select-connection"===e.kind){let t=e.appName?.trim()||"This app";return`${t} needs a ${e.provider.name} account for "${e.bindingKey}".`}return"connect-account"===e.kind?`This request needs a connected ${e.provider.name} account before it can continue.`:`This request needs you to reconnect the selected ${e.provider.name} account before retrying.`}($)})]}),"select-connection"===$.kind?(0,t.jsxs)("div",{className:"mt-2 space-y-4",children:[(0,t.jsx)(w.ScrollArea,{className:"-mx-1 max-h-[280px] px-1",children:(0,t.jsx)(y.RadioGroup,{className:"gap-2.5",onValueChange:e=>S(String(e)),value:C,children:$.connections.map(e=>(0,t.jsxs)("label",{className:(0,k.cn)("group flex cursor-pointer items-start gap-4 roun
1ded-xl border p-4 transition-[background-color,border-color,box-shadow] duration-200",C===e.id?"border-primary bg-primary/5 ring-1 ring-primary/20":"border-border/70 bg-background hover:border-border hover:bg-muted/30"),children:[(0,t.jsx)(y.RadioGroupItem,{className:"mt-0.5",value:e.id}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 font-medium text-foreground",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),"reconnect_required"===e.status&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-error-soft px-2 py-0.5 text-[10px] font-semibold tracking-wide text-error",children:"Reconnect needed"})]}),(0,t.jsx)("p",{className:"mt-1 text-[13px] text-muted-foreground",children:"connected"===e.status?"Connected":"Account access expired"})]})]},e.id))})}),(0,t.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border/70 bg-muted/20 p-4 transition-colors hover:bg-muted/40",children:[(0,t.jsx)(b.Checkbox,{checked:P,className:"mt-0.5",disabled:!0===$.rememberRequired,onCheckedChange:e=>E(!0===e)}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"text-[14px] font-medium text-foreground",children:!0===$.rememberRequired?"Save this account":"Always use this account"}),(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:[!0===$.rememberRequired?"This setup needs ":"Future requests for ",'"',(0,t.jsx)("span",{className:"font-mono text-[11px] font-medium",children:$.bindingKey}),'"'," ",!0===$.rememberRequired?"to stay attached to this account.":"will reuse this account automatically."]})]})]})]}):(0,t.jsxs)("div",{className:"mt-2 rounded-xl border border-primary/10 bg-primary/5 p-4 text-sm text-primary/80",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5 font-medium text-primary",children:["connect-account"===$.kind?(0,t.jsx)(l.default,{className:"size-4.5"}):(0,t.jsx)(c.default,{className:"size-4.5"}),$.ctaLabel]}),(0,t.jsx)("p",{className:"mt-2 leading-relaxed",children:"Snow opens the provider connect flow in a new tab. When the connection succeeds, this tab continues your request automatically."})]}),(0,t.jsxs)(x.DialogFooter,{className:"mt-4 gap-2 sm:gap-0",children:[(0,t.jsx)(v.Button,{disabled:T,onClick:()=>U(B,{decision:"dismissed"}),type:"button",variant:"ghost",className:"w-full sm:w-auto",children:"Cancel"}),(0,t.jsx)(v.Button,{ref:A,autoFocus:!0,disabled:T,onClick:z,type:"button",className:"h-auto min-h-10 w-full py-2 text-center whitespace-normal sm:w-auto",children:T?(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(o.Loader2,{"aria-hidden":"true",className:"size-3.5 animate-spin"}),"Connecting…"]}):"select-connection"===$.kind?(0,t.jsxs)(t.Fragment,{children:["Continue ",(0,t.jsx)(a.default,{className:"ml-1.5 size-4"})]}):$.ctaLabel})]})]}):null})})]})}var j=e.i(302309),C=e.i(51313),S=e.i(9946),P=e.i(855911),E=e.i(779786),T=e.i(17948),R=e.i(542279),I=e.i(156419),D=e.i(14467),O=e.i(609736);function A({className:e}){return(0,t.jsx)("span",{"aria-hidden":"true",className:`size-3.5 animate-spin rounded-full border-2 border-current border-r-transparent ${e??""}`})}function F({children:e}){let r,[i,a]=(0,n.useState)(null),[s,o]=(0,n.useState)(!1),[l,c]=(0,n.useState)(null),[m,p]=(0,n.useState)("default"),[f,h]=(0,n.useState)(!1),[g,b]=(0,n.useState)(0),y=(0,n.useRef)(null),w=(0,n.useRef)([]),k=(0,n.useRef)(0),N=(0,n.useRef)(!0),U=(0,n.useCallback)(e=>{let t=k.current+1;k.current=t,y.current={...e,id:t},b(t),o(!1),c(null),p("default"),h(!1),a({id:t,request:e.request})},[]),M=(0,n.useCallback)((e,t)=>{let r=y.current;if(!r||r.id!==e)return;y.current=null,r.resolve(t);let n=w.current.shift();n?U(n):(a(t=>t?.id===e?null:t),p("default"),h(!1))},[U]),_=(0,n.useCallback)(async e=>{let t=[e.appId,e.permissionKey,e.targetDomain??e.targetUrl??"","builder_preview"===e.runtimePurpose?e.runtimeToken??"":""].join("|"),r=y.current?.identity===t?y.current:w.current.find(e=>e.identity===t);if(r)return r.promise;if(y.current&&w.current.length>=5)return(0,P.addAppLog)(e.appId,"warn",[`Permission prompt for ${e.permissionKey}${e.targetDomain?` (${e.targetDomain})`:""} was refused: 5 other prompts are already waiting for an answer.`],Date.now()),{decision:"dismissed"};let n=[],i=new Promise(e=>{n.push(e)}),a=n[0];if(!a)throw Error("Permission prompt promise did not initialize");let s={identity:t,request:e,promise:i,resolve:a};return y.current?w.current.push(s):U(s),i},[U]);(0,n.useEffect)(()=>(N.current=!0,()=>{N.current=!1,k.current+=1;let e=[...y.current?[y.current]:[],...w.current];for(let t of(y.current=null,w.current=[],e))t.resolve({decision:"dismissed"})}),[]);let z=(0,n.useCallback)(async({decision:e,scope:t,allowAllDomains:r,request:n})=>{if("once"===t)return{decision:e,scope:t,allowAllDomains:!1};c(r?"allow-all":e),o(!0);let i=new AbortController,a=setTimeout(()=>i.abort(),15e3);try{return await (0,I.runWorkspaceMutation)(async()=>{let a=await (0,I.workspaceFetch)("/api/apps/sdk/permissions/grant",{method:"POST",headers:{"Content-Type":"application/json","x-snow-permission-prompt":"1",...n.runtimeToken?{"x-snow-app-runtime-token":n.runtimeToken}:{}},signal:i.signal,body:JSON.stringify({appId:n.appId,permissionKey:n.permissionKey,decision:e,scope:t,allowAllDomains:r,targetUrl:n.targetUrl,source:n.source,operationId:n.operationId})}),s=await a.json().catch(()=>null);if(!a.ok||!((0,E.isObjectRecord)(s)&&("granted"===s.decision||"denied"===s.decision)&&"always"===s.scope&&"boolean"==typeof s.allowAllDomains&&"string"==typeof s.effectivePolicyVersion&&"boolean"==typeof s.declaredByApp&&"string"==typeof s.permissionKey&&T.APP_PERMISSION_KEYS.some(e=>e===s.permissionKey)&&(0,R.isEffectiveAppPolicy)(s.effectivePolicy))||void 0!==s.domainPattern&&null!==s.domainPattern&&"string"!=typeof s.domainPattern){let e=(0,E.isObjectRecord)(s)&&"string"==typeof s.error?s.error:null;throw Error(e||"Failed to save permission decision")}return{decision:s.decision,scope:s.scope,allowAllDomains:s.allowAllDomains,..."builder_preview"===n.runtimePurpose?{}:{effectivePolicyVersion:s.effectivePolicyVersion},effectivePolicy:s.effectivePolicy}})}catch(e){if((0,D.captureException)(e,{tags:{context:"app-permission-prompt-persist"},extra:{appId:n.appId,permissionKey:n.permissionKey,operationId:n.operationId}}),N.current){let t,r,n,i,a;(t=(0,E.isObjectRecord)(e)&&"string"==typeof e.name?e.name:"",r=e instanceof Error?e.message:"",n="u">typeof DOMException&&e instanceof DOMException,i=/\babort(?:ed)?\b|\btimeout\b/i.test(t),a=/\bfetch\b|Failed to fetch|NetworkError/i.test(r),n||"AbortError"===t||"NetworkError"===t||i||e instanceof TypeError&&/\bfetch\b|Failed to fetch|NetworkError/i.test(e.message)||a)?d.toast.error("Network error: failed to reach server"):d.toast.error("Failed to save permission decision")}return{decision:"dismissed"}}finally{clearTimeout(a),N.current&&(o(!1),c(null))}},[]),q=(0,n.useCallback)(async(e,t)=>{if(s)return;let r=y.current;if(!i||!r||r.id!==i.id)return;let n=r.id;if("dismissed"===e)return void M(n,{decision:"dismissed"});let a=t?.allowAllDomains?"always":t?.scope??"always";M(n,await z({decision:e,scope:a,allowAllDomains:t?.allowAllDomains,request:i.request}))},[s,i,z,M]),L=(0,n.useMemo)(()=>({requestPermission:_}),[_]),$=null!==i,B=i?.request,K=B?.permissionKey??"network.http",G=B?.appName??"This app",V=B?.targetDomain,W={id:B?.appId??"",name:G,image:B?.appImage};return(0,t.jsxs)(S.AppPermissionPromptContext.Provider,{value:L,children:[e,(0,t.jsx)(x.Dialog,{disablePointerDismissal:!0,open:$,onOpenChange:(e,t)=>
1{!(!e&&t&&O.NON_DISMISSIBLE_DIALOG_REASONS.has(t.reason))&&(e||s||!i||q("dismissed"))},children:(0,t.jsx)(x.DialogContent,{showCloseButton:!s,className:"sm:max-w-sm",children:"confirm-allow-all-domains"===m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.DialogHeader,{className:"items-center text-center",children:[(0,t.jsx)("div",{className:"mx-auto mb-1 flex size-10 items-center justify-center rounded-full bg-warning-soft",children:(0,t.jsx)(C.Shield,{className:"size-5 text-warning"})}),(0,t.jsx)(x.DialogTitle,{children:"Allow all domains?"}),(0,t.jsxs)(x.DialogDescription,{className:"text-balance",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:G})," ","will be able to connect to any domain without asking again."]})]}),(0,t.jsx)("div",{className:"rounded-lg border border-warning-outline bg-warning-soft px-3 py-2.5 text-[13px] leading-relaxed text-warning",children:"Future network requests will not show a permission prompt."}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(v.Button,{type:"button",onClick:()=>void q("granted",{scope:"always",allowAllDomains:!0}),disabled:s,"aria-busy":s&&"allow-all"===l,className:"w-full",children:s&&"allow-all"===l?(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(A,{}),"Saving…"]}):"Yes, allow all domains"}),(0,t.jsx)(v.Button,{type:"button",variant:"ghost",onClick:()=>p("default"),disabled:s,className:"w-full",children:"Go back"})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.DialogHeader,{className:"items-center text-center",children:[(0,t.jsx)("div",{className:"mb-1",children:(0,t.jsx)(u.AppIcon,{app:W,size:"lg"})}),(0,t.jsx)(x.DialogTitle,{className:"text-base",children:G}),(0,t.jsx)(x.DialogDescription,{className:"text-balance",children:(r={"network.http":V?`wants to connect to ${V}`:"wants network access","files.readwrite":"wants to access files","appContext.write":"wants to update app context","actions.call":"wants to run an action","ai.text":"wants to generate text with AI","ai.image":"wants to generate images with AI","chat.send":"can ask full Snow to act with your assistant access","schedule.read":"wants to read schedules","schedule.write":"can schedule full Snow to act with your workspace access","email.send":"wants to send an email","notifications.send":"wants to send notifications","device.location":"wants to access your location","device.clipboard":"wants to write to your clipboard","device.camera":"wants to use your camera","device.microphone":"wants to use your microphone","services.weatherapi":"wants to access weather and forecast data","services.serpapi":"wants to run specialized search","services.websearch":"wants to run web search","services.website":"wants to inspect public websites","app.openRoute":"wants to navigate to a route"},`${G} ${r[K]??`wants to use ${K}`}`)})]}),V?(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("code",{className:"rounded-md border bg-muted/50 px-2.5 py-1 text-xs font-medium text-foreground",children:V})}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(v.Button,{type:"button",onClick:()=>void q("granted",{scope:"always"}),disabled:s,"aria-busy":s&&"granted"===l,className:"w-full",children:s&&"granted"===l?(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(A,{}),"Saving…"]}):"Always allow"}),(0,t.jsx)(v.Button,{type:"button",variant:"outline",onClick:()=>void q("granted",{scope:"once"}),disabled:s,className:"w-full",children:"Allow once"}),(0,t.jsx)(v.Button,{type:"button",variant:"ghost",onClick:()=>void q("denied",{scope:"always"}),disabled:s,"aria-busy":s&&"denied"===l,className:"w-full text-muted-foreground",children:s&&"denied"===l?(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(A,{}),"Saving…"]}):"Don’t allow"})]}),"network.http"===K?(0,t.jsxs)("div",{className:"border-t pt-3",children:[(0,t.jsxs)(v.Button,{type:"button",variant:"ghost",size:"xs",onClick:()=>h(e=>!e),disabled:s,className:"w-full gap-1 font-normal text-muted-foreground hover:bg-transparent hover:text-foreground",children:["Advanced",(0,t.jsx)(j.ChevronDown,{className:`size-3 transition-transform ${f?"rotate-180":""}`})]}),f?(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(v.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>p("confirm-allow-all-domains"),disabled:s,className:"w-full text-xs font-normal text-muted-foreground hover:bg-muted hover:text-foreground",children:"Allow all domains for this app"})}):null]}):null]})},g)})]})}var U=e.i(38513),M=e.i(689034),_=e.i(729210),z=e.i(940358),q=e.i(720576),L=e.i(681891),$=e.i(526135),B=e.i(295400);function K(){let{user:e}=(0,i.useUser)(),{requiresPlus:r,isResolved:a}=(0,q.useSignupAccess)(),{timezonePreference:s,saveTimezonePreference:o,isSavingTimezone:l,isLoading:c}
1=(0,L.useUserPreferences)(),[d,u]=(0,n.useState)(null),m=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!e||c||!a||r||m.current===e.id)return;m.current=e.id;let t=(0,$.getDeviceTimezone)();if(t){if(!s?.name)return void o({name:t,mode:"auto"},{silent:!0});if("manual"!==s.mode){if(s.name===t){s.dismissed&&o({name:s.name,mode:"auto"},{silent:!0});return}s.dismissed!==t&&u(t)}}},[e,c,a,r,s,o]);let p=s?.name;if(!d||!p)return null;let f=async()=>{await o({name:d,mode:"auto"})&&u(null)};return(0,t.jsx)(B.TimezoneChangeDialog,{open:!0,deviceTimezone:d,storedTimezone:p,isSaving:l,onUpdate:()=>void f(),onKeep:()=>{o({name:p,mode:"auto",dismissed:d},{silent:!0}),u(null)},onClose:()=>u(null)})}var G=e.i(778366),V=e.i(581427);function W({children:e,fallback:r="page"}){let{workspace:i,status:a}=(0,V.useWorkspace)();if("loading"===a||"error"===a)return"inline"===r?(0,t.jsx)("div",{className:"size-8 shrink-0 rounded-full bg-muted/70",role:"status","aria-label":"error"===a?"Workspace unavailable":"Loading workspace"}):"error"===a?(0,t.jsxs)("div",{className:"flex min-h-[50vh] w-full flex-col items-center justify-center gap-3 text-center",role:"alert",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Could not load your workspace."}),(0,t.jsx)("button",{type:"button",className:"rounded-md border px-3 py-1.5 text-sm font-medium",onClick:()=>window.location.reload(),children:"Reload"})]}):(0,t.jsx)("div",{className:"min-h-[50vh] w-full","aria-hidden":"true"});let s=(0,t.jsx)(n.Fragment,{children:e},(0,G.workspaceScopeKey)(i));return"switching"===a?(0,t.jsx)("div",{className:"contents","aria-busy":"true",inert:!0,children:s}):s}e.s(["AppClientProviders",0,function({children:e,workspaceFallback:n="page",contentScope:i="workspace",initialWorkspace:a=null}){let{isSignedIn:s,isLoaded:o}=(0,r.useAuth)(),l=(0,t.jsx)(L.UserPreferencesProvider,{children:(0,t.jsx)(z.NotificationsProvider,{children:(0,t.jsx)(U.BillingProvider,{children:(0,t.jsxs)(M.PricingModalProvider,{children:[o&&s?(0,t.jsx)(K,{}):null,(0,t.jsx)(W,{fallback:n,children:(0,t.jsx)(_.FeedbackProvider,{children:(0,t.jsx)(F,{children:(0,t.jsx)(N,{children:e})})})})]})})})}),c=(0,t.jsx)(U.BillingProvider,{children:(0,t.jsx)(_.FeedbackProvider,{children:e})});return(0,t.jsx)(V.WorkspaceProvider,{initialWorkspace:a,children:"workspace"===i?l:c})}],19831)},513667,e=>{"use strict";e.s(["formatDateUTC",0,function(e){let t=new Date(e);if(isNaN(t.getTime()))throw Error(`Invalid date string: ${e}`);return t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZone:"UTC"})+" UTC"},"formatDateWithTimezone",0,function(e,t){let r=new Date(e);if(isNaN(r.getTime()))throw Error(`Invalid date string: ${e}`);return r.toLocaleString("en-US",{timeZone:function(e){if("string"!=typeof e)return"UTC";let t=e.trim();return 0===t.length||!function(e){try{return Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(t)?"UTC":t}(t),year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0})},"getUtcOffsetHours",0,function(e,t=new Date){let r;try{r=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).formatToParts(t).find(e=>"timeZoneName"===e.type)?.value}catch{return 0}let[,n,i,a]=r?.match(/GMT([+-])(\d{2}):(\d{2})/)??[];if(!n||!i||!a)return 0;let s=Number(i)+Number(a)/60;return"-"===n?-s:s}])},232697,e=>{"use strict";e.s(["clamp",0,function(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}])},813933,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},157200,e=>{"use strict";var t=e.i(232697);e.s(["SCROLL_EDGE_TOLERANCE_PX",0,1,"getMaxScrollOffset",0,function(e,t){return Math.max(0,e-t)},"normalizeScrollOffset",0,function(e,r){if(r<=0)return 0;let n=(0,t.clamp)(e,0,r),i=r-n,a=n<=1,s=i<=1;return a&&s?n<=i?0:r:a?0:s?r:n}])},306452,e=>{"use strict";var t=e.i(943306);let r="base-ui-disable-scrollbar";e.s(["styleDisableScrollbar",0,{className:r,getElement:e=>(0,t.jsx)("style",{nonce:e,href:r,precedence:"base-ui:low",children:`.${r}{scrollbar-width:none}.${r}::-webkit-scrollbar{display:none}`})}])},901442,e=>{"use strict";let t=(0,e.i(820750).default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["default",0,t])},966549,e=>{"use strict";var t=e.i(901442);e.s(["Mail",()=>t.default])}]);
2
3//# chunkId=01a0804f-85bc-70d3-ba5b-893846f94393

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.