PageSourceSearch

https://cdn.ridewithgps.com/rwgps-javascripts/prod/assets/recumbent-CLd34Dx3.js

js ridewithgps.com collected 2026-09-24 08:40:48 UTC 84,292 bytes, 9 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./UpdatePaymentMethodForm-CWda35HV.js","./rolldown-runtime-CoV_I8sK.js","./preload-helper-CIqjYnkU.js","./lib-D4hjuydu.js","./react-CpBNgyEA.js","./tslib.es6-B1fgmCPk.js","./currentUser-ZLh-7H7g.js","./camelcase-keys-DrA0nbZZ.js","./defineProperty-DFkOFzet.js","./queryUtils-KRoOkLjf.js","./conf-WCky0Xnd.js","./memoize-DLnnnNF9.js","./isObjectLike-DsV7sDD6.js","./isObject-DVm-psYx.js","./jsx-runtime-CFmj9-ij.js","./rwgpsNamespace-CFcYWu5p.js","./useMatch-BYzWN378.js","./matchContext-STIhUCXW.js","./useRouterState-Dx1bsOOt.js","./useRouter-DN4fF7P5.js","./with-selector-CtQSR-HR.js","./tiny-invariant-CRIHyWHI.js","./StandardLayout-CKg_T6se.js","./classnames-_T60xWH9.js","./GlobalNav-C99C0BIl.js","./Popover-PyQZwm__.js","./objectWithoutPropertiesLoose-BIIVLcyX.js","./useRootClose-pmCejA1e.js","./react-dom-ILBd_INF.js","./prop-types-CDvuojxB.js","./forwardRefFC-CXm8aifr.js","./portalContainer-CRJIrvBt.js","./base.module-Caz6osRX.js","./base-BHxo6Gho.css","./Popover-Wuiyw_9Z.css","./pickBy-eigzzLED.js","./mutation-UGJbo9I7.js","./hasIn-CVdFK-MK.js","./toString-D-yzh5p-.js","./isSymbol-BA-Gm31c.js","./_basePickBy-BHY2ui7i.js","./_baseAssignValue-faXFh5Lk.js","./_baseIteratee-H5pzsCh3.js","./CoreLink-BDh-dlgD.js","./ClientOnly-BhZhZo40.js","./utils-yQoHpKe4.js","./dist-3bNpuHVG.js","./routerContext-DcRvnMeP.js","./experiments-B2660v-v.js","./AdminMenu-MlXdJmvW.js","./IconSettings-CmzjGaN-.js","./icons.helpers-CrHavtjX.js","./GlobalNav.module-Bkts_k3G.js","./GlobalNav-CvIFJOh4.css","./PopoverLinkMenu-Bm65GNfG.js","./useEffectOnce-CE-OatwC.js","./_baseEach-OiKCQClF.js","./_baseForOwn-BBK_4zy0.js","./IdentityAvatar-DQ2rcir1.js","./AccountTypeBadge-IHJRtF57.js","./WithTooltip-BOlRy7Np.js","./floating-ui.dom-DG8ZbKfM.js","./WithTooltip-CqIYtxe2.css","./localization-DeOw48V4.js","./_createCompounder-DTyELR84.js","./_baseSlice-BdRrvcPk.js","./IconPremium-C9JOqyJJ.js","./AccountTypeBadge-DsFqO6Pf.css","./IdentityAvatar-8QCCP75V.css","./PopoverMenu-Ck3MrL9P.js","./CircleSpinner-dUIpp4sQ.js","./debounce-CdG2B2pi.js","./toNumber-fY65rPRY.js","./isEqual-BoctyvfG.js","./utils-BQE1H7ZV.js","./CircleSpinner-C7mNUYIH.css","./spinners-DdbrSlS-.js","./spinners-Dls8EncV.css","./PopoverMenu-jiP8TB6b.css","./PopoverLinkMenu-B7G3ASXB.css","./modalUtils-CRhN-Mf6.js","./config-Cb6Z6DXf.js","./globalSingletonState-C10S9dor.js","./softError-DB-KxzFm.js","./copyToClipboard-BZVb6uR6.js","./IconChevronDown-R1EqFI9-.js","./IconChevronUp-F8rDuu8o.js","./IconClose-D4o7Tq70.js","./NoticeBar-2pxpJIr0.js","./NoticeBar-BAPeezjE.css","./IconGlobe-CKgWmpka.js","./IconNotifications-D22Q72wm.js","./ErrorBoundary-BAOgmTjv.js","./sentryLazyLoader-CnnrlOVR.js","./mapbox-gl-supported-Dz6Hv5As.js","./versionString-DQB0H6I0.js","./ProfileButton-DsGXdkso.js","./ProfileImg-BZ3QrEDf.
1js","./urls-B7Ne4YiL.js","./isTruthy-BLUJH3lx.js","./ampliHelpers-CzqCoqg6.js","./geoUtils-Dmw8J6hQ.js","./queryClient-0BdSowcN.js","./textUtils-BMkuqUrf.js","./eventsQueries-CriLw8hX.js","./util-Es43GprZ.js","./snakeCase-BGPI7BjB.js","./Trip.helpers-CBdQ7pzA.js","./metricsCalculator-m3HGA5mp.js","./getConsole-BInUuGNl.js","./surfaceTypes-BCzzpT3S.js","./units-DdPGjmTo.js","./leftPad-BlHuf_zc.js","./waiverQueries-DWWvUbiN.js","./ProfileButton-D4225xsM.css","./GlobalSearch.module-B4XawUvy.js","./GlobalSearch-BvX_lXDD.css","./Button-Kou6tzhs.js","./Button-C0l2qKcP.css","./constants-B35EJ-L-.js","./CTA-Du6KRiHJ.js","./omit-DQO-lnBm.js","./_flatRest-CfA0Rzqm.js","./_baseFlatten-sv-4xvTv.js","./CTA-DkeTONNt.css","./useNotifications-Dd8BFMiG.js","./notificationsQuery-DHXRIUNh.js","./infiniteQueryOptions-CqLc14_4.js","./Notification-BQrQTwr9.js","./bylineLink-BDZNCsWa.js","./globalSearchTracking-DDRVoxDO.js","./useCollapse-DaScs5OT.js","./layoutConstants-Bhygrpq6.js","./usePreference-DxHNRn4k.js","./localStorageUtils-B1L6OJP2.js","./useHotnessDisplayHidden-SDeBjrn6.js","./GlobalNav-CukV1Xzh.css","./StandardLayout-tLdybGt-.css","./Hero-B396sf7P.js","./preloadImg-CBgU2fhA.js","./Hero-DwlMb7Kk.css","./ModalOverlay-BH6xGyHv.js","./ModalDialogConfig-DLJX_qyc.js","./useRefWrappedCallback-B3BZVhpp.js","./ModalLayer.module-w5WRXZVZ.js","./ModalLayer-B-BuS4qS.css","./ModalOverlay-DHwd9GXi.css","./PaymentMethodSection-BWBWb272.js","./InputField-hMjH8pqT.js","./useForwardingRef-3PTRFHCx.js","./InputField-BXCynCgE.css","./apple-pay-logo-C0ZkPgax.js","./detectPlatform-_XAYvf1g.js","./PaymentMethodSection-D-7Q9lIA.css","./PaymentSuccess-BkXw4Fei.js","./PaymentSuccess-1GJAVeeX.css","./loadTypekitKit-BSowjUqN.js","./UpdatePaymentMethodForm-g066DX7b.css","./CreateEventModal-DwW3LoZS.js","./useQueries-B579x9Wj.js","./helpers-DYW6sDmN.js","./dnd.esm-DKpFyo8r.js","./memoize-one.esm-DUFDM0eK.js","./es-CfbYYnSR.js","./redux-C0wvuj0C.js","./objectSpread2-nxBVUPXP.js","./FiltersPane-nVKci8Z1.js","./immer-BvgHQTlE.js","./negate-eFI_WQWn.js","./activityTypeIcon--RRj7H2X.js","./IconBicycle-DvXFwLaR.js","./IconBicyclePaved-BCc9HEjT.js","./IconBicycleUnpaved-BM0JRXoV.js","./IconWalk-DFs8kqvD.js","./IconSnow-QmeTW_5P.js","./IconInfoCircle-Drj5oDC4.js","./IconInfoCircleOutline-BnuJLABZ.js","./IconLocation-CiLugLqh.js","./IconSearch-CTFKqG32.js","./AutocompleteRichItem-D0CsufOK.js","./AutocompleteRichItem.module-CxBkus9r.js","./AutocompleteRichItem-B6yaGFnY.css","./AutocompleteRichItem-CyJdhzT3.css","./LocationAutocomplete-B0RAbt-n.js","./IconCloseCircle-D6x-GWUG.js","./LegacyIcon-CFinytkn.js","./LegacyIcon-5J7zTdJt.css","./Loadable-BGV2qpzf.js","./throttle-3J70e7Wh.js","./Loadable-Cq8yqqqM.css","./SearchHistory-prgJ6qIk.js","./isString-CdibhSpj.js","./uniqBy-Bz_SJw9-.js","./_baseUniq-DDkk1ZSY.js","./_baseFindIndex-Bd6_1O0y.js","./PersonCircleIcon-D_OtRLaJ.js","./SearchHistory-CUblRC9e.css","./coordinatesMatch-BCEBsJmF.js","./railsGeocode-B8NhblI6.js","./explore-DDVYGrVn.js","./_baseRest-Cl75R1v
1L.js","./isArrayLikeObject-BgoC5Dp0.js","./mapKeys-edgRFKjw.js","./request-CXNZOZ1a.js","./dateUtils-DLnSjbzB.js","./useExploreApi-Ck6VWJg5.js","./sum-C-BWby_g.js","./exploreQuerySlice-Bvy0HHuM.js","./ActivityType-DgO_1xvJ.js","./parseOrdering-HWqlfDqo.js","./v3Records-DMS8XoUm.js","./V3Record-jy9F7JJu.js","./immutable.es-a9cf6Awt.js","./pick-BezZeD73.js","./Club.legacy-bz_ivcnw.js","./Event.legacy-Ch6HwVT-.js","./Route.legacy-B5L0BwvS.js","./Trip.legacy-DatPnvKd.js","./exploreLocationFilters-C1pgiaBa.js","./useMetricUnits-CcXSW26M.js","./getIpLocation-jQ57yBJc.js","./historyUtils-BNExZ0xI.js","./GeocoderProximityContext-CjmrWiLF.js","./MapBoundsListener-Bmslf1XJ.js","./MapTypeContext-CKeZJ8as.js","./LocationAutocomplete-DkTA4gPu.css","./DistanceSelector-BCynAKbe.js","./SelectField-DnVkA6YB.js","./Chip-D-sOh3Lj.js","./IconInspect-8GKrIZad.js","./IconLocationOutline-BtzsBYv4.js","./Chip-DMbzi31X.css","./DistanceSelector-DkgRWqY0.css","./inspectRadiusForZoom-9U3wyAg0.js","./LabeledBackArrow-B3jQmiQ0.js","./IconChevronBack-DwCw6e54.js","./LabeledBackArrow-BDfeJx85.css","./LayoutUtils-D6zpRclo.js","./LayoutUtils-Bg2fcA62.css","./UpsellBadge-CAcim2SE.js","./UpsellBadge-4N2derr6.css","./activityTypeOptions-DS0Qcl4E.js","./activityTypeMessage-BaFJkOmW.js","./Checkbox-DaFiznwb.js","./Checkbox-CEAsLc3R.css","./abortUtils-Bo7LZp6g.js","./activityTypeOptions-BpCDA_8N.css","./SearchInput-Bu9Nvn3t.js","./findFirstExactMatch-D-b7GNRK.js","./filters-CBh6twhz.js","./DatePicker-CqPb9inr.js","./startOfWeek-DfyxyKbv.js","./buildMatchPatternFn-BbH2HLIq.js","./DatePicker-BfzegW0H.css","./RangeInput-DacfPbRm.js","./RangeInput-6J-qnbYx.css","./CollectionCheckboxDisplay-D_fsewh_.js","./CollectionCheckboxDisplay-Cx7eZ0PS.css","./smartDate-CX0-Fnp8.js","./CheckboxGroup-BiTDpV9P.js","./Checkbox-6rwUAbDc.js","./Checkbox-D3PAFz4O.css","./CheckboxGroup-DvKulg--.css","./intlMessages-DFtIe2ZQ.js","./TRouteSurfaces-DTQxFnL6.js","./VirtualizableFeatureContext-CzKeYixC.js","./OrderedLayers-Bdw0kOVd.js","./Source-5f2urqDI.js","./reducer-CYIfn_Z_.js","./Toast-O9SQoKYi.js","./IconWarning-ByMRvC8-.js","./Toast-CZ2YzTZb.css","./_baseDifference-BBoWwnza.js","./concat-D-6zyO6a.js","./forEach-CI0ih779.js","./_castFunction-DwGfaLXW.js","./map-H8iGXoC6.js","./_baseMap-wYu69FfC.js","./toInteger-E0mpc4Ru.js","./toFinite-B-fCKWTC.js","./tileServices-ZnV5uBKR.js","./getIntegerDevicePixelRatio-Cdmk51Pf.js","./clamp-D2bd7qHc.js","./rwgpsVectorSource-BbkDZ8nx.js","./TrackLine-DEYP6BiS.js","./DivOverlay-BqRJtqeZ.js","./Marker-0qG4cH9U.js","./useMapboxImage-dNh71OfK.js","./mapboxUtils-CfD3oyQU.js","./poiIconUtils-BgAadF8T.js","./manifestHelpers-Dsly3GLU.js","./compactManifest-BBW8WHww.js","./optimizedManifest-lGFCqngU.js","./TrackLine-DfXeDC6u.css","./CommunityPOILayerContext-pZ0yNahC.js","./routesRegistry-BnIvn3un.js","./constants-B69vIYAw.js","./MapSlotLayout-CiYJQq3d.js","./Match-bvIM-QNC.js","./BottomCenterControl-D0WWp24M.js","./useMagicalSlotDivs-C0Duw7Rw.js","./BottomCenterControl-B1pGpaUD.css","./MapV2Provider-BqaHZl-e.js","./MapLayersContext-CqLTIBtG.js","./nonReactUtils-uqJxxPXm.js","./showUpgradeModal-CBIhUYsk.js","./headlines-CcJOSWfu.js","./MapV2PaddingProvider-BDXktrqX.js","./MapboxControlContext-Clpp7wBI.js","./MapboxControlContext-BwP-alxI.css","./FireLayerContext-Bl9O5W7y.js","./MapboxStyleTransforms-C3e2tY8-.js","./makeHoverAndSelectionContext-DYn37QqV.js","./FullscreenContext-C6oKucO-.js","./MapSlotLayoutInner-Y3p1t7Sl.js","./Matches-Bcf7D-PM.js","./MapV2Map-BNWT2isY.js","./StreetViewControl.helpers-VHztZMsN.js","./WebGLAlertControl-C1DoDdp-.js","./FormFeedback-B9vng3R_.js","./FormFeedback-CNJjAoVi.css","./WebGLAlertControl-D71b8WlZ.css","./fullscreenMessages-Czpa7pK_.js","./GoogleStreetViewControl-WFPPQPjB.js","./ModalLayer-Ckx4xGzZ.js","./modal
1Keyboard-B5qtvgP_.js","./useScrimDismissGuard-DM78YbMJ.js","./useKeyboardShortcut-B3IbXB5k.js","./streetViewUpsell-BGaZcw-T.js","./useMapMenuMaxHeight-B8dkrkxd.js","./useTerrain3DEnabled-CNat12Sv.js","./CircleButton--k4Ytgzt.js","./CircleButton-_oa642iE.css","./mobileDeviceChecks-PDqMGBsr.js","./usePrevious-BH-NM3l6.js","./MapV2Map-XTcOIqSL.css","./layoutTokens-DyaHKrI7.js","./MapSlotLayoutInner-B2AbrMhV.css","./NoScrollLayout-Dp5Epsgc.js","./NoScrollLayout-CKkxmq2a.css","./MapSlotLayout-C5f9W86X.css","./getPoiLocalId-DTyWn6iA.js","./dedupePois-ClB6VyM0.js","./elevationQuery-B4oscEvo.js","./polylineDecoder-BQB-ISd5.js","./surfaceIcon-iflerhfH.js","./ListMinimal-Bg3ZszDi.js","./ListMinimal-DC72KDSk.css","./units-DrV19FLp.js","./TRouteSurfaces-EqeqO2cE.css","./filters-uJREoO1y.css","./FiltersPane-B_eHa-lR.css","./ResultListItem-CEuauKgZ.js","./DateTime-Ct0uUBMY.js","./ResultListItem-BWZgweSH.css","./MarkdownEditor-DZxAwnwV.js","./MarkdownContent-7UCVPFHF.js","./commonmark-DOACzG6t.js","./MarkdownContent-DFBNgKV2.css","./IconLink-DuxHCYf2.js","./UnderlineSelector-DoPgMVQc.js","./UnderlineSelector-DfViWgXP.css","./MarkdownEditor-DmqZOdSG.css","./LoadExisting-BzejmGzE.js","./IconFilters-N_mYlHkj.js","./TopoHeaderModal-BxeydzuM.js","./Topo-ClY7aYuf.js","./Topo-CiDZVfir.css","./TopoHeaderModal-C90o9tnn.css","./UserCard-CuQ9UTz0.js","./records-AeyDp2u3.js","./uniq-Cd8LF4WE.js","./HoverCard-BDp5dmtr.js","./UserCard-AO8GHBKv.css","./Result-BeLzV3G1.js","./IconBookmark-CL-hThOT.js","./IconCheckmark-fPZf8xI8.js","./SavedTooltipContent-D74HES4W.js","./orderBy-B8vxJbCm.js","./_baseOrderBy-BtthUFX2.js","./IconPeople-DWT0IGk6.js","./useIsSaved-bBE5rYP3.js","./Result-OHubK6Wo.css","./ResultsGroup-tEGrmkxz.js","./ResultsGroup-CWAueW4q.css","./RadioGroup-0U9FPVK3.js","./RadioGroup-CDFmc48i.css","./useOnUnmount-Df8ofFvV.js","./LoadExisting-BTQLU9W_.css","./IconPlus-BUioW5lQ.js","./TRouteList-B4ixFWJH.js","./IconBookmarkOutline-BGfTHglx.js","./IconDevicesGeneric-Cs9Gs7Ev.js","./IconSort-CZoC5PIX.js","./IconSortDescending-BKfd7gHz.js","./FiftyFiftyLayout-DgrLimtk.js","./GlobalFooter-BczRKFUb.js","./IconLogoX-CywWWg_b.js","./IconLogoInstagram-CoHn11ki.js","./GlobalFooter-F5uMbA6Z.css","./SectionBox-BHn9c0CZ.js","./Card-BsN51wCY.js","./Card-BcHE2C9I.css","./SectionBox-BYG6YQR1.css","./FiftyFiftyLayout-SejtstNC.css","./SaveMenu-D8XfOENk.js","./IconCollections-DAJ36fpv.js","./IconPlusBold-CzO6o_2H.js","./useCollectionsByKind-U24NYSdV.js","./useCollectionsByKind-Br7fOnvP.css","./saveMenuAmpli-DJ9rSoTl.js","./TRouteList-YwrF69ro.css","./AssetRow-DxVkcznQ.js","./IconCalendar-D8j7uy9l.js","./IconMapOutline-PzhbIn5k.js","./IconTrendingUp-ywURbXGI.js","./getDisplayableActivityTypes-BWmaHRaB.js","./useActivityTypesText-
1Dq1XaYPg.js","./Badge-B0mkap9s.js","./Badge.module-BZr3wjfr.js","./Badge-hET_CR3-.css","./AssetRow-lwYIeljK.css","./useSelectedChipIdx-BikJVWfD.js","./useSelectedChipIdx-BvOOYZZA.css","./HorizontalControl-DtfDQLUe.js","./HorizontalControl-8oQm7OSf.css","./UpdatedAt-DHRgZYn-.js","./IconSync-ByYiOktg.js","./metadataBuilder-Cnk3dEd3.js","./mapValues-CUyArg2D.js","./metadataBuilder-fPcrYPg0.css","./VisibilitySelect-B4bCiXHS.js","./TimeInput-wuq5jSnY.js","./IconTimeOutline-B58TExqP.js","./TimeInput-CWzg68TS.css","./FieldSet-DUtgvvua.js","./FieldSet-CQiTetEf.css","./useDropIndicator-ofMwwLuX.js","./useDropIndicator-Bl4PKASZ.css","./CollectionTRouteListItem-Ba6HhXsA.js","./MergedTeensyGallery-CZjOO1mh.js","./TeensyGallery-DpS2kis6.js","./Image-BVt0mjmH.js","./Image-BneyzM83.css","./showGallery-Db4VN-TI.js","./client-VDHELPtq.js","./StandaloneLocaleProvider-10wqC4y7.js","./Gallery-k7QDmskk.js","./galleryTypes-yPzQ3mJu.js","./TeensyGallery-B3KZ962X.css","./communityPhotosQuery-B3p6h25p.js","./dedupCommunityPhotos-B71bKelu.js","./useInViewport-DcG5GGtP.js","./MergedTeensyGallery-C7m480NA.css","./IdentityByline--T5WP7El.js","./IdentityByline-XS88SRtz.css","./accountLevel-CxUlQ5-t.js","./CollectionTRouteListItem-CCAuurrB.css","./useEventListSelection-C6lhS9sO.js","./EventModal-C6x2vjDC.js","./IconVisibilityOff-wF160wRw.js","./UserRow-1ch5Txv5.js","./useFollowActions-CJfiA9EL.js","./followsQueries-BT1fNy_B.js","./usersQuery-BB-Wb1f7.js","./intlMessages-Crf2Yvg2.js","./useStableSizeHoverContent-BWNRFG3W.js","./useStableSizeHoverContent-eWGG09wi.css","./UserRow-DsuxRx9X.css","./EventStartEndRow-DpMPKWOu.js","./IconCalendarToday-BSh2NmW0.js","./CardListRow-CQY26uG4.js","./CardListRow-BMh9TMFt.css","./EventSeries-Cm91YyUS.js","./EventStartEndRow-BMAQww1q.css","./JoinEventButton-DmHjFywY.js","./eventParticipantsQueries-BP9-scVr.js","./JoinEventButton-g70K4FlT.css","./shared-CoSDEV5c.js","./IconCopyOutline-BZbJBDG7.js","./IconPeopleOutline-vXTjXoce.js","./IconRoute-BN7N96J3.js","./TruncatableText-COlLEHhy.js","./TruncatableText-SMlRTPnX.css","./CalendarThumb-DreHgGr8.js","./CalendarThumb-srqAvKZY.css","./eventMessages-DffKoXhp.js","./shared-C9luBuJO.css","./intlMessages-Bhs1CBrf.js","./EventParticipantsModal-BrXXtQia.js","./IconTrashOutline-DLWaOEdC.js","./EventParticipantsModal-D4l1TbYo.css","./EventModal-DyaHI-qZ.css","./StatsBlock-wTUXSpxa.js","./StatsBlock-B_thWXIk.css","./features-A-sP-0jz.js","./ExplorePromoModal-CLn43wgQ.js","./ExplorePromoModal-DVKIdyq3.css","./messages-C4NvWHVg.js","./upsell-DOoiFx-L.js","./messages-Br51X5Ao.js","./useHover-CXkp_gFQ.js","./useSelectInputOnMount-L0bwXjfc.js","./helpers-D0i2Z0PL.css","./Calendar.migrate-CgTBDuW1.js","./IconEdit-D8tP2Bqj.js","./Calendar-DX2CKMmp.css","./CreateEventModal-B3SQzk5n.css"])))=>i.map(i=>d[i]);
2import{o as e}from"./rolldown-runtime-CoV_I8sK.js";import{t}from"./rwgpsNamespace-CFcYWu5p.js";import{At as n,c as r,d as i,ft as a,gt as o,h as s,jt as c,n as l,nt as u,p as d,x as f,y as p}from"./currentUser-ZLh-7H7g.js";import{t as m}from"./queryClient-0BdSowcN.js";import{a as h}from"./pickBy-eigzzLED.js";import{t as g}from"./react-CpBNgyEA.js";import{t as _}from"./jsx-runtime-CFmj9-ij.js";import{t as v}from"./_baseAssignValue-faXFh5Lk.js";import{n as y}from"./useEffectOnce-CE-OatwC.js";import{o as ee,t as b}from"./records-AeyDp2u3.js";import{C as x,a as S,n as te,t as C}from"./localization-DeOw48V4.js";import{t as w}from"./preload-helper-CIqjYnkU.js";import{t as T}from"./defineProperty-DFkOFzet.js";import{r as E,t as ne}from"./experiments-B2660v-v.js";import{D as re,h as ie}from"./utils-BQE1H7ZV.js";import{G as D,b as ae}from"./ampliHelpers-CzqCoqg6.js";import{N as O,v as k}from"./geoUtils-Dmw8J6hQ.js";import{a as A,c as j,i as M,s as N}from"./lib-D4hjuydu.js";import"./Trip.helpers-CBdQ7pzA.js";import{t as P}from"./client-VDHELPtq.js";import{t as oe}from"./AdminMenu-MlXdJmvW.js";import{n as se,t as ce}from"./monkeyPatchRemoveChild-BGojOXai.js";import{i as le,t as ue}from"./GlobalNav-C99C0BIl.js";import{t as F}from"./dist-3bNpuHVG.js";import{t as de}from"./classnames-_T60xWH9.js";import{t as fe}from"./IconClose-D4o7Tq70.js";import{n as I}from"./CTA-Du6KRiHJ.js";import{n as pe}from"./modalUtils-CRhN-Mf6.js";import{n as me,t as he}from"./sentryLazyLoader-CnnrlOVR.js";import{t as L}from"./ErrorBoundary-BAOgmTjv.js";import{t as R}from"./Button-Kou6tzhs.js";import{n as ge,t as _e}from"./WithTooltip-BOlRy7Np.js";import{t as z}from"./CircleSpinner-dUIpp4sQ.js";import"./spinners-DdbrSlS-.js";import{i as ve}from"./base.module-Caz6osRX.js";import{t as ye}from"./prop-types-CDvuojxB.js";import{i as B}from"./usePreference-DxHNRn4k.js";import{t as V}from"./IconInfoCircleOutline-BnuJLABZ.js";import{t as be}from"./ModalLayer-Ckx4xGzZ.js";import"./ModalLayer-CgkTKV-J.js";import{t as xe}from"./SignupModalOnLoad-ClQ_Xnqc.js";import{i as Se}from"./manifestHelpers-Dsly3GLU.js";import"./optimizedManifest-lGFCqngU.js";import{i as Ce,n as we}from"./poiIconUtils-BgAadF8T.js";import{t as Te}from"./Marker-0qG4cH9U.js";import{t as Ee}from"./lazyLoadGoogle-BSZ-x12l.js";import{t as De}from"./StandaloneLocaleProvider-10wqC4y7.js";import{t as Oe}from"./HelpPopover.module-z0TJhsNo.js";import{t as ke}from"./immutable.es-a9cf6Awt.js";import{t as Ae}from"./Route.legacy-B5L0BwvS.js";import"./modulepreload-polyfill-BgKBuFqr.js";import{t as je}from"./ModalOverlay-BH6xGyHv.js";import{t as Me}from"./MapV2-BvvCcDGY.js";import{t as Ne}from"./SetHomeLocationModal-CXNVXeuE.js";import{n as Pe}from"./SignupModal-CVHxybRv.js";import{t as Fe}from"./LoginModalOverlay-Bipg9LSm.js";import{r as Ie,t as Le}from"./DataProvider-DLWKDG_U.js";import{n as Re}from"./locale-Bh8Sg5aC.js";import{t as ze}from"./HelpPopover-BH0sv6un.js";import{t as Be}from"./Gallery-k7QDmskk.js";import{t as Ve}from"./es6-promise-pool-DdEzDlLf.js";import{a as He}
2from"./maplibre-DGEDp1Zp.js";import{n as Ue}from"./DroppablePage-JRSbOvAb.js";import{t as We}from"./SelectCreatable-D7XdfE3w.js";import{t as Ge}from"./ConfirmationDialog-PiuusBz3.js";import{n as Ke}from"./RadioGroup-0U9FPVK3.js";import{t as qe}from"./react-textarea-autosize.browser.esm-rE5qMMs5.js";import{t as Je}from"./PoiIconImg-DGXzTEgN.js";import{n as Ye}from"./ExportFormats-CnmWRHaa.js";import{t as Xe}from"./HoverCard-BDp5dmtr.js";import{t as Ze}from"./MountOnHoverCard-BpRB9BFB.js";import{t as Qe}from"./TRouteCard-CrkEA4Tq.js";import{n as $e}from"./esm-3pH46__L.js";import{c as et}from"./CarouselModal-Dy_nY-ye.js";import{n as tt}from"./TopoHeaderModal-BxeydzuM.js";import"./UpgradeModal-z07oPtbC.js";import{t as nt}from"./hooks-CZRZPAvd.js";import{t as rt}from"./VisibilitySelect-B4bCiXHS.js";function it(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];v(r,i[0],i[1])}return r}var H=e(g()),U=_(),at=M({pageNoLongerSupported:{id:`LegacyTSPDeprecationModal.pageNoLongerSupported`,defaultMessage:`This page is no longer supported`,description:`Modal title; shown on a page which is no longer maintained by the software developers`},updateToCurrentLayout:{id:`LegacyTSPDeprecationModal.updateToCurrentLayout`,defaultMessage:`Update To Current Layout`,description:`Button title; when clicked, the current page reloads with the latest software version, which has a different visual layout.`},legacyExplain:{id:`LegacyTSPDeprecationModal.legacyExplain`,defaultMessage:`
3    <p>We are no longer supporting this legacy version of the Ride Page.</p>
4
5    <p>
5In 2019 we introduced an updated Ride Page layout. At the time, we kept the legacy Ride Page available as an option for users that preferred the previous layout. Over the coming months,  features on this legacy page will no longer function.</p> 
6
7    <p>You can continue to use the legacy layout knowing that some of the functionality is no longer supported or click the update link below to be use the current layout.</p> 
8
9    <p>As always, <a>contact us</a> with questions or for further assistance.</p>`},legacyRidePageSubj:{id:`LegacyTSPDeprecationModal.legacyRidePageSubj`,defaultMessage:`Legacy Ride Page`,description:`email subject line; refers to this page that's no longer maintained`}}),ot=({onRequestClose:e})=>{let t=x(),[n,r]=E(`trsp_redesign`),[i,a]=E(`trsp_redesign_option`);y(()=>{!i&&!n&&a.mutate(`optIn`)});let[o,s]=re(!1);return(0,U.jsx)(je,{title:t(at.pageNoLongerSupported),maxWidth:`600px`,onRequestClose:e,footer:(0,U.jsx)(I,{onClick:async()=>{s(!0),await r.mutateAsync(`optIn`),window.location.reload()},children:o?(0,U.jsx)(z,{}):t(at.updateToCurrentLayout)}),children:t(at.legacyExplain,{p:(...e)=>(0,U.jsx)(`p`,{children:e}),a:(...e)=>(0,U.jsx)(`a`,{href:`mailto:[email protected]?subject=${t(at.legacyRidePageSubj)}`,children:e})})})},st=86400*14,ct=e=>{let[t,n]=B(`legacy_tsp_deprecation_last_seen`,0),[r]=(0,H.useState)(()=>t+st<Date.now()/1e3),i=(0,H.useCallback)(()=>{r&&n(Date.now()),e.onRequestClose()},[e,n,r]);if(r)return(0,U.jsx)(ot,{onRequestClose:i})},lt=e(Ve()),ut={horizontalColumns:`_horizontalColumns_1ul3w_1`},W=e(de()),G=e(ye()),K={formContainer:`_formContainer_1195t_1`,checkboxLabel:`_checkboxLabel_1195t_21`,descriptionInput:`_descriptionInput_1195t_34`,locationInput:`_locationInput_1195t_41`,errorMsg:`_errorMsg_1195t_54`,errorHighlight:`_errorHighlight_1195t_59`,formErrors:`_formErrors_1195t_63`,formGroup:`_formGroup_1195t_72`,combinePois:`_combinePois_1195t_78`,combineWarning:`_combineWarning_1195t_83`,combineConfirmActions:`_combineConfirmActions_1195t_93`,formContents:`_formContents_1195t_100`,actions:`_actions_1195t_106`,photos:`_photos_1195t_112`,photoGrid:`_photoGrid_1195t_116`,photo:`_photo_1195t_112`,removePhoto:`_removePhoto_1195t_133`},dt=class extends H.PureComponent{constructor(e){super(e),T(this,`onTriggerFileBrowser`,()=>{this._dropzone&&this._dropzone.current?.open()}),T(this,`onNameChange`,({target:{value:e}})=>{this.setState({name:e})}),T(this,`onDescriptionChange`,({target:{value:e}})=>{this.setState({description:e})}),T(this,`onUrlChange`,({target:{value:e}})=>{this.setState({url:e})}),T(this,`onCombineIntoChange`,e=>{this.props.fetchPoi(e),this.setState({combineInto:e})}),T(this,`onSearchLocationChange`,({target:{value:e}})=>{this.setState({searchLocation:e})}),T(this,`onSearchLocationKeyPress`,e=>{e.key===`Enter`&&(e.preventDefault(),this.props.onLocationSearch(this.state.searchLocation))}),T(this,`onTagNamesChange`,e=>{let t=e.map(e=>e.value);this.setState({tagNames:t})}),T(this,`onSelectedRouteChange`,e=>{this.setState({routesSelected:{...this.state.routesSelected,[+e.target.value]:e.target.checked}})}),T(this,`poiState`,()=>{let{name:e,description:t,url:n,tagNames:r}=this.state;return{name:e,description:t,url:n,tagNames:r}}),T(this,`onSubmit`,e=>{e.preventDefault(),this.props.combinePois?this.setState({showCombineConfirm:!0}):this.save()}),T(this,`onConfirmCombine`,()=>{this.setState({showCombineConfirm:!1}),this.save()}),T(this,`save`,()=>{let{combinePois:e}=this.props,{routesSelected:t}=this.state;this.props.onSave({poi:this.poiState(),routeIds:Object.keys(t).filter(e=>t[e]),poiIds:e&&e.map(e=>e.id)})});let{poi:t,routes:n,combinePois:r}=e;this.state={searchLocation:``,name:t.name,description:t.description,url:t.url,tagNames:t.tagNames,routesSelected:it(n.map(e=>[e.id,!0])),combineInto:r?`${r[0].id}`:void 0,showCombineConfirm:!1},this._dropzone=(0,H.createRef)()}componentDidUpdate(e,t){let{poi:n}=this.props;e.poi&&e.poi.id!==n.id&&(this.setState({name:n.name,description:n.description,url:n.url,tagNames:n.tagNames,photoIds:n.photoIds}),this.props.unsetBounds())}render(){let{combinePois:e,routes:t,tags:n,onCancel:r,photoIds:i,onPhotosDrop:a,onPhotoRemoved:o,onFileRemoved:s,files:c,pendingUploads:l}=this.props,{routesSelected:u,name:d,description:f,url:p,tagNames:m,combineInto:h,showCombineConfirm:g}=this.state,_=n.map(e=>({value:e,label:e})),v=m.map(e=>({value:e,label:e})),y=this.props.errors&&this.props.errors.toObject()||{};(y.lat||y.lng)&&(y.base||=[],y.base.push(`You must choose a location for the POI`));let ee=e?.map(e=>[String(e.id),e.name])??[],b=e?.find(e=>String(e.id)===h)?.name,x=e?e.length-1:0,S=c.size+i.size;return(0,U.jsxs)(`div`,{className:K.formContainer,children:[(0,U.jsx)(Ue,{zoneRef:this._dropzone,multiple:!0,onDrop:a,accept:`image/*`,children:(0,U.jsxs)(`form`,{onSubmit:this.onSubmit,children:[(0,U.jsxs)(`div`,{className:K.formContents,children:[y.base&&(0,U.jsx)(`div`,{className:K.formErrors,children:y.base}),e&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:K.combineWarning,children:[`Combining keeps the POI you choose below and `,(0,U.jsx)(`strong`,{children:`permanently deletes`}),` the other`,` `,x===1?`POI`:`${x} POIs`,`, including`,` `,x===1?`its`:`their`,` photos. Routes using a deleted POI will use the kept POI instead.`]}),(0,U.jsxs)(`div`,{className:(0,W.default)(K.formGroup,K.combinePois),children:[(0,U.jsx)(`label`,{children:`Combine POIs into`}),(0,U.jsx)(Ke,{name:`combinePois`,options:ee,selected:h,onChange:this.onCombineIntoChange})]})]}),(0,U.jsxs)(`div`,{className:K.formGroup,children:[(0,U.jsx)(`label`,{children:`Jump to a Location`}),(0,U.jsxs)(`div`,{className:K.locationInput,children:[(0,U.jsx)(`input`,{onChange:this.onSearchLocationChange,onKeyPress:this.onSearchLocationKeyPress}),(0,U.jsx)(`span`,{className:`icon icon-search`})]})]}),(0,U.jsxs)(`div`,{className:K.formGroup,children:[(0,U.jsxs)(`label`,{children:[`Name *`,y.name&&(0,U.jsx)(`span`,{className:K.errorMsg,children:y.name})]}),(0,U.jsx)(`div`,{className:(0,W.default)(y.name&&K.errorHighlight),children:(0,U.jsx)(`input`,{value:d,onChange:this.onNameChange})})]}),(0,U.jsxs)(`div`,{className:K.formGroup,children:[(0,U.jsx)(`label`,{children:`Tags`}
9),(0,U.jsx)(We,{value:v,onChange:this.onTagNamesChange,options:_})]}),(0,U.jsxs)(`div`,{className:K.formGroup,children:[y.url&&(0,U.jsx)(`div`,{className:K.errorMsg,children:y.url}),(0,U.jsx)(`label`,{children:`URL`}),(0,U.jsx)(`div`,{children:(0,U.jsx)(`input`,{value:p,onChange:this.onUrlChange})})]}),(0,U.jsxs)(`div`,{className:K.formGroup,children:[(0,U.jsx)(`label`,{children:`Description`}),(0,U.jsx)(`div`,{className:K.descriptionInput,children:(0,U.jsx)(qe,{value:f,onChange:this.onDescriptionChange})})]}),(0,U.jsxs)(`div`,{className:K.photos,children:[S===0&&!l&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h2`,{children:`Photos`}),(0,U.jsxs)(`div`,{children:[`Drag photos onto this page or `,(0,U.jsx)(`a`,{onClick:this.onTriggerFileBrowser,children:`click here`}),` to add photos to this POI.`]})]}),l>0&&(0,U.jsxs)(`p`,{children:[(0,U.jsx)(z,{size:16}),` Uploading `,l,` photo`,l>1?`s`:``,`...`]}),(0,U.jsxs)(`div`,{className:K.photoGrid,children:[i.map(e=>(0,U.jsxs)(`div`,{className:K.photo,children:[(0,U.jsx)(`div`,{className:K.removePhoto,onClick:()=>o(e),children:(0,U.jsx)(fe,{size:16})}),(0,U.jsx)(`img`,{src:le(e)})]},e)),c.map((e,t)=>(0,U.jsxs)(`div`,{className:K.photo,children:[(0,U.jsx)(`div`,{className:K.removePhoto,onClick:e=>s(e,t),children:(0,U.jsx)(fe,{size:16})}),(0,U.jsx)(`img`,{src:e.preview})]},e.size))]}),S>0&&(0,U.jsx)(`div`,{children:(0,U.jsx)(_e,{content:`You can also add photos by dragging them onto this page`,children:(0,U.jsx)(`a`,{onClick:this.onTriggerFileBrowser,children:`Add photos`})})})]}),t&&t.length>0&&!e&&(0,U.jsxs)(`div`,{className:K.formGroup,children:[(0,U.jsx)(`label`,{children:`Routes`}),t.map(e=>(0,U.jsxs)(`label`,{className:K.checkboxLabel,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:u[e.id],onChange:this.onSelectedRouteChange,value:e.id}),(0,U.jsx)(`a`,{href:`/routes/${e.id}`,target:`showRoute`,children:e.name})]},e.id))]})]}),(0,U.jsxs)(`div`,{className:K.actions,children:[(0,U.jsx)(I,{link:!0,onClick:r,margins:!1,children:`Cancel`}),(0,U.jsx)(I,{button:!0,type:`submit`,margins:!1,children:`Save`})]})]})}),g&&(0,U.jsxs)(Ge,{title:`Permanently delete ${x} POI${x===1?``:`s`}?`,danger:!0,noFooter:!0,onConfirm:this.onConfirmCombine,onRequestClose:()=>this.setState({showCombineConfirm:!1}),children:[(0,U.jsxs)(`p`,{children:[`“`,b,`” will be kept. The other`,` `,x===1?`POI`:`${x} POIs`,` — including`,` `,x===1?`its`:`their`,` photos — will be permanently deleted. This cannot be undone.`]}),(0,U.jsxs)(`div`,{className:K.combineConfirmActions,children:[(0,U.jsx)(I,{link:!0,margins:!1,onClick:()=>this.setState({showCombineConfirm:!1}),children:`Cancel`}),(0,U.jsx)(I,{button:!0,type:`button`,primary:!0,inline:!0,danger:!0,margins:!1,onClick:this.onConfirmCombine,children:`Combine POIs`})]})]})]})}};T(dt,`propTypes`,{onSave:G.default.func.isRequired,onCancel:G.default.func.isRequired,onLocationSearch:G.default.func.isRequired,poi:G.default.object.isRequired,tags:G.default.array.isRequired,errors:G.default.object,combinePois:G.default.array});var ft={mapContainer:`_mapContainer_aa6mf_1`,clickOnMapInstruction:`_clickOnMapInstruction_aa6mf_10`},pt={typePickerContainer:`_typePickerContainer_1veqa_1`,icon:`_icon_1veqa_12`},mt=2165,ht=({clubId:e,onTypeSelected:t})=>{let n=e===mt?[...Object.keys(Ce),`bikepacking_com`]:Object.keys(Ce),r=Object.values(n).map(e=>(0,U.jsx)(Je,{poiTypeName:e,variant:`poi`,state:`flat`,size:`medium`,className:pt.icon,onClick:()=>t(e)},e));return(0,U.jsx)(`div`,{className:pt.typePickerContainer,children:r})},gt=class extends H.PureComponent{constructor(e){super(e),T(this,`_mapRef`,void 0),T(this,`onMapClick`,({e})=>{!this.state.showTypePicker&&!this.props.latLng&&this.setState({showTypePicker:!0}),this.props.onLatLngChange({lat:e.lngLat.lat,lng:e.lngLat.lng})}),T(this,`onMarkerClick`,()=>{this.setState({showTypePicker:!0})}),T(this,`onMarkerMoveEnd`,e=>{e&&this.props.onLatLngChange(e)}),T(this,`onTypeIconClick`,e=>{this.setState({showTypePicker:!1}),this.props.onPoiTypeNameChange(e)});let t=O();`bounds`in this.props&&(t=O({bounds:[this.props.bounds.getSouthWest
9(),this.props.bounds.getNorthEast()]})),`center`in this.props&&(t=O({center:this.props.center,zoom:15})),this._mapRef=(0,H.createRef)(),this.state={showTypePicker:!!e.latLng,initialViewport:t}}UNSAFE_componentWillReceiveProps(e){!this.props.latLng&&e.latLng&&this.setState({showTypePicker:!0})}componentDidUpdate(e){let{bounds:t}=this.props;e.bounds!==t&&t&&this._mapRef?.current?._mapEngine?.jumpTo(O({bounds:[t.getSouthWest(),t.getNorthEast()]}))}render(){let{onBoundsChange:e,latLng:t,poiTypeName:n,clubId:r}=this.props,{showTypePicker:i,initialViewport:a}=this.state,o=we(Se[n??`generic`].variants.poi.default.small);return(0,U.jsxs)(`div`,{className:ft.mapContainer,children:[(0,U.jsx)(Me,{ref:this._mapRef,rwgpsOverlaysOnly:!0,hideOverlayPicker:!0,onViewportChanged:e,onMapClick:this.onMapClick,scrollWheelZoom:!0,initialViewport:a,children:t&&(0,U.jsx)(Te,{draggable:!0,position:t,icon:o,onClick:this.onMarkerClick,onDragEnd:this.onMarkerMoveEnd})}),i&&(0,U.jsx)(ht,{clubId:r,onTypeSelected:this.onTypeIconClick}),!t&&(0,U.jsx)(`div`,{className:ft.clickOnMapInstruction,children:`Click anywhere on the map to set a location`})]})}},_t=class extends H.PureComponent{constructor(e){super(e),T(this,`_geocoder`,void 0),T(this,`onMapBoundsChange`,e=>{if(O.isFromBounds(e)){let t=new He([e.bounds[0],e.bounds[1]]);this.setState({bounds:t})}}),T(this,`onLatLngChange`,e=>{let{poi:t}=this.state;t!==`error`&&this.setState({poi:t.merge(e)})}),T(this,`onPoiTypeNameChange`,e=>{let{poi:t}=this.state;t!==`error`&&this.setState({poi:t.merge({poiTypeName:e})})}),T(this,`serializePoiUpdate`,(e,t,n)=>{let{name:r,description:i,url:a,lat:o,lng:s,poiTypeName:c,tagNames:l}=e;return{point_of_interest:{name:r,poi_type_name:c,tag_names:l,description:i,url:a,lat:o,lng:s},route_ids:t,poi_ids:n}}),T(this,`addPhotos`,({point_of_interest:{id:e}})=>{let{files:t}=this.state;if(t.size===0){this.setState({saveSuccess:!0});return}this.setState(e=>({pendingUploads:e.pendingUploads+t.size}));let n=0;new lt.default(()=>{if(!t.get(n))return null;let r=t.get(n);n++;let i=new window.FormData;return i.append(`file`,r),i.append(`parent_type`,`point_of_interest`),i.append(`parent_id`,e),a(`/photos.json`,void 0,{method:`POST`,body:i,credentials:`same-origin`,headers:{Accept:`application/json`}}).then(()=>this.setState(e=>({pendingUploads:e.pendingUploads-1,saveSuccess:e.pendingUploads===1})))},ie()).start()}),T(this,`savePoi`,({poi:e,routeIds:t,poiIds:n})=>{if(this.state.poi===`error`)return;let r=this.state.poi.merge(e),{clubId:i,onEditSuccess:o}=this.props;if(!i)throw Error(`Invalid club id '${i}'`);let s,c;r.id?(s=`/organizations/${i}/points_of_interest/${r.id}.json`,c=`PATCH`):(s=`/organizations/${i}/points_of_interest.json`,c=`POST`);let l=this.serializePoiUpdate(r,t,n);a(s,l,{method:c}).then(e=>{this.addPhotos(e),o&&o(e)}).catch(e=>{console.error(e),this.setState({errors:ke.fromJS(e.errors)})})}),T(this,`fetchPoi`,e=>{let{clubId:t}=this.props;if(!t)throw Error(`Invalid club id '${t}'`);if(!e)throw Error(`Invalid POI id '${e}'`);return a(`/clubs/${t}/points_of_interest/${e}.json?include_routes=1`).then(e=>{let t=ee(e.point_of_interest),n=t;this.setState({poi:t,center:n,routes:e.routes,photoIds:ke.Set(t.photoIds)})}).catch(e=>{console.error(e),this.setState({poi:`error`})})}),T(this,`findLocation`,e=>{if(!e||e===``)return;let{bounds:t,center:n}=this.state,r=t?{north:t.getNorthEast().lat,east:t.getNorthEast().lng,south:t.getSouthWest
9().lat,west:t.getSouthWest().lng}:n&&{north:n.lat,east:n.lng,south:n.lat,west:n.lng};this._geocoder||=new window.google.maps.Geocoder;let i={address:e,bounds:r};this._geocoder.geocode(i,e=>{if(e?.length&&e?.length>0){let t=e[0].geometry.viewport,n=t.getSouthWest(),r=t.getNorthEast(),i=t.getCenter();this.setState({center:void 0,bounds:new He([n.lng(),n.lat()],[r.lng(),r.lat()]),poi:this.state.poi===`error`?`error`:this.state.poi.merge({lat:i.lat(),lng:i.lng()})})}})}),T(this,`onPhotosDrop`,e=>{this.setState({files:this.state.files.concat(e)})}),T(this,`onPhotoRemoved`,e=>{a(`/photos/${e}.json`,void 0,{method:`DELETE`,credentials:`same-origin`,headers:{Accept:`application/json`}}).then(()=>{this.setState({photoIds:this.state.photoIds.delete(e)})})}),T(this,`onFileRemoved`,(e,t)=>{e.preventDefault();let{files:n}=this.state;this.setState({files:n.delete(t)})});let t,n;`lat`in e.currentUser&&(t=e.currentUser.lat,n=e.currentUser.lng),this.state={poi:new b,routes:[],bounds:void 0,center:{lat:t||45.5358,lng:n||-122.65868},searchLocation:void 0,errors:void 0,saveSuccess:!1,pendingUploads:0,photoIds:ke.Set([]),files:ke.List()}}componentDidMount(){let{poiId:e}=this.props;e&&e&&this.fetchPoi(e),Ee()}componentDidUpdate(e,t){if(!t.saveSuccess&&this.state.saveSuccess){let{onRequestClose:e}=this.props;e&&e()}}render(){let{combinePois:e,poiId:t,clubId:n,onRequestClose:r,tags:i}=this.props,{poi:a,routes:o,bounds:s,center:c,photoIds:l,files:u,errors:d}=this.state,f=a===`error`||a.id,p=!t||f,m=s?{bounds:s}:{center:c};
9return(0,U.jsx)(je,{contentPadding:!1,shouldCloseOnOverlayClick:!1,onRequestClose:r,maxWidth:`875px`,hideOverflow:!0,children:(0,U.jsx)(`div`,{children:(0,U.jsxs)(`div`,{className:ut.horizontalColumns,children:[!p&&(0,U.jsx)(z,{size:50}),!!p&&(0,U.jsx)(gt,{...m,onBoundsChange:this.onMapBoundsChange,onLatLngChange:this.onLatLngChange,onPoiTypeNameChange:this.onPoiTypeNameChange,latLng:a!==`error`&&k(a)?a:void 0,poiTypeName:a===`error`?void 0:a.poiTypeName,clubId:n}),!!p&&(0,U.jsx)(dt,{onSave:this.savePoi,onCancel:r,onLocationSearch:this.findLocation,onPhotosDrop:this.onPhotosDrop,onPhotoRemoved:this.onPhotoRemoved,onFileRemoved:this.onFileRemoved,photoIds:l,files:u,poi:a,combinePois:e,fetchPoi:this.fetchPoi,unsetBounds:()=>this.setState({bounds:void 0}),routes:o,tags:i,errors:d})]})})})}};T(_t,`defaultProps`,{currentUser:i(),clubId:null,poiId:null,onRequestClose:null,onEditSuccess:null,tags:[]});var vt=({troute:e,objectType:t,onRequestClose:n})=>(0,U.jsx)(je,{title:(0,U.jsxs)(`span`,{children:[`Export `,(0,U.jsx)(`strong`,{children:e.name})]}),maxWidth:`400px`,onRequestClose:n,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{className:ve,style:{marginBottom:`15px`},children:`File Formats`}),(0,U.jsx)(`div`,{style:{marginBottom:`40px`},children:(0,U.jsx)(Ye,{troute:e,objectType:t})}),(0,U.jsxs)(`p`,{children:[`Not sure which format you need? Our`,` `,(0,U.jsx)(`a`,{href:`https://ridewithgps.com/help/export-file-formats`,target:`_blank`,children:`help page`}),` `,`has detailed information about compatibility with a variety of programs and devices`]})]})}),yt=({id:e,type:t,name:n,distance:r,elevationgain:i,elevationloss:a,movingTime:o,target:s,privacyCode:c})=>e?(0,U.jsx)(Xe,{target:s,theme:`blueHeader`,placement:window.innerWidth-s.getBoundingClientRect().right<350?`left`:`right`,showOnMount:!0,children:(0,U.jsx)(Qe,{id:parseInt(e,10),name:n,type:t,distance:parseFloat(r),elevationGain:parseFloat(i),elevationLoss:parseFloat(a),movingTime:parseInt(o),privacyCode:c})}):null,bt=({onRequestClose:e})=>{let t=`${window.location.protocol}//${window.location.host}`,n=`rwgps://app/set_server?server=${encodeURI(t)}`;return(0,U.jsx)(je,{maxWidth:`auto`,shouldCloseOnOverlayClick:!0,title:`Scan to set app server to this host`,onRequestClose:e,children:(0,U.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,U.jsx)($e,{value:n,size:200,level:`M`}),(0,U.jsx)(`br`,{}),n]})})},xt=F(),St=(e,t)=>{let n=new URLSearchParams({survey_type:e});return t?.isTrial!==void 0&&n.set(`is_trial`,String(t.isTrial)),o({queryKey:[`survey`,e,`questions`,t?.isTrial],queryFn:async()=>(await u(`/user_survey_responses.json?${n.toString()}`)).questions,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:t?.enabled??!0})},Ct=()=>{let e=c();return h({mutationFn:async e=>await u(`/user_survey_responses.json`,{method:`POST`,body:{survey_type:e.surveyType,question:e.question,answers:e.answers,source:e.source,other_text:e.otherText,is_trial:e.isTrial,billing_type:e.billingType,plan_type:e.planType}}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:[`survey`,n.surveyType,`questions`]})}})},q=M({pauseOrCancelTitle:{id:`subscriptionOffboarding.pauseOrCancelTitle`,defaultMessage:`Would You Like To Pause Your Subscription, Or Cancel Entirely?`},pauseSubscriptionTitle:{id:`subscriptionOffboarding.pauseSubscriptionTitle`,defaultMessage:`Pause Subscription`},subscriptionPausedTitle:{id:`subscriptionOffboarding.subscriptionPausedTitle`,defaultMessage:`Subscription Paused`},cancelSurveyTitle:{id:`subscriptionOffboarding.cancelSurveyTitle`,defaultMessage:`Why Are You Choosing To Cancel Your Subscription?`},cancelSubscriptionTitle:{id:`subscriptionOffboarding.cancelSubscriptionTitle`,defaultMessage:`Cancel Subscription`},subscriptionCancelledTitle:{id:`subscriptionOffboarding.subscriptionCancelledTitle`,defaultMessage:`Subscription Cancelled`},nevermind:{id:`subscriptionOffboarding.nevermind`,defaultMessage:`Nevermind`},next:{id:`subscriptionOffboarding.next`,defaultMessage:`Next`},back:{id:`subscriptionOffboarding.back`,defaultMessage:`Back`},close:{id:`subscriptionOffboarding.close`,defaultMessage:`Close`},confirmPause:{id:`subscriptionOffboarding.confirmPause`,defaultMessage:`Confirm Pause`},confirmCancel:{id:`subscriptionOffboarding.confirmCancel`,defaultMessage:`Confirm Cancel`},skip:{id:`subscriptionOffboarding.skip`,defaultMessage:`Skip`},submitting:{id:`subscriptionOffboarding.submitting`,defaultMessage:`Submitting...`},pauseOrCancelBody:{id:`subscriptionOffboarding.pauseOrCancelBody`,defaultMessage:`Your subscription is active through <strong>{date}</strong>. After that, if you pause or cancel, you'll lose access to advanced route planning features, map layers, navigation, and offline capabilities.`}
9,pauseOrCancelBodyNoDate:{id:`subscriptionOffboarding.pauseOrCancelBodyNoDate`,defaultMessage:`If you pause or cancel, you'll lose access to advanced route planning features, map layers, navigation, and offline capabilities.`},selectOne:{id:`subscriptionOffboarding.selectOne`,defaultMessage:`Select One`},pauseForMonths:{id:`subscriptionOffboarding.pauseForMonths`,defaultMessage:`Pause for {duration}`},monthCount:{id:`subscriptionOffboarding.monthCount`,defaultMessage:`{count, plural, =0 {0 months} one {# month} other {# months}}`},monthCountCapitalized:{id:`subscriptionOffboarding.monthCountCapitalized`,defaultMessage:`{count, plural, =0 {0 Months} one {# Month} other {# Months}}`},proceedWithCancellation:{id:`subscriptionOffboarding.proceedWithCancellation`,defaultMessage:`Proceed with Cancellation`},confirmPauseBody:{id:`subscriptionOffboarding.confirmPauseBody`,defaultMessage:`Your subscription will be paused for <strong>{duration}</strong>, and will automatically resume on <strong>{resumeDate}</strong>.`},pauseSuccessBody:{id:`subscriptionOffboarding.pauseSuccessBody`,defaultMessage:`Your subscription has been paused, and will resume on <strong>{resumeDate}</strong>. You will continue to have access to {planName} features until <strong>{accessDate}</strong>.`},confirmCancelBody:{id:`subscriptionOffboarding.confirmCancelBody`,defaultMessage:`Access to {planName} features will end on <strong>{date}</strong> and you won't be charged again.`},cancelSuccessGoodbye:{id:`subscriptionOffboarding.cancelSuccessGoodbye`,defaultMessage:`We're sorry to see you go, {name}.`},cancelSuccessBody:{id:`subscriptionOffboarding.cancelSuccessBody`,defaultMessage:`Your subscription has been cancelled, and 
9you won't be billed again. You will continue to have access to {planName} features until <strong>{date}</strong>.`},otherPlaceholder:{id:`subscriptionOffboarding.otherPlaceholder`,defaultMessage:`Please tell us more...`},retentionOfferTitle:{id:`subscriptionOffboarding.retentionOfferTitle`,defaultMessage:`Before You Go, Get {discountPercentage}% off Your Subscription for the Next Year.`},retentionOriginalPrice:{id:`subscriptionOffboarding.retentionOriginalPrice`,defaultMessage:`original price {price}/year`},retentionYourPrice:{id:`subscriptionOffboarding.retentionYourPrice`,defaultMessage:`Your Price {price}/Year`},retentionBodyTooExpensive:{id:`subscriptionOffboarding.retentionBodyTooExpensive`,defaultMessage:`<p>We hear you. Stay subscribed and get <strong>{discountPercentage}% off</strong> your next year of Premium, just {discountedPrice}/year (save {savingsAmount}).</p><p>You'll keep access to advanced route planning features, map layers, navigation, and offline capabilities.</p>`},retentionBodyNotRiding:{id:`subscriptionOffboarding.retentionBodyNotRiding`,defaultMessage:`<p>Keep your subscription through the off-season and get <strong>{discountPercentage}% off</strong> your next year of Premium, just {discountedPrice}/year (save {savingsAmount}).</p><p>When riding season comes back, all your routes, maps, and navigation features will be right where you left them.</p>`},retentionBodyDefault:{id:`subscriptionOffboarding.retentionBodyDefault`,defaultMessage:`<p>Stay subscribed and get <strong>{discountPercentage}% off</strong> your next year of Premium, just {discountedPrice}/year (save {savingsAmount}).</p><p>You'll keep access to advanced route planning features, map layers, navigation, and offline capabilities.</p>`},retentionPlanSwitchAnnualPremium:{id:`subscriptionOffboarding.retentionPlanSwitchAnnualPremium`,defaultMessage:`<p>The discount applies to your next bill on <strong>{nextRenewalDate}</strong>. After that, your subscription continues at {normalPrice}/year.</p>`},retentionPlanSwitchOther:{id:`subscriptionOffboarding.retentionPlanSwitchOther`,defaultMessage:`<p>Your subscription will switch to Premium Annual at your next billing on <strong>{nextRenewalDate}</strong>. After that, your subscription continues at {normalPrice}/year.</p>`},retentionAccept:{id:`subscriptionOffboarding.retentionAccept`,defaultMessage:`Stay Subscribed at {discountPercentage}% Off`},retentionDecline:{id:`subscriptionOffboarding.retentionDecline`,defaultMessage:`No Thanks, Cancel`},retentionAppliedTitle:{id:`subscriptionOffboarding.retentionAppliedTitle`,defaultMessage:`Discount Applied`},retentionAppliedBody:{id:`subscriptionOffboarding.retentionAppliedBody`,defaultMessage:`Your {discountPercentage}% discount has been applied. You'll be charged <strong>{discountedPrice}</strong> on <strong>{nextRenewalDate}</strong>, and your subscription will continue at {normalPrice}/year after that.`},mutationError:{id:`subscriptionOffboarding.mutationError`,defaultMessage:`Something went wrong. Please try again.`},surveySubmitError:{id:`subscriptionOffboarding.surveySubmitError`,defaultMessage:`Unable to save your answer. Proceeding anyway.`}}),wt=N({locale:`en`,defaultLocale:`en`}),Tt=(e,t)=>({queryKey:[`retentionOffers`,e,t??null],queryFn:async()=>{let n=new URLSearchParams;t!=null&&n.set(`user_survey_response_id`,String(t));let r=n.toString();return(await u(`/subscriptions/${e}/retention_offers.json${r?`?${r}`:``}`)).retentionOffers??[]},staleTime:0}),Et=()=>{let e=(0,xt.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:Mt},e[0]=t):t=e[0],h(t)},Dt={year:`numeric`,month:`long`,day:`numeric`};function Ot(e){return Math.round(e.details.nextDiscountPercentage)}function kt(e){let t=Ot(e);return{discount_pct:t,cta_copy:wt.formatMessage(q.retentionAccept,{discountPercentage:t}),currency:e.details.currency,plan_type:e.planType,plan_renewal_type:e.billingType}}function At(e){return e===`too_expensive`||e===`not_riding_season`?e:`default`}function jt(e,t){let n=e=>e.toLowerCase();return n(e.planType)!==n(t.planType)||n(e.billingType)!==n(t.billingType)}async function Mt(e){let{subscriptionId:t,code:n}=e;return(await u(`/subscriptions/${t}/retention_offers.json`,{method:`POST`,body:{code:n}})).retentionOffer}var Nt=()=>{let e=(0,xt.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:Ft},e[0]=t):t=e[0],h(t)},Pt=()=>{let e=(0,xt.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:It},e[0]=t):t=e[0],h(t)};function Ft(e){let{subscriptionId:t,durationMonths:n}=e;return u(`/subscriptions/${t}/pause.json`,{method:`POST`,body:{durationMonths:n}})}function It(e){let{subscriptionId:t}=e;return u(`/subscriptions/${t}/cancel.json`,{method:`POST`})}var J={modalBody:`_modalBody_1pp52_1`,loadingState:`_loadingState_1pp52_5`,footer:`_footer_1pp52_14`,buttons:`_buttons_1pp52_23`,actionButton:`_actionButton_1pp52_29`,primaryButton:`_primaryButton_1pp52_33`,fieldLabel:`_fieldLabel_1pp52_41`,otherTextInput:`_otherTextInput_1pp52_47`,errorMessage:`_errorMessage_1pp52_66`},Lt=e=>{let t=(0,xt.c)(21),{question:n,isLoading:r,selectedAnswer:i,otherText:a,onSelectAnswer:o,onOtherTextChange:s,submitError:c}=e,l=j();if(r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`div`,{className:J.loadingState,children:(0,U.jsx)(z,{size:40,centered:!0})}),t[0]=e):e=t[0],e}if(!n)return null;let u;t[1]===n.options?u=t[2]:(u=n.options.map(Rt),t[1]=n.options,t[2]=u);let d=u,f=i===`other`,p;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,U.jsx)(`div`,{className:J.fieldLabel,children:(0,U.jsx)(A,{...q.selectOne})}),t[3]=p):p=t[3];let m=i??void 0,h;t[4]===o?h=t[5]:(h=e=>o(e),t[4]=o,t[5]=h);let g;t[6]!==d||t[7]!==m||t[8]!==h?(g=(0,U.jsx)(Ke,{options:d,selected:m,onChange:h,name:`cancellation_reason`}),t[6]=d,t[7]=m,t[8]=h,t[9]=g):g=t[9];let _;t[10]!==l||t[11]!==f||t[12]!==s||t[13]!==a?(_=f&&(0,U.jsx)(`textarea`,{className:J.otherTextInput,placeholder:l.formatMessage(q.otherPlaceholder),value:a,onChange:e=>s(e.target.value),rows:3}),t[10]=l,t[11]=f,t[12]=s,t[13]=a,t[14]=_):_=t[14];let v;t[15]===c?v=t[16]:(v=c&&(0,U.jsx)(`p`,{className:J.errorMessage,children:(0,U.jsx)(A,{...q.surveySubmitError})}),t[15]=c,t[16]=v);let y;return t[17]!==g||t[18]!==_||t[19]!==v?(y=(0,U.jsxs)(`div`,{children:[p,g,_,v]}),t[17]=g,t[18]=_,t[19]=v,t[20]=y):y=t[20],y};function Rt(e){return[e.value,e.text]}var zt=({userName:e,nextBillDate:t,planName:n})=>{let r=j();return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{children:(0,U.jsx)(A,{...q.cancelSuccessGoodbye,values:{name:e}})}),(0,U.jsx)(`p`,{children:(0,U.jsx)(A,{...q.cancelSuccessBody,values:{strong:(...e)=>(0,U.jsx)(`strong`,{children:e}),date:r.formatDate(new Date(t),{year:`numeric`,month:`long`,day:`numeric`}),planName:n}})})]})},Bt=({nextBillDate:e,planName:t})=>{let n=j();return(0,U.jsx)(`p`,{children:(0,U.jsx)(A,{...q.confirmCancelBody,values:{strong:(...e)=>(0,U.jsx)(`strong`,{children:e}),date:n.formatDate(new Date(e),{year:`numeric`,month:`long`,day:`numeric`}),planName:t}})})},Vt=({durationMonths:e,resumeDate:t})=>{let n=j();return(0,U.jsx)(`p`,{children:(0,U.jsx)(A,{...q.confirmPauseBody,values:{strong:(...e)=>(0,U.jsx)(`strong`,{children:e}),duration:n.formatMessage(q.monthCount,{count:e}),resumeDate:n.formatDate(new Date(t),{year:`numeric`,month:`long`,day:`numeric`})}})})},Ht=`cancel`,Ut=({subscription:e,selectedOption:t,onSelect:n})=>{let r=j(),i=new Date(e.nextBillDate),a=[...e.pauseOffers.map(e=>[`pause_${e.durationMonths}`,r.formatMessage(q.pauseForMonths,{duration:r.formatMessage(q.monthCountCapitalized,{count:e.durationMonths})})]),[Ht,r.formatMessage(q.proceedWithCancellation)]];return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{children:(0,U.jsx)(A,{...q.pauseOrCancelBody,values:{strong:(...e)=>(0,U.jsx)(`strong`,{children:e}),date:r.formatDate(i,{year:`numeric`,month:`long`,day:`numeric`})}})}),(0,U.jsx)(`div`,{className:J.fieldLabel,children:(0,U.jsx)(A,{...q.selectOne})}),(0,U.jsx)(Ke,{options:a,selected:t??void 0,onChange:e=>n(e),name:`pause_or_cancel`})]})},Wt=({resumeAt:e,nextBillDate:t,planName:n})=>{let r=j(),i={year:`numeric`,month:`long`,day:`numeric`};return(0,U.jsx)(`p`,{children:(0,U.jsx)(A,{...q.pauseSuccessBody,values:{strong:(...e)=>(0,U.jsx)(`strong`,{children:e}),resumeDate:r.formatDate(new Date(e),i),accessDate:r.formatDate(new Date(t),i),planName:n}})})},Gt=({offer:e})=>
9{let t=j(),{currency:n,nextPrice:r,renewalPrice:i,nextBillDate:a}=e.details,o={style:`currency`,currency:n};return(0,U.jsx)(`p`,{children:(0,U.jsx)(A,{...q.retentionAppliedBody,values:{strong:(...e)=>(0,U.jsx)(`strong`,{children:e}),discountPercentage:Ot(e),discountedPrice:t.formatNumber(r,o),normalPrice:t.formatNumber(i,o),nextRenewalDate:t.formatDate(new Date(a),Dt)}})})},Kt={content:`_content_h3f2t_1`,priceBox:`_priceBox_h3f2t_7`,originalPrice:`_originalPrice_h3f2t_19`,yourPrice:`_yourPrice_h3f2t_27`,text:`_text_h3f2t_35`},qt={too_expensive:q.retentionBodyTooExpensive,not_riding_season:q.retentionBodyNotRiding,default:q.retentionBodyDefault},Jt=({offer:e,variant:t,offerSwitchesPlan:n})=>{let r=j(),{currency:i,nextPrice:a,renewalPrice:o,nextBillDate:s}=e.details,c={style:`currency`,currency:i},l=(...e)=>(0,U.jsx)(`strong`,{children:e}),u=(...e)=>(0,U.jsx)(`p`,{children:e}),d=r.formatNumber(a,c),f=Math.round((o-a)*100)/100,p=r.formatNumber(f,{...c,...Number.isInteger(f)?{maximumFractionDigits:0}:{}}),m=r.formatNumber(o,c),h=r.formatDate(new Date(s),Dt),g=Ot(e),_=n?q.retentionPlanSwitchOther:q.retentionPlanSwitchAnnualPremium;return(0,U.jsxs)(`div`,{className:Kt.content,children:[(0,U.jsxs)(`div`,{className:Kt.priceBox,children:[(0,U.jsx)(`p`,{className:Kt.originalPrice,children:(0,U.jsx)(A,{...q.retentionOriginalPrice,values:{price:m}})}),(0,U.jsx)(`p`,{className:Kt.yourPrice,children:(0,U.jsx)(A,{...q.retentionYourPrice,values:{price:d}})})]}),(0,U.jsxs)(`div`,{className:Kt.text,children:[(0,U.jsx)(A,{...qt[t],values:{strong:l,p:u,discountedPrice:d,savingsAmount:p,discountPercentage:g}}),(0,U.jsx)(A,{..._,values:{strong:l,p:u,nextRenewalDate:h,normalPrice:m}})]})]})};function Yt(e,t){switch(t.type){case`SET_SELECTION`:return e.step===`pause_or_cancel`?{...e,selectedOption:t.option}:e;case`SELECT_PAUSE`:return{step:`confirm_pause`,durationMonths:t.durationMonths,resumeDate:t.resumeDate};case`SELECT_CANCEL`:return{step:`cancellation_survey`,surveyAnswer:null,otherText:``};case`BACK_TO_CHOICE`:return{step:`pause_or_cancel`,selectedOption:t.previousSelection};case`SET_SURVEY_ANSWER`:return e.step===`cancellation_survey`?{...e,surveyAnswer:t.answer}:e;case`SET_SURVEY_OTHER_TEXT`:return e.step===`cancellation_survey`?{...e,otherText:t.text}:e;case`PAUSE_CONFIRMED`:return{step:`pause_success`,resumeAt:t.resumeAt};case`SURVEY_DONE`:return e.step===`cancellation_survey`?t.offer?{step:`retention_offer`,offer:t.offer,variant:t.variant,offerSwitchesPlan:t.offerSwitchesPlan}:{step:`confirm_cancel`}:e;case`OFFER_ACCEPTED`:return e.step===`retention_offer`?{step:`retention_applied`,offer:t.offer}:e;case`OFFER_DECLINED`:return{step:`confirm_cancel`};case`CANCEL_CONFIRMED`:return{step:`cancel_success`,accessUntil:t.accessUntil};default:return e}}function Xt(e){return t.config.labs?.web_subscription_pause&&e.pauseOffers.length>0?{step:`pause_or_cancel`,selectedOption:null}:{step:`cancellation_survey`,surveyAnswer:null,otherText:``}}function Zt(e){let t=e.match(/^pause_(\d+)$/);return t?parseInt(t[1],10):0}var Qt=({subscription:e,onComplete:t,onRequestClose:n})=>{let r=j(),i=c(),[a,o]=(0,H.useReducer)(Yt,e,Xt),{data:s,isLoading:l}=St(`cancellation`,{isTrial:e.isTrial}),u=Ct(),f=Nt(),p=Pt(),m=Et(),[h,g]=(0,H.useState)(null),[_,v]=(0,H.useState)(!1),y=d(),ee=y.name||y.first_name||``,b=e.planType in te?r.formatMessage(te[e.planType]):e.planType,x=()=>{n()},S=t=>{if(t===`cancel`)o({type:`SELECT_CANCEL`});else{let n=Zt(t),r=e.pauseOffers.find(e=>e.durationMonths===n);if(!r)return;o({type:`SELECT_PAUSE`,durationMonths:n,resumeDate:r.resumeDate})}},C=async()=>{if(a.step===`confirm_pause`){g(null);try{o({type:`PAUSE_CONFIRMED`,resumeAt:(await f.mutateAsync({subscriptionId:e.id,durationMonths:a.durationMonths})).pause.resumeAt})}catch{g(r.formatMessage(q.mutationError))}}},w=async(t,n)=>{v(!0);try{let r=(await i.fetchQuery(Tt(e.id,n)))[0]??null;r&&D(`View Retention Offer`,kt(r)),o({type:`SURVEY_DONE`,offer:r,variant:At(t),offerSwitchesPlan:r?jt(r,e):!1})}catch(t){console.error(`Failed to load retention offers:`,t),me(`Retention offer lookup failed`,r=>{r.setExtra(`subscriptionId`,e.id),r.setExtra(`surveyResponseId`,n),r.setExtra(`error`,t instanceof Error?t.message:String(t))}),o({type:`SURVEY_DONE`,offer:null,variant:`default`,offerSwitchesPlan:!1})}finally{v(!1)}},T=async()=>
9{if(a.step!==`cancellation_survey`)return;let{surveyAnswer:t,otherText:n}=a,r=s?.[0],i=null;if(t&&r)try{i=(await u.mutateAsync({surveyType:`cancellation`,question:r.name,answers:t,source:`web_cancellation`,otherText:t===`other`?n:void 0,isTrial:e.isTrial,billingType:e.billingType,planType:e.planType})).userSurveyResponse.id}catch(e){console.error(`Failed to submit cancellation survey:`,e)}await w(t,i)},E=async()=>{await w(null,null)},ne=async()=>{if(a.step===`retention_offer`){g(null);try{let t=await m.mutateAsync({subscriptionId:e.id,code:a.offer.code});D(`Accept Retention Offer`,kt(a.offer)),o({type:`OFFER_ACCEPTED`,offer:t})}catch(t){me(`Retention offer redemption failed`,n=>{n.setExtra(`subscriptionId`,e.id),n.setExtra(`code`,a.offer.code),n.setExtra(`error`,t instanceof Error?t.message:String(t))}),g(r.formatMessage(q.mutationError))}}},re=()=>{n(),t()},ie=async()=>{g(null);try{o({type:`CANCEL_CONFIRMED`,accessUntil:(await p.mutateAsync({subscriptionId:e.id})).cancel.nextBillDate})}catch{g(r.formatMessage(q.mutationError))}},ae=()=>{n(),t()},O=()=>{n(),t()},k,M,N;switch(a.step){case`pause_or_cancel`:k=r.formatMessage(q.pauseOrCancelTitle),M=(0,U.jsx)(Ut,{subscription:e,selectedOption:a.selectedOption,onSelect:e=>o({type:`SET_SELECTION`,option:e})}),N=(0,U.jsx)(`div`,{className:J.footer,children:(0,U.jsxs)(`div`,{className:J.buttons,children:[(0,U.jsx)(R,{onClick:x,priority:`auxiliary`,className:J.actionButton,children:(0,U.jsx)(A,{...q.nevermind})}),(0,U.jsx)(R,{onClick:()=>a.selectedOption&&S(a.selectedOption),priority:`primary`,disabled:!a.selectedOption,className:(0,W.default)(J.actionButton,J.primaryButton),children:(0,U.jsx)(A,{...q.next})})]})});break;case`confirm_pause`:{k=r.formatMessage(q.pauseSubscriptionTitle),M=(0,U.jsxs)(`div`,{children:[(0,U.jsx)(Vt,{durationMonths:a.durationMonths,resumeDate:a.resumeDate}),h&&(0,U.jsx)(`p`,{className:J.errorMessage,children:h})]});let e=`pause_${a.durationMonths}`;N=(0,U.jsx)(`div`,{className:J.footer,children:(0,U.jsxs)(`div`,{className:J.buttons,children:[(0,U.jsx)(R,{onClick:()=>{g(null),o({type:`BACK_TO_CHOICE`,previousSelection:e})},priority:`auxiliary`,disabled:f.isPending,className:J.actionButton,children:(0,U.jsx)(A,{...q.back})}),(0,U.jsx)(R,{onClick:C,priority:`primary`,disabled:f.isPending,className:(0,W.default)(J.actionButton,J.primaryButton),children:f.isPending?(0,U.jsx)(z,{size:16}):(0,U.jsx)(A,{...q.confirmPause})})]})});break}case`pause_success`:k=r.formatMessage(q.subscriptionPausedTitle),M=(0,U.jsx)(Wt,{resumeAt:a.resumeAt,nextBillDate:e.nextBillDate,planName:b}),N=(0,U.jsx)(`div`,{className:J.footer,children:(0,U.jsx)(`div`,{className:J.buttons,children:(0,U.jsx)(R,{onClick:ae,priority:`auxiliary`,className:J.actionButton,children:(0,U.jsx)(A,{...q.close})})})});break;case`cancellation_survey`:{k=r.formatMessage(q.cancelSurveyTitle);let e=a.surveyAnswer&&(a.surveyAnswer!==`other`||a.otherText.trim());M=(0,U.jsx)(Lt,{question:s?.[0],isLoading:l,selectedAnswer:a.surveyAnswer,otherText:a.otherText,onSelectAnswer:e=>o({type:`SET_SURVEY_ANSWER`,answer:e}),onOtherTextChange:e=>o({type:`SET_SURVEY_OTHER_TEXT`,text:e}),submitError:u.isError}),N=(0,U.jsx)(`div`,{className:J.footer,children:(0,U.jsxs)(`div`,{className:J.buttons,children:[(0,U.jsx)(R,{onClick:E,priority:`auxiliary`,disabled:u.isPending||_,className:J.actionButton,children:(0,U.jsx)(A,{...q.skip})}),(0,U.jsx)(R,{onClick:T,priority:`primary`,disabled:!e||u.isPending||_,className:(0,W.default)(J.actionButton,J.primaryButton),children:u.isPending||_?(0,U.jsx)(A,{...q.submitting}):(0,U.jsx)(A,{...q.next})})]})});break}case`retention_offer`:{let e=Ot(a.offer);k=r.formatMessage(q.retentionOfferTitle,{discountPercentage:e}),M=(0,U.jsxs)(`div`,{children:[(0,U.jsx)(Jt,{offer:a.offer,variant:a.variant,offerSwitchesPlan:a.offerSwitchesPlan}),h&&(0,U.jsx)(`p`,{className:J.errorMessage,children:h})]}),N=(0,U.jsx)(`div`,{className:J.footer,children:(0,U.jsxs)(`div`,{className:J.buttons,children:[(0,U.jsx)(R,{onClick:()=>{g(null),D(`Decline Retention Offer`,kt(a.offer)),o({type:`OFFER_DECLINED`})},priority:`auxiliary`,disabled:m.isPending,className:J.actionButton,children:(0,U.jsx)(A,{...q.retentionDecline})}),(0,U.jsx)(R,{onClick:ne,priority:`primary`,disabled:m.isPending,className:(0,W.default)(J.actionButton,J.primaryButton),children:m.isPending?(0,U.jsx)(z,{size:16}):(0,U.jsx)(A,{...q.retentionAccept,values:{discountPercentage:e}})})]})});break}case`retention_applied`:k=r.formatMessage(q.retentionAppliedTitle),M=(0,U.jsx)(Gt,{offer:a.offer}),N=(0,U.jsx)(`div`,{className:J.footer,children:(0,U.jsx)(`div`,{className:J.buttons,children:(0,U.jsx)(R,{onClick:re,priority:`auxiliary`,className:J.actionButton,children:(0,U.jsx)(A,{...q.close})})})});break;case`confirm_cancel`:k=r.formatMessage(q.cancelSubscriptionTitle),M=(0,U.jsxs)(`div`,{children:[(0,U.jsx)(Bt,{nextBillDate:e.nextBillDate,planName:b}),h&&(0,U.jsx)(`p`,{className:J.errorMessage,children:h})]}),N=(0,U.jsx)(`div`,{className:J.footer,children:(0,U.jsxs)(`div`,{className:J.buttons,children:[e.pauseOffers.length>0?(0,U.jsx)(R,{onClick:()=>{g(null),o({type:`BACK_TO_CHOICE`,previousSelection:Ht})},priority:`auxiliary`,disabled:p.isPending,className:J.actionButton,children:(0,U.jsx)(A,{...q.back})}):(0,U.jsx)(R,{onClick:x,priority:`auxiliary`,disabled:p.isPending,className:J.actionButton,children:(0,U.jsx)(A,{...q.nevermind})}),(0,U.jsx)(R,{onClick:ie,priority:`primary`,disabled:p.isPending,className:(0,W.default)(J.actionButton,J.primaryButton),children:p.isPending?(0,U.jsx)(z,{size:16}):(0,U.jsx)(A,{...q.confirmCancel})})]})});break;case`cancel_success`:k=r.formatMessage(q.subscriptionCancelledTitle),M=(0,U.jsx)(zt,{userName:ee,nextBillDate:a.accessUntil,planName:b}),N=(0,U.jsx)(`div`,{className:J.footer,children:(0,U.jsx)(`div`,{className:J.buttons,children:(0,U.jsx)(R,{onClick:O,priority:`auxiliary`,className:J.actionButton,children:(0,U.jsx)(A,{...q.close})})})});break}return(0,U.jsx)(tt,{title:k,onRequestClose:x,shouldCloseOnOverlayClick:!0,appearance:`light`,footer
9:N,bodyClassName:J.modalBody,children:M})},$t=e=>{let t=(0,xt.c)(22),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({unmountComponent:a,onComplete:i,...r}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o=r.id,s=r.is_trial,c=r.billing_type,l=r.plan_type,u=r.next_bill_date,d;t[4]===r.pause_offers?d=t[5]:(d=r.pause_offers??[],t[4]=r.pause_offers,t[5]=d);let f;t[6]===d?f=t[7]:(f=d.map(en),t[6]=d,t[7]=f);let p;t[8]!==r.billing_type||t[9]!==r.id||t[10]!==r.is_trial||t[11]!==r.next_bill_date||t[12]!==r.plan_type||t[13]!==f?(p={id:o,isTrial:s,billingType:c,planType:l,nextBillDate:u,pauseOffers:f},t[8]=r.billing_type,t[9]=r.id,t[10]=r.is_trial,t[11]=r.next_bill_date,t[12]=r.plan_type,t[13]=f,t[14]=p):p=t[14];let h=p,g;t[15]!==i||t[16]!==a?(g=()=>{a(),i?.()},t[15]=i,t[16]=a,t[17]=g):g=t[17];let _;return t[18]!==h||t[19]!==g||t[20]!==a?(_=(0,U.jsx)(n,{client:m,children:(0,U.jsx)(Qt,{subscription:h,onComplete:g,onRequestClose:a})}),t[18]=h,t[19]=g,t[20]=a,t[21]=_):_=t[21],_};function en(e){return{durationMonths:e.duration_months,resumeDate:e.resume_date}}var tn=P(),nn=({children:e})=>(0,U.jsx)(De,{locale:nt(Re.locale),language:nt(Re.language),children:e}),rn=({children:e})=>(0,H.useContext)(Ie)?(0,U.jsx)(nn,{children:e}):(0,U.jsx)(De,{children:e}),an=()=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(oe,{onClick:async()=>{await p(`allow_anon_private_ride_contributions`,null).payload,ce()},menuKey:`reset_anon_private`,label:`Reset allow_anon_private_ride_contributions`}),(0,U.jsx)(oe,{onClick:async()=>{await p(`show_heatmap_optout`,null).payload,ce()},menuKey:`show_heatmap_optout_null`,label:`Reset show_heatmap_optout`}),(0,U.jsx)(oe,{onClick:async()=>{await a(`/users/${l?.id}`,{user:{heatmap_optout:!0}},{method:`PATCH`}),ce()},menuKey:`set_heatmap_optout_true`,label:`Set heatmap_optout = true`})]}),Y={settingsPrivacyTabApp:`_settingsPrivacyTabApp_1wotg_1`,nowrap:`_nowrap_1wotg_21`,form:`_form_1wotg_25`,formItem:`_formItem_1wotg_43`,horizontalCheckbox:`_horizontalCheckbox_1wotg_53`,labelWithDescription:`_labelWithDescription_1wotg_75`,legacyOption:`_legacyOption_1wotg_80`,indented:`_indented_1wotg_85`,selectWithInfo:`_selectWithInfo_1wotg_89`,InfoIconWithHover:`_InfoIconWithHover_1wotg_98`,infoHover:`_infoHover_1wotg_108`,privatizeWaiting:`_privatizeWaiting_1wotg_125`},X=M({privacyDefaults:{id:`SettingsPrivacyTabApp.privacyDefaults`,defaultMessage:`Privacy Defaults`,description:`Title on form used to configure default privacy settings for user content`},contributeAnonymousRideData:{id:`SettingsPrivacyTabApp.contributeAnonymousRideData`,defaultMessage:`Contribute anonymous ride data to community resources`,description:`Label for a privacy option checkbox`},resourcesMadePossible:{id:`SettingsPrivacyTabApp.resourcesMadePossible`,defaultMessage:`Global heatmaps, route recommendations, and other community resources are made possible by contributions from riders like you. Your private ride data will remain anonymous while helping the entire Ride with GPS community find better routes.`,description:`Extended description for a privacy option checkbox`}
9,defaultPrivacyForNewRides:{id:`SettingsPrivacyTabApp.defaultPrivacyForNewRides`,defaultMessage:`Default privacy for new rides`,description:`Label for a privacy option select list`},defaultPrivacyForNewRoutes:{id:`SettingsPrivacyTabApp.defaultPrivacyForNewRoutes`,defaultMessage:`Default privacy for new routes`,description:`Label for a privacy option select list`},disableParticipationInGlobalHeatmap:{id:`SettingsPrivacyTabApp.disableParticipationInGlobalHeatmap`,defaultMessage:`Disable participation in global heatmap`},heatmapLegacyOptionDescription:{id:`SettingsPrivacyTabApp.heatmapLegacyOptionDescription`,defaultMessage:`This option is available to you because you had this option checked in the past. For new users, public rides always contribute to the heatmap.`},contributePublicRideData:{id:`SettingsPrivacyTabApp.contributePublicRideData`,defaultMessage:`Contribute public ride data to the global heatmap`,description:`Label for a privacy option checkbox`},heatmapDependsOnContributions:{id:`SettingsPrivacyTabApp.heatmapDependsOnContributions`,defaultMessage:`The global heatmap depends on anonymous contributions from riders like you. When this box is checked, your anonymous data from public rides will help other riders find good routes.`,description:`Extended description for a privacy option checkbox`},showMyRidesOnSegmentLeaderboards:{id:`SettingsPrivacyTabApp.showMyRidesOnSegmentLeaderboards`,defaultMessage:`Show my public rides on segment leaderboards`,description:`Label for a privacy option checkbox`},whenYouSegments:{id:`SettingsPrivacyTabApp.whenYouSegments`,defaultMessage:`When you record a public ride, your name and profile may be shown on the public leaderboard for any matching segments.`,description:`Extended description for a privacy option checkbox`},shareUsageAnalytics:{id:`SettingsPrivacyTabApp.shareUsageAnalytics`,defaultMessage:`Share usage analytics`,description:`Label for a privacy option checkbox`},weUseAnalyticsTo:{id:`SettingsPrivacyTabApp.weUseAnalyticsTo`,defaultMessage:`We use analytics to help us improve your experience and inform our decisions around feature enhancements.`,description:`Extended description for a privacy option checkbox`},shareDataWithAdvertisingPartners:{id:`SettingsPrivacyTabApp.shareDataWithAdvertisingPartners`,defaultMessage:`Share data with advertising partners`,description:`Label for a privacy option checkbox`},weShareLimitedDataWith:{id:`SettingsPrivacyTabApp.weShareLimitedDataWith`,defaultMessage:`Allow Ride with GPS to share limited information (such as ad-click identifiers, device and browser information, and actions you take on our site) with advertising partners like Meta to measure the effectiveness of our marketing. This does not affect usage analytics.`,description:`Extended description for a privacy option checkbox`},defaultsExplanationWithPrivatizeLink:{id:`SettingsPrivacyTabApp.defaultsExplanationWithPrivatizeLink`,defaultMessage:`<b>Any changes made below will be used as defaults moving forward, but will not change the privacy of your existing rides and routes.</b> If you would like everything to be private, including all existing gear, rides, routes, and your profile, <a>make everything private here.</a>`,description:`Extended description above the privacy defaults form`},privatizeModalTitle:{id:`SettingsPrivacyTabApp.privatizeModalTitle`,defaultMessage:`Make everything private`,description:`Title for confirmation dialog where the user can make all their content private`},privatizeConfirm:{id:`SettingsPrivacyTabApp.privatizeConfirm`,defaultMessage:`Are you sure? This will change all your existing gear, rides, routes and profile to be private, only viewable by you.`,description:`Contents of a confirmation dialog`},privatizingWaiting:{id:`SettingsPrivacyTabApp.privatizingWaiting`,defaultMessage:`Everything on your account is now being made private. Depending on the number of routes and rides you have, the process may take a few minutes.`,description:`Shown while a background update process is running`},profilePrivacy:{id:`SettingsPrivacyTabApp.profilePrivacy`,defaultMessage:`Profile Privacy`,description:`Title of an extended description for the privacy options related to the user's profile page`},publicProfilePrivacy:{id:`SettingsPrivacyTabApp.publicProfilePrivacy`,defaultMessage:`<b>Public.</b>
9 Everyone can search for and view your profile and all items you’ve saved as public.`,description:`Explanation for a privacy option`},followersOnlyProfilePrivacy:{id:`SettingsPrivacyTabApp.followersOnlyProfilePrivacy`,defaultMessage:`<b>Followers only.</b> People can find you in search and ask to follow you. Only followers you approve will have access to your profile.`,description:`Explanation for a privacy option`},privateProfilePrivacy:{id:`SettingsPrivacyTabApp.privateProfilePrivacy`,defaultMessage:`<b>Private.</b> You are the only one with access to your profile. You will not come up in any searches.`,description:`Explanation for a privacy option`},routePrivacy:{id:`SettingsPrivacyTabApp.routePrivacy`,defaultMessage:`Route Privacy`,description:`Title of an extended description for a privacy option`},publicRoutePrivacy:{id:`SettingsPrivacyTabApp.publicRoutePrivacy`,defaultMessage:`<b>Public.</b> Everyone can search for and view your routes.`,description:`Title of an extended description for the privacy options related to the user's planned bike routes`},followersOnlyRoutePrivacy:{id:`SettingsPrivacyTabApp.followersOnlyRoutePrivacy`,defaultMessage:`<b>Followers only.</b> Only people who follow you will have access to your routes.`,description:`Explanation for a privacy option`},privateRoutePrivacy:{id:`SettingsPrivacyTabApp.privateRoutePrivacy`,defaultMessage:`<b>Private.</b> You are the only one with access to your routes. Your routes will not come up in any searches.`,description:`Explanation for a privacy option`},ridePrivacy:{id:`SettingsPrivacyTabApp.ridePrivacy`,defaultMessage:`Ride Privacy`,description:`Title of an extended description for the privacy options related to the user's recorded bike rides`},publicRidePrivacy:{id:`SettingsPrivacyTabApp.publicRidePrivacy`,defaultMessage:`<b>Public.</b> Everyone can search for and view your rides.`,description:`Explanation for a privacy option`},followersOnlyRidePrivacy:{id:`SettingsPrivacyTabApp.followersOnlyRidePrivacy`,defaultMessage:`<b>Followers only.</b> Only people who follow you will have access to your rides.`,description:`Explanation for a privacy option`},privateRidePrivacy:{id:`SettingsPrivacyTabApp.privateRidePrivacy`,defaultMessage:`<b>Private.</b> You are the only one with access to your rides. Your rides will not come up in any searches.`,description:`Explanation for a privacy option`},savePrivacyDefaults:{id:`SettingsPrivacyTabApp.savePrivacyDefaults`,defaultMessage:`Save Privacy Defaults`,description:`Contents of the submit button at the bottom of the privacy defaults form`},contributePublicPhotos:{id:`SettingsPrivacyTabApp.contributePublicPhotos`,defaultMessage:`Contribute public photos to the Community Photos layer`,description:`Label for a privacy option checkbox for photo layer contribution`},contributePublicPhotosDescription:{id:`SettingsPrivacyTabApp.contributePublicPhotosDescription2`,defaultMessage:`The Community Photos layer uses photos from your public rides and routes to improve photo discovery and route context. Photos taken within "Privacy Zones" are never included. We also exclude photos containing identifiable faces or specific personal details. If you delete a photo or change an activity's privacy from Public to Private or Followers only, that photo will be removed from public view.`,description:`Extended description for photo layer contribution checkbox`},showPhotoAttribution:{id:`SettingsPrivacyTabApp.showPhotoAttribution`,defaultMessage:`Show your attribution`,description:`Label for a privacy option checkbox for photo attribution`},showPhotoAttributionDescription:{id:`SettingsPrivacyTabApp.showPhotoAttributionDescription`,defaultMessage:`Show your profile name and picture as attribution on your photos in the Community Photos layer. If this setting is disabled, the photo attribution will be anonymous.`,description:`Extended description for photo attribution checkbox`}}),on=ne(`settings_fake_privatize`),sn=t.settings?.privacy?.userRideCountsByVisibility,cn=(sn?.[`1`]??0)+(sn?.[`2`]??0)>0,ln={b:(...e)=>(0,U.jsx)(`b`,{children:e})}
9,Z=e=>(0,U.jsx)(C,{values:ln,...e}),un=e=>(typeof e==`string`&&(e=parseInt(e,10)),e===0||e===1||e===2?e:0),dn=()=>{let e=f();if(!s(e))throw Error(`should never be shown to anonymous user`+JSON.stringify(e));let[t]=(0,H.useState)(un(e.visibility)),[n,i]=(0,H.useState)(t),[o,c]=B(`default_privacy_trip`),[u]=(0,H.useState)(un(o)),[d,p]=(0,H.useState)(u),[m,h]=B(`default_privacy_route`),[g]=(0,H.useState)(un(m)),[_,v]=(0,H.useState)(g),[y,ee]=(0,H.useState)(!!(e.id&&e.heatmapOptout)),[b,x]=B(`show_heatmap_optout`,!1),[S]=(0,H.useState)(!!b||y),[te,w]=B(`allow_anon_private_ride_contributions`),[T]=(0,H.useState)(()=>{let e=te??null;return typeof e==`boolean`?e:void 0}),[E,ne]=(0,H.useState)(()=>typeof(te??null)==`boolean`?te:!(S||cn)),[re,ie]=B(`segments_private`,!1),[O]=(0,H.useState)(re),[k,A]=(0,H.useState)(O),[j,M]=B(`analytics_consent`,!0),[N]=(0,H.useState)(j),[P,oe]=(0,H.useState)(N),[se,le]=B(`data_sharing_consent`,!0),[ue]=(0,H.useState)(se),[F,de]=(0,H.useState)(ue),[fe,pe]=B(`contribute_public_photos`,!1),[me]=(0,H.useState)(fe),[L,R]=(0,H.useState)(me),[ge,_e]=(0,H.useState)(me),[z,ve]=B(`show_photo_attribution`,!1),[ye]=(0,H.useState)(z),[V,be]=(0,H.useState)(ye),[xe,Se]=(0,H.useState)(!1),[Ce,we]=(0,H.useState)(!1),Te=(0,H.useCallback)(async()=>{D(`Save Privacy Defaults`,{profile_privacy:n===t?void 0:ae(n),disable_segment_participation:O===k?void 0:k,private_contributions:T===E?void 0:!!E,ride_privacy:d===u?void 0:ae(d),route_privacy:_===g?void 0:ae(_),share_analytics:P===N?void 0:P,heatmap_optout:y});let e=[x(S),c(d),h(_),ie(k),M(P),w(E),pe(L),ve(V)];F!==ue&&e.push(le(F)),await Promise.all(e);let r=await fetch(`/users/${l?.id}?redirect_to_edit=true`,{method:`PATCH`,headers:{accept:`text/html`,"content-type":`application/json`},redirect:`manual`,body:JSON.stringify({user:{visibility:n,heatmap_optout:y}})});r.type!==`opaqueredirect`&&(console.error("Unexpected non-redirect response from `PATCH /users/<id>`",r),he(Error(`Unexpected non-redirect response from PATCH /users/<id>: ${JSON.stringify(r)}`))),ce()},[P,L,F,y,N,ue,T,t,u,g,O,E,n,d,_,k,S,V,x,c,h,ie,M,le,w,pe,ve]);return(0,U.jsxs)(`div`,{className:Y.settingsPrivacyTabApp,children:[r&&(0,U.jsx)(an,{}),(0,U.jsx)(`h1`,{children:(0,U.jsx)(C,{m:X.privacyDefaults})}),(0,U.jsxs)(`p`,{children:[(0,U.jsx)(C,{m:X.defaultsExplanationWithPrivatizeLink,values:{...ln,a:(...e)=>(0,U.jsx)(`a`,{className:Y.nowrap,onClick:()=>Se(!0),children:e})}}),xe&&(0,U.jsxs)(Ge,{title:(0,U.jsx)(C,{m:X.privatizeModalTitle}),maxWidth:`600px`,onRequestClose:()=>Se(!1),onConfirm:async()=>{await(on?new Promise(e=>setTimeout(e,300)):a(`/users/privatize_everything`,!1,{method:`post`})),we(!0),Se(!1)},onCancel:()=>Se(!1),children:[(0,U.jsx)(C,{m:X.privatizeConfirm}),on&&(0,U.jsxs)(`p`,{children:[(0,U.jsx)(`br`,{}),`NB: this doesn't actually do anything because `,(0,U.jsx)(`em`,{children:`settings_fake_privatize`}),` is enabled`]})]})]}),Ce&&(0,U.jsx)(`p`,{className:Y.privatizeWaiting,children:(0,U.jsx)(C,{m:X.privatizingWaiting})}),(0,U.jsxs)(`form`,{className:Y.form,children:[(0,U.jsx)(fn,{label:(0,U.jsx)(C,{m:X.profilePrivacy}),infoHoverContent:(0,U.jsx)(mn,{}),value:n,onChange:i}
9),(0,U.jsx)(fn,{label:(0,U.jsx)(C,{m:X.defaultPrivacyForNewRoutes}),infoHoverContent:(0,U.jsx)(hn,{}),value:_,onChange:v}),(0,U.jsx)(fn,{label:(0,U.jsx)(C,{m:X.defaultPrivacyForNewRides}),infoHoverContent:(0,U.jsx)(gn,{}),value:d,onChange:p}),S&&(0,U.jsx)(Q,{className:Y.legacyOption,checked:y,onChange:()=>ee(!y),label:(0,U.jsx)(`h6`,{children:(0,U.jsx)(C,{m:X.disableParticipationInGlobalHeatmap})}),description:(0,U.jsx)(C,{m:X.heatmapLegacyOptionDescription})}),(0,U.jsx)(Q,{checked:!!E,onChange:()=>ne(!E),label:(0,U.jsx)(`h6`,{children:(0,U.jsx)(C,{m:X.contributeAnonymousRideData})}),description:(0,U.jsx)(C,{m:X.resourcesMadePossible})}),(0,U.jsx)(Q,{checked:L,onChange:()=>{L?be(!1):_e(!0),R(!L)},label:(0,U.jsx)(`h6`,{children:(0,U.jsx)(C,{m:X.contributePublicPhotos})}),description:(0,U.jsx)(C,{m:X.contributePublicPhotosDescription})}),ge&&(0,U.jsx)(Q,{className:Y.indented,checked:V,onChange:()=>be(!V),label:(0,U.jsx)(`h6`,{children:(0,U.jsx)(C,{m:X.showPhotoAttribution})}),description:(0,U.jsx)(C,{m:X.showPhotoAttributionDescription})}),(0,U.jsx)(Q,{checked:!k,onChange:()=>A(!k),label:(0,U.jsx)(`h6`,{children:(0,U.jsx)(C,{m:X.showMyRidesOnSegmentLeaderboards})}),description:(0,U.jsx)(C,{m:X.whenYouSegments})}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(Q,{checked:P,onChange:()=>oe(!P),label:(0,U.jsx)(`h6`,{children:(0,U.jsx)(C,{m:X.shareUsageAnalytics})}),description:(0,U.jsx)(C,{m:X.weUseAnalyticsTo})}),(0,U.jsx)(Q,{checked:F,onChange:()=>de(!F),label:(0,U.jsx)(`h6`,{children:(0,U.jsx)(C,{m:X.shareDataWithAdvertisingPartners})}),description:(0,U.jsx)(C,{m:X.weShareLimitedDataWith})}),(0,U.jsx)(I,{type:`submit`,onClick:Te,children:(0,U.jsx)(C,{m:X.savePrivacyDefaults})})]}),(0,U.jsx)(`hr`,{})]})},fn=({label:e,infoHoverContent:t,value:n,onChange:r})=>{let i=(0,H.useId)();return(0,U.jsxs)(`div`,{className:Y.formItem,children:[(0,U.jsx)(`label`,{htmlFor:i,children:e}),(0,U.jsxs)(`div`,{className:Y.selectWithInfo,children:[(0,U.jsx)(rt,{id:i,value:n,onChange:r}),(0,U.jsx)(pn,{children:t})]})]})},Q=({className:e,checked:t,onChange:n,label:r,description:i})=>{let a=(0,H.useId)();return(0,U.jsxs)(`span`,{className:(0,W.default)(Y.horizontalCheckbox,e),children:[(0,U.jsx)(`label`,{children:(0,U.jsx)(`input`,{id:a,type:`checkbox`,checked:t,onChange:n})}),(0,U.jsxs)(`div`,{className:Y.labelWithDescription,children:[(0,U.jsx)(`label`,{htmlFor:a,children:r}),(0,U.jsx)(`span`,{children:i})]})]})},pn=({children:e})=>(0,U.jsx)(`div`,{className:Y.InfoIconWithHover,children:(0,U.jsx)(Ze,{noPadding:!1,wrappedChildren:(0,U.jsx)(V,{size:16}),theme:`settings`,className:Y.infoHover,placement:`right`,children:e})}),mn=()=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h2`,{children:(0,U.jsx)(C,{m:X.profilePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.publicProfilePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.followersOnlyProfilePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.privateProfilePrivacy})}),(0,U.jsx)(`a`,{onClick:()=>D(`Click Learn More On Privacy Settings`),href:`https://support.ridewithgps.com/hc/en-us/articles/4431569889435-Privacy-Settings#h_01GG5G8QHXMKBT9HB6PYC8ST6S`,children:(0,U.jsx)(C,{m:S.learnMore})})]}),hn=()=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h2`,{children:(0,U.jsx)(C,{m:X.routePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.publicRoutePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.followersOnlyRoutePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.privateRoutePrivacy})}),(0,U.jsx)(`a`,{onClick:()=>D(`Click Learn More On Privacy Settings`),href:`https://support.ridewithgps.com/hc/en-us/articles/4431569889435-Privacy-Settings#h_01GG5G8QHXMKBT9HB6PYC8ST6S`,children:(0,U.jsx)(C,{m:S.learnMore})})]}),gn=()=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h2`,{children:(0,U.jsx)(C,{m:X.ridePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.publicRidePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.followersOnlyRidePrivacy})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{m:X.privateRidePrivacy})}),(0,U.jsx)(`a`,{onClick:()=>D(`Click Learn More On Privacy Settings`),href:`https://support.ridewithgps.com/hc/en-us/articles/4431569889435-Privacy-Settings#h_01GG5G8QHXMKBT9HB6PYC8ST6S`,children:(0,U.jsx)(C,{m:S.learnMore})})]}),_n=(e,t)=>{let n=new WeakMap;window.rwgps[e]=(e,r)=>{let i=n.get(e);i&&i.unmount();let a=(0,tn.createRoot)(e);return n.set(e,a),a.render((0,U.jsx)(ge,{children:(0,U.jsx)(De,{children:(0,U.jsx)(t,{unmountComponent:()=>a.unmount(),...r})})})),{unmountComponent:()=>{n.get(e)===a&&n.delete(e),a.unmount()}}}},$=(e,t)=>{let n=`react-${e}`,r=()=>{let e=document.getElementById(n);if(e)return e;let t=document.createElement(`div`);return t.id=n,document.body.appendChild(t),t},i;window.rwgps[e]=e=>{i=(0,tn.createRoot)(r()),i.render((0,U.jsx)(ge,{children:(0,U.jsx)(De,{children:(0,U.jsx)(Le,{children:(0,U.jsx)(H.Suspense,{fallback:null,children:(0,U.jsx)(t,{...e,onRequestClose:a,rwgps:window.rwgps})})})})}))};let a=()=>{i.unmount()}},vn=se()?null:document.getElementById(`globalnav-ssr`);vn&&(0,tn.createRoot)(vn).render((0,U.jsx)(L,{boundaryName:`CoreShim`,children:(0,U.jsx)(Le,{children:(0,U.jsx)(rn,{children:(0,U.jsxs)(ge,{delayDuration:400,children:[(0,U.jsx)(ue,{}),(0,U.jsx)(be,{}),(0,U.jsx)(xe,{})]})})})})),$(`clubPoiEditor`,_t),$(`loginModalOverlay`,Fe),$(`upgradeModal`,et),$(`signupModal`,Pe),$(`gallery`,Be),$(`setAppServerModal`,bt),$(`setHomeLocationModal`,Ne),$(`legacyTSPDeprecationModal`,ct),$(`updatePaymentMethodModal`,(0,H.lazy)(()=>
9(window.__dit?.push(`src/bundles/recumbent/recumbent.tsx\0features/payments/UpdatePaymentMethodForm`),w(()=>import(`./UpdatePaymentMethodForm-CWda35HV.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157]),import.meta.url)).then(e=>({default:e.UpdatePaymentMethodModal})))),_n(`cancellationSurveyModal`,$t),$(`createEventModal`,(0,H.lazy)(()=>(window.__dit?.push(`src/bundles/recumbent/recumbent.tsx\0common/modals/CreateEventModal/CreateEventModal`),w(()=>import(`./CreateEventModal-DwW3LoZS.js`),__vite__mapDeps([158,1,3,4,5,25,26,27,28,23,29,14,30,31,32,33,34,6,7,8,9,2,10,11,12,13,15,159,43,44,18,19,20,21,45,46,47,48,35,36,37,38,39,40,41,42,55,56,57,63,64,65,85,51,160,161,162,163,164,165,101,73,99,166,60,61,62,167,103,168,74,71,72,169,170,171,172,173,174,175,176,177,178,179,87,180,181,148,149,150,70,75,76,77,143,182,183,184,185,186,187,188,141,142,144,145,146,189,190,191,192,193,194,195,97,98,58,59,66,67,68,134,82,196,197,100,102,104,105,106,107,108,109,110,111,112,113,80,81,83,198,199,200,123,201,202,203,204,205,206,207,208,209,210,211,212,213,122,214,215,216,217,218,219,133,220,221,222,223,224,130,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,120,121,124,248,249,250,251,252,253,254,255,256,117,118,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,49,50,52,53,54,69,78,79,84,272,273,274,275,276,277,278,279,280,281,282,94,283,284,285,286,287,288,131,132,289,290,291,292,293,294,295,296,297,298,17,299,300,301,92,93,95,302,303,304,305,306,307,308,309,310,311,312,313,314,315,16,316,317,86,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,152,334,335,336,337,338,24,88,89,90,91,96,114,115,116,119,125,126,127,128,129,135,136,339,22,137,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507]),import.meta.url)).then(e=>({default:e.CreateEventModal})))),$(`advancedExport`,({legacyRoute:e,...t})=>{let n=i();if(!n.id)return pe(Pe,{trigger:`legacyExport`}),null;if(!e)return null;let r=`accountLevel`in n?n.accountLevel:0,a=Ae.deserialize(e),o=a.permissions;return(0,U.jsx)(vt,{troute:a.set(`permissions`,{navigate:o?.navigate??!1,canBeCopied:o?.canBeCopied??!1,canOpenInPlanner:o?.canOpenInPlanner??!1,canBeModified:o?.canBeModified??!1,canBeDeleted:o?.canBeDeleted??!1,exportAsHistory:o?.exportAsHistory??!1,customizeExportOptions:r>0}),objectType:`route`,...t})}),_n(`routeHoverCard`,e=>(0,U.jsx)(n,{client:m,children:(0,U.jsx)(yt,{...e})})),_n(`helpPopover`,()=>(0,U.jsx)(n,{client:m,children:(0,U.jsx)(`div`,{className:Oe.floatingWrapper,children:(0,U.jsx)(ze,{})})})),_n(`privacyDefaultsForm`,()=>(0,U.jsx)(Le,{children:(0,U.jsx)(dn,{})})),window.dispatchEvent(new Event(`recumbentReady`)),window.recumbentReady=!0;

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.