1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`53a84583c378298a880447422b5515356e2bd785`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`19fd0e9f-40aa-4d53-a7c5-165e8048fe21`,e._sentryDebugIdIdentifier=`sentry-dbid-19fd0e9f-40aa-4d53-a7c5-165e8048fe21`)}catch{}})();import{i as e,n as t,o as n,r,t as i}from"./analytics-utils-KXMemtCl.js";import"./dist-Dqms9oTB.js";import{r as a,t as o}from"./config-DAOQfovT.js";function s(e){if(e.stage===`intro`)return`onboarding_slide_viewed`;if(e.stage===`auth`){if(e.step_name===`welcome`)return`auth_form_visited`;if(e.step_name===`auth`)return`auth_page_viewed`;if(e.step_name===`otp`)return`otp_screen_viewed`}return`onboarding_step_viewed`}function c(e){return e.stage===`form`&&(e.reason===`completed`||e.reason===`skipped`)?`onboarding_step_completed`:`onboarding_step_exited`}function l(e){if(!e||typeof e!=`object`)return`unknown`;let t=e,n=t.data&&typeof t.data==`object`?t.data:void 0,r=t.code??n?.code,i=t.status??t.statusCode??n?.httpStatus;switch(r){case`INVALID_OTP`:case`invalid_otp`:return`invalid_otp`;case`OTP_EXPIRED`:case`otp_expired`:return`otp_expired`;case`TOO_MANY_ATTEMPTS`:case`TOO_MANY_REQUESTS`:case`rate_limited`:return`rate_limited`;case`NETWORK_ERROR`:case`FETCH_ERROR`:case`network_error`:return`network_error`;case`INTERNAL_SERVER_ERROR`:case`server_error`:return`server_error`}if(i===429)return`rate_limited`;if(typeof i==`number`&&i>=500&&i<=599)return`server_error`;let a=t.name===`TRPCClientError`&&t.cause&&typeof t.cause==`object`?t.cause:t;return a.name===`TypeError`&&typeof a.message==`string`&&/failed to fetch|network request failed|fetch failed|load failed|networkerror/i.test(a.message)?`network_error`:`unknown`}function u(e){return{step_name:e.step_name,stage:e.stage,...e.flow!==void 0&&{flow:e.flow},...e.stage===`intro`&&e.slide_index!==void 0&&{slide_index:e.slide_index},...e.stage===`form`&&{step_index:e.step_index,total_steps:e.total_steps}}}var d=class{sink;now;step;viewed=!1;ended=!1;elapsedMs=0;activeSince;constructor(e,t=()=>performance.now()){this.sink=e,this.now=t}get currentStep(){return this.step&&u(this.step)}get hasExited(){return this.ended}get durationMs(){return Math.round(this.elapsedMs+(this.activeSince===void 0?0:Math.max(0,this.now()-this.activeSince)))}view(e,t=!0){(this.step?.step_name!==e.step_name||this.step.stage!==e.stage||this.step.flow!==e.flow)&&this.reset(),this.step=u(e);let n=this.viewed;return this.setActive(t),!n&&this.viewed}setActive(e){if(this.step&&!this.ended){if(e){if(this.activeSince===void 0&&(this.activeSince=this.now()),!this.viewed){this.viewed=!0;let e=u(this.step);this.emit(()=>this.sink.viewed(e))}}else this.activeSince!==void 0&&(this.elapsedMs+=Math.max(0,this.now()-this.activeSince),this.activeSince=void 0)}}exit(e,t){if(!this.step||!this.viewed||this.ended)return!1;this.setActive(!1),this.ended=!0;let n={...u(this.step),reason:e,duration_ms:this.durationMs,...t!==void 0&&{next_step_name:t}};return this.emit(()=>this.sink.exited(n)),!0}fail(e,t){if(!this.step||!this.viewed||this.ended)return!1;let n={...u(this.step),operation:e,error_code:l(t),duration_ms:this.durationMs};return this.emit(()=>this.sink.failed(n)),!0}reset(){this.step=void 0,this.viewed=!1,this.ended=!1,this.elapsedMs=0,this.activeSince=void 0}emit(e){try{e()}catch{}}},f=new Set([`authorization`,`cookie`,`proxy-authorization`,`referer`,`referrer`,`set-cookie`,`x-api-key`]),p=/^(?:%c\s*)?(?:>>|<<)\s+(?:query|mutation|subscription)\s+#\d+\s/;function m(e){return e.replace(/^\/unsubscribe\/[^/]+/,`/unsubscribe/[redacted]`).replace(/^\/demo-login\/[^/]+/,`/demo-login/[redacted]`).replace(/^\/app\/reports\/[^/]+\/print(?:\/|$)/,`/app/reports/[redacted]/print`)}function h(e){let t=/^[a-z][a-z\d+.-]*:\/\//i.test(e);if(!t&&!e.startsWith(`/`))return e;try{let n=new URL(e,`https://telemetry.invalid`);return n.pathname=m(n.pathname),n.search=``,n.hash=``,t?`${n.origin}${n.pathname}`:n.pathname}catch{return`[redacted-url]`}}function g(e){return h(e)}function _(e){return e&&Object.fromEntries(Object.entries(e).filter(([e])=>!f.has(e.toLowerCase())))}function v(e){let t=e.data?{...e.data}:void 0;if(e.category===`console`&&e.message&&p.test(e.message))return{...e,data:void 0};if(t)for(let e of[`url`,`from`,`to`])typeof t[e]==`string`&&(t[e]=h(t[e]));return{...e,data:t}}function y(e){return e.request&&(e.request.url=e.request.url?h(e.request.url):e.request.url,e.request.headers=_(e.request.headers),delete e.request.cookies,delete e.request.data,delete e.request.query_string),e.transaction&&=h(e.transaction),e.breadcrumbs&&=e.breadcrumbs.map(v),e}var b=new class{sessionId;constructor(){this.sessionId=this.generateSessionId(),t(o,a)}generateSessionId(){return n()}getBaseProperties(){let e=i();return e.session_id=this.sessionId,e}async track(t,n){await e(t,n)}sessionStarted(){this.track(`session_started`,this.getBaseProperties())}pageViewed(e){this.track(`page_viewed`,{...this.getBaseProperties(),page_path:g(e)})}uiCustomizationSnapshot(e){this.track(`ui_customization_snapshot`,{...this.getBaseProperties(),...e})}isNewRegistration(e){let t=new Date(e).getTime();return!isNaN(t)&&Date.now()-t<12e4}registrationCompleted(e){this.track(`registration_completed`,{...this.getBaseProperties(),auth_method:e})}socialAuthCompleted(e,t){this.track(`social_auth_completed`,{...this.getBaseProperties(),provider:t,...e!==void 0&&{flow:e}})}onboardingStepViewed(e){return e.stage===`auth`&&r(e=>{e.getUserId()!==void 0&&e.reset()}),this.track(s(e),{...this.getBaseProperties(),...e,...e.stage===`intro`&&{slide_name:e.step_name},platform:`web`})}onboardingStepExited(e){return this.track(c(e),{...this.getBaseProperties(),...e,platform:`web`})}onboardingStepFailed(e){return this.track(`onboarding_step_failed`,{...this.getBaseProperties(),...e,platform:`web`})}onboardingStarted(){this.track(`onboarding_started`,this.getBaseProperties())}onboardingFinished(e){this.track(`onboarding_finished`,{...this.getBaseProperties(),...e??{}})}searchQuestionSubmitted(){this.track(`search_question_submitted`,this.getBaseProperties())}searchResultsReceived(){this.track(`search_results_received`,this.getBaseProperties())}pwaInstallCompleted(){this.track(`pwa_install_completed`,this.getBaseProperties())}pwaAppLaunched(){this.track(`pwa_app_launched`,this.getBaseProperties())}paywallShown(e,t=`in_app`){this.track(`paywall_shown`,{...this.getBaseProperties(),platform:e,funnel_surface:t})}purchaseStarted(e,t=`in_app`){this.track(`purchase_started`,{...this.getBaseProperties(),provider:e,funnel_surface:t})}referralOfferFallback(e,t,n){this.track(`referral_offer_fallback`,{...this.getBaseProperties(),provider:e,plan:t,fallback_reason:n})}referralCtaViewed(e){this.track(`referral_cta_viewed`,{...this.getBaseProperties(),surface:e})}referralCtaClicked(e){this.track(`referral_cta_clicked`,{...this.getBaseProperties(),surface:e})}referralCtaDismissed(e){this.track(`referral_cta_dismissed`,{...this.getBaseProperties(),surface:e})}referralInviteShareInitiated(e){this.track(`referral_invite_share_initiated`,{...this.getBaseProperties(),method:e})}referralCodeApplied(e){this.track(`referral_code_applied`,{...this.getBaseProperties(),result:e})}referralRewardRedemptionStarted(e,t){this.track(`referral_reward_redemption_started`,{...this.getBaseProperties(),months:e,provider:t})}shotFormStarted(){this.track(`shot_form_started`,this.getBaseProperties())}shotPhaseStyleChanged(e,t,n){this.track(`shot_phase_style_changed`,{...this.getBaseProperties(),style:e,previous_style:t,source:n})}async setShotPhaseAnimationPreference(e){await r(t=>{let n=new t.Identify;n.set(`shot_phase_animation`,e),t.identify(n,{user_id:t.getUserId(),device_id:t.getDeviceId()})})}shotLogged(e){this.track(`shot_logged`,{...this.getBaseProperties(),...e})}weightFormStarted(){this.track(`weight_form_started`,this.getBaseProperties())}weightLogged(e){this.track(`weight_logged`,{...this.getBaseProperties(),...e})}sideEffectFormStarted(){this.track(`side_effect_form_started`,this.getBaseProperties())}sideEffectLogged(e){this.track(`side_effect_logged`,{...this.getBaseProperties(),...e})}moodFormStarted(){this.track(`mood_hunger_form_started`,this.getBaseProperties())}moodLogged(e){this.track(`mood_hunger_logged`,{...this.getBaseProperties(),...e})}healthDataDeleted(e){this.track(`health_data_deleted`,{...this.getBaseProperties(),data_type:e})}
1accountDeletionRequested(){return this.track(`account_deletion_requested`,this.getBaseProperties())}importFeatureUsed(e){this.track(`import_feature_used`,{...this.getBaseProperties(),...e})}reportsPageVisited(e){this.track(`reports_page_visited`,{...this.getBaseProperties(),...e})}reportViewed(e){this.track(`report_viewed`,{...this.getBaseProperties(),...e})}reportDownloaded(e){this.track(`report_downloaded`,{...this.getBaseProperties(),report_id:e})}reportExtraWaitTime(e){this.track(`report_extra_wait_time`,{...this.getBaseProperties(),...e})}affiliateRecViewed(e,t){this.track(`affiliate_rec_viewed`,{...this.getBaseProperties(),substance:e,medication:t})}affiliateRecClick(e,t){this.track(`affiliate_rec_click`,{...this.getBaseProperties(),substance:e,medication:t})}affiliateCrossClick(e,t){this.track(`affiliate_cross_click`,{...this.getBaseProperties(),substance:e,medication:t})}recSwipe(e){this.track(`rec_swipe`,{...this.getBaseProperties(),direction:e})}recOpen(e){this.track(`rec_open`,{...this.getBaseProperties(),recommendation_title:e})}inventoryPageVisited(e){this.track(`inventory_page_visited`,{...this.getBaseProperties(),...e})}inventoryAddVialStarted(){this.track(`inventory_add_vial_started`,this.getBaseProperties())}inventoryVialAdded(e){this.track(`inventory_vial_added`,{...this.getBaseProperties(),...e})}inventoryVialEdited(e){this.track(`inventory_vial_edited`,{...this.getBaseProperties(),...e})}inventoryVialStatusChanged(e){this.track(`inventory_vial_status_changed`,{...this.getBaseProperties(),...e})}inventoryToolCardClicked(e){this.track(`inventory_tool_card_clicked`,{...this.getBaseProperties(),tool_name:e})}inventoryVialDuplicated(e){this.track(`inventory_vial_duplicated`,{...this.getBaseProperties(),...e})}inventoryBudClicked(){this.track(`inventory_bud_clicked`,this.getBaseProperties())}async setUserId(e){await r(t=>{t.setUserId(e);let n=new t.Identify;n.set(`app_platform`,`web`),t.identify(n,{user_id:t.getUserId(),device_id:t.getDeviceId()})})}async setHasPremiumAccess(e){await r(t=>{let n=new t.Identify;n.set(`has_premium_access`,e),t.identify(n,{user_id:t.getUserId(),device_id:t.getDeviceId()})})}async clearUserId(){await r(e=>e.setUserId(void 0))}async resetIdentity(){this.sessionId=this.generateSessionId(),await r(e=>e.reset())}};export{l as a,d as i,v as n,y as r,b as t};
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.