@burdenoff/microfe-eventfullymanaged 2026.1102.4 → 2026.1102.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eventfullymanaged/components/ImageUploadField.d.ts +7 -5
- package/dist/eventfullymanaged/components/ImageUploadField.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.js +39 -48
- package/dist/eventfullymanaged/components/ImageUploadField.js.map +1 -1
- package/dist/eventfullymanaged/components/ResolvedImage.d.ts +16 -0
- package/dist/eventfullymanaged/components/ResolvedImage.d.ts.map +1 -0
- package/dist/eventfullymanaged/components/ResolvedImage.js +18 -0
- package/dist/eventfullymanaged/components/ResolvedImage.js.map +1 -0
- package/dist/eventfullymanaged/hooks/useResolvedImageUrl.d.ts +44 -0
- package/dist/eventfullymanaged/hooks/useResolvedImageUrl.d.ts.map +1 -0
- package/dist/eventfullymanaged/hooks/useResolvedImageUrl.js +106 -0
- package/dist/eventfullymanaged/hooks/useResolvedImageUrl.js.map +1 -0
- package/dist/eventfullymanaged/lib/fileRef.d.ts +25 -0
- package/dist/eventfullymanaged/lib/fileRef.d.ts.map +1 -0
- package/dist/eventfullymanaged/lib/fileRef.js +15 -0
- package/dist/eventfullymanaged/lib/fileRef.js.map +1 -0
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +81 -80
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js +1 -1
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js +73 -73
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js +97 -96
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +173 -134
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js +96 -94
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js.map +1 -1
- package/dist/utils/pageContext.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VenueDetailPage.js","names":["Badge","Badge$1","VenueDetailPage","useParams","useEventfullyManaged","useVenueQuery","id","venue","data","floorPlans","loading","Skeleton","statusVariant","PagePurpose","Button","navigate","ArrowLeft","GradientText","Edit","GlassCard","MapPin","Users","Building2","amenity","EntityTagsField","SquareStack","plan","IllustratedEmptyState","NextSteps","Megaphone"],"sources":["../../../../src/eventfullymanaged/pages/venues/VenueDetailPage.tsx"],"sourcesContent":["import { ArrowLeft, Building2, Edit, MapPin, Megaphone, SquareStack, Users } from 'lucide-react';\nimport {\n Badge,\n Button,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n NextSteps,\n PagePurpose,\n Skeleton,\n} from '@burdenoff/fe-libs/ui';\nimport { useParams } from 'react-router';\n\nimport { useVenueQuery } from '../../api/eventApi';\nimport { EntityTagsField } from '../../components/EntityTagsField';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\n\ntype VenueRecord = {\n id: string;\n name: string;\n description?: string | null;\n addressLine1?: string | null;\n city?: string | null;\n state?: string | null;\n country?: string | null;\n postalCode?: string | null;\n capacity?: number | null;\n status: string;\n amenities: string[];\n pricing?: Record<string, unknown> | null;\n openingHours?: Record<string, unknown> | null;\n metadata?: Record<string, unknown> | null;\n};\n\ntype FloorPlanRecord = {\n id: string;\n name: string;\n imageUrl?: string | null;\n dimensions?: Record<string, unknown> | null;\n};\n\nexport default function VenueDetailPage() {\n const { id = '' } = useParams<{ id: string }>();\n const { navigate } = useEventfullyManaged();\n const { data, loading } = useVenueQuery(id);\n\n const venue = (data?.venue ?? null) as VenueRecord | null;\n const floorPlans = (data?.floorPlans?.items ?? []) as FloorPlanRecord[];\n\n if (loading) {\n return (\n <div className=\"space-y-6 p-6\">\n <Skeleton className=\"h-8 w-32\" />\n <Skeleton className=\"h-8 w-64\" />\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-3\">\n <Skeleton className=\"h-24 rounded-card\" />\n <Skeleton className=\"h-24 rounded-card\" />\n <Skeleton className=\"h-24 rounded-card\" />\n </div>\n <Skeleton className=\"h-40 rounded-card\" />\n </div>\n );\n }\n\n const statusVariant: 'success' | 'secondary' | 'warning' =\n venue?.status === 'ACTIVE' ? 'success' : venue?.status === 'MAINTENANCE' ? 'warning' : 'secondary';\n\n if (!venue) {\n return (\n <div className=\"space-y-4 p-6\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => navigate('/venues')}>\n <ArrowLeft className=\"h-4 w-4\" />\n Back to Venues\n </Button>\n <GlassCard treatment=\"plain\" className=\"border-border-seam\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"Venue not found.\"\n description=\"This venue may have been removed or is outside your current scope.\"\n />\n </GlassCard>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n The full record for one venue. Review its location, capacity and status, see what amenities it offers, and\n manage the floor plans attendees will navigate. Come here to confirm a space is ready before you assign an event\n to it.\n </PagePurpose>\n\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"space-y-3\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => navigate('/venues')}>\n <ArrowLeft className=\"h-4 w-4\" />\n Back to Venues\n </Button>\n <div>\n <GradientText as=\"h1\" className=\"text-2xl font-bold\">\n {venue.name}\n </GradientText>\n <p className=\"mt-1 text-sm text-text-secondary\">{venue.description ?? 'No description provided.'}</p>\n </div>\n </div>\n <Button type=\"button\" onClick={() => navigate(`/venues/${venue.id}/edit`)}>\n <Edit className=\"h-4 w-4\" />\n Edit Venue\n </Button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-3\">\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <div className=\"mb-2 flex items-center gap-2 text-sm font-medium text-text-primary\">\n <MapPin className=\"h-4 w-4 text-action-primary-bg\" />\n Location\n </div>\n <p className=\"text-sm text-text-secondary\">\n {[venue.addressLine1, venue.city, venue.state, venue.country, venue.postalCode]\n .filter(Boolean)\n .join(', ') || 'Location not configured'}\n </p>\n </GlassCard>\n <GlassCard treatment=\"glass\" glow className=\"p-4\">\n <div className=\"mb-2 flex items-center gap-2 text-sm font-medium text-text-primary\">\n <Users className=\"h-4 w-4 text-action-primary-bg\" />\n Capacity\n </div>\n <p className=\"text-sm tabular-nums text-text-secondary\">{(venue.capacity ?? 0).toLocaleString()} attendees</p>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <div className=\"mb-2 flex items-center gap-2 text-sm font-medium text-text-primary\">\n <Building2 className=\"h-4 w-4 text-action-primary-bg\" />\n Status\n </div>\n <Badge variant={statusVariant} className=\"uppercase\">\n {venue.status}\n </Badge>\n </GlassCard>\n </div>\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-5\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Amenities</h2>\n <div className=\"mt-3 flex flex-wrap gap-2\">\n {venue.amenities.length > 0 ? (\n venue.amenities.map((amenity) => (\n <Badge key={amenity} variant=\"secondary\">\n {amenity}\n </Badge>\n ))\n ) : (\n <p className=\"text-sm text-text-secondary\">No amenities configured.</p>\n )}\n </div>\n </GlassCard>\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-5\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Tags</h2>\n <p className=\"mt-1 text-sm text-text-secondary\">\n Label this venue so you can group and filter it — for example by region, tier or amenity profile.\n </p>\n <EntityTagsField entityType=\"EVENTFULLYMANAGED_VENUE\" entityId={venue.id} label=\"Venue tags\" className=\"mt-3\" />\n </GlassCard>\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-5\">\n <div className=\"flex items-center justify-between gap-3\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Floor Plans</h2>\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={() => navigate(`/venues/${venue.id}/floor-plans`)}>\n <SquareStack className=\"h-4 w-4\" />\n Manage Floor Plans\n </Button>\n </div>\n <div className=\"mt-4\">\n {floorPlans.length > 0 ? (\n <ul className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n {floorPlans.map((plan) => (\n <li key={plan.id}>\n <button\n type=\"button\"\n onClick={() => navigate(`/venues/${venue.id}/floor-plans`)}\n className=\"flex w-full items-center gap-3 rounded-card border border-border-seam p-3 text-left transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus\"\n >\n <span className=\"flex h-14 w-14 shrink-0 items-center justify-center overflow-hidden rounded-md bg-bg-sunken\">\n {plan.imageUrl ? (\n <img\n src={plan.imageUrl}\n alt={`${plan.name} floor plan`}\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <SquareStack className=\"h-5 w-5 text-text-muted\" />\n )}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block truncate font-medium text-text-primary\">{plan.name}</span>\n <span className=\"block text-sm text-text-secondary\">\n {plan.imageUrl ? 'Map attached' : 'No image configured'}\n </span>\n </span>\n </button>\n </li>\n ))}\n </ul>\n ) : (\n <IllustratedEmptyState\n illustration=\"empty-files\"\n title=\"No floor plans have been added yet.\"\n className=\"py-8\"\n />\n )}\n </div>\n </GlassCard>\n\n <NextSteps\n storageKey=\"eventfullymanaged-venue-detail\"\n title=\"Get this venue ready to host\"\n steps={[\n {\n id: 'edit-venue',\n label: 'Edit venue details',\n description: 'Update capacity, address, status and amenities.',\n icon: <Edit className=\"h-4 w-4\" />,\n onClick: () => navigate(`/venues/${venue.id}/edit`),\n },\n {\n id: 'floor-plans',\n label: 'Add floor plans',\n description: 'Map the layout so attendees and staff can navigate.',\n icon: <SquareStack className=\"h-4 w-4\" />,\n onClick: () => navigate(`/venues/${venue.id}/floor-plans`),\n },\n {\n id: 'resources',\n label: 'Review resource readiness',\n description: 'Check capacity, amenities and plans at a glance.',\n icon: <Megaphone className=\"h-4 w-4\" />,\n onClick: () => navigate(`/venues/${venue.id}/resources`),\n },\n ]}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAyCA,SAAwBE,IAAkB;CACxC,IAAM,EAAE,QAAK,OAAOC,EAA0B,GACxC,EAAE,gBAAaC,EAAqB,GACpC,EAAE,SAAM,eAAYC,EAAcC,CAAE,GAEpCC,IAASC,GAAM,SAAS,MACxBC,IAAcD,GAAM,YAAY,SAAS,CAAC;CAEhD,IAAIE,GACF,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAACC,GAAD,EAAU,WAAU,WAAY,CAAA;GAChC,kBAACA,GAAD,EAAU,WAAU,WAAY,CAAA;GAChC,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,kBAACA,GAAD,EAAU,WAAU,oBAAqB,CAAA;KACzC,kBAACA,GAAD,EAAU,WAAU,oBAAqB,CAAA;KACzC,kBAACA,GAAD,EAAU,WAAU,oBAAqB,CAAA;IACtC;;GACL,kBAACA,GAAD,EAAU,WAAU,oBAAqB,CAAA;EACtC;;CAIT,IAAMC,IACJL,GAAO,WAAW,WAAW,YAAYA,GAAO,WAAW,gBAAgB,YAAY;CA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AeV,EAAS,WAAWR,EAAM,GAAG,aAAa;KAC3D;KACA;MACE,IAAI;MACJ,OAAO;MACP,aAAa;MACb,MAAM,kBAACsB,GAAD,EAAW,WAAU,UAAW,CAAA;MACtC,eAAed,EAAS,WAAWR,EAAM,GAAG,WAAW;KACzD;IACF;GACD,CAAA;EACE;C,KA5KH,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAACO,GAAD;GAAQ,MAAK;GAAS,SAAQ;GAAQ,MAAK;GAAK,eAAeC,EAAS,SAAS;GAAjF,UAAA,CACE,kBAACC,GAAD,EAAW,WAAU,UAAW,CAAA,GAAC,gBAE3B;EACR,CAAA,GAAA,kBAACG,GAAD;GAAW,WAAU;GAAQ,WAAU;GACrC,UAAA,kBAACQ,GAAD;IACE,cAAa;IACb,OAAM;IACN,aAAY;GACb,CAAA;EACQ,CAAA,CACR;;AAkKX"}
|
|
1
|
+
{"version":3,"file":"VenueDetailPage.js","names":["Badge","Badge$1","VenueDetailPage","useParams","useEventfullyManaged","useVenueQuery","id","venue","data","floorPlans","loading","Skeleton","statusVariant","PagePurpose","Button","navigate","ArrowLeft","GradientText","Edit","GlassCard","MapPin","Users","Building2","amenity","EntityTagsField","SquareStack","ResolvedImage","plan","IllustratedEmptyState","NextSteps","Megaphone"],"sources":["../../../../src/eventfullymanaged/pages/venues/VenueDetailPage.tsx"],"sourcesContent":["import { ArrowLeft, Building2, Edit, MapPin, Megaphone, SquareStack, Users } from 'lucide-react';\nimport {\n Badge,\n Button,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n NextSteps,\n PagePurpose,\n Skeleton,\n} from '@burdenoff/fe-libs/ui';\nimport { useParams } from 'react-router';\n\nimport { useVenueQuery } from '../../api/eventApi';\nimport { EntityTagsField } from '../../components/EntityTagsField';\nimport { ResolvedImage } from '../../components/ResolvedImage';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\n\ntype VenueRecord = {\n id: string;\n name: string;\n description?: string | null;\n addressLine1?: string | null;\n city?: string | null;\n state?: string | null;\n country?: string | null;\n postalCode?: string | null;\n capacity?: number | null;\n status: string;\n amenities: string[];\n pricing?: Record<string, unknown> | null;\n openingHours?: Record<string, unknown> | null;\n metadata?: Record<string, unknown> | null;\n};\n\ntype FloorPlanRecord = {\n id: string;\n name: string;\n imageUrl?: string | null;\n dimensions?: Record<string, unknown> | null;\n};\n\nexport default function VenueDetailPage() {\n const { id = '' } = useParams<{ id: string }>();\n const { navigate } = useEventfullyManaged();\n const { data, loading } = useVenueQuery(id);\n\n const venue = (data?.venue ?? null) as VenueRecord | null;\n const floorPlans = (data?.floorPlans?.items ?? []) as FloorPlanRecord[];\n\n if (loading) {\n return (\n <div className=\"space-y-6 p-6\">\n <Skeleton className=\"h-8 w-32\" />\n <Skeleton className=\"h-8 w-64\" />\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-3\">\n <Skeleton className=\"h-24 rounded-card\" />\n <Skeleton className=\"h-24 rounded-card\" />\n <Skeleton className=\"h-24 rounded-card\" />\n </div>\n <Skeleton className=\"h-40 rounded-card\" />\n </div>\n );\n }\n\n const statusVariant: 'success' | 'secondary' | 'warning' =\n venue?.status === 'ACTIVE' ? 'success' : venue?.status === 'MAINTENANCE' ? 'warning' : 'secondary';\n\n if (!venue) {\n return (\n <div className=\"space-y-4 p-6\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => navigate('/venues')}>\n <ArrowLeft className=\"h-4 w-4\" />\n Back to Venues\n </Button>\n <GlassCard treatment=\"plain\" className=\"border-border-seam\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"Venue not found.\"\n description=\"This venue may have been removed or is outside your current scope.\"\n />\n </GlassCard>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n The full record for one venue. Review its location, capacity and status, see what amenities it offers, and\n manage the floor plans attendees will navigate. Come here to confirm a space is ready before you assign an event\n to it.\n </PagePurpose>\n\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"space-y-3\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => navigate('/venues')}>\n <ArrowLeft className=\"h-4 w-4\" />\n Back to Venues\n </Button>\n <div>\n <GradientText as=\"h1\" className=\"text-2xl font-bold\">\n {venue.name}\n </GradientText>\n <p className=\"mt-1 text-sm text-text-secondary\">{venue.description ?? 'No description provided.'}</p>\n </div>\n </div>\n <Button type=\"button\" onClick={() => navigate(`/venues/${venue.id}/edit`)}>\n <Edit className=\"h-4 w-4\" />\n Edit Venue\n </Button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-3\">\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <div className=\"mb-2 flex items-center gap-2 text-sm font-medium text-text-primary\">\n <MapPin className=\"h-4 w-4 text-action-primary-bg\" />\n Location\n </div>\n <p className=\"text-sm text-text-secondary\">\n {[venue.addressLine1, venue.city, venue.state, venue.country, venue.postalCode]\n .filter(Boolean)\n .join(', ') || 'Location not configured'}\n </p>\n </GlassCard>\n <GlassCard treatment=\"glass\" glow className=\"p-4\">\n <div className=\"mb-2 flex items-center gap-2 text-sm font-medium text-text-primary\">\n <Users className=\"h-4 w-4 text-action-primary-bg\" />\n Capacity\n </div>\n <p className=\"text-sm tabular-nums text-text-secondary\">{(venue.capacity ?? 0).toLocaleString()} attendees</p>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <div className=\"mb-2 flex items-center gap-2 text-sm font-medium text-text-primary\">\n <Building2 className=\"h-4 w-4 text-action-primary-bg\" />\n Status\n </div>\n <Badge variant={statusVariant} className=\"uppercase\">\n {venue.status}\n </Badge>\n </GlassCard>\n </div>\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-5\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Amenities</h2>\n <div className=\"mt-3 flex flex-wrap gap-2\">\n {venue.amenities.length > 0 ? (\n venue.amenities.map((amenity) => (\n <Badge key={amenity} variant=\"secondary\">\n {amenity}\n </Badge>\n ))\n ) : (\n <p className=\"text-sm text-text-secondary\">No amenities configured.</p>\n )}\n </div>\n </GlassCard>\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-5\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Tags</h2>\n <p className=\"mt-1 text-sm text-text-secondary\">\n Label this venue so you can group and filter it — for example by region, tier or amenity profile.\n </p>\n <EntityTagsField entityType=\"EVENTFULLYMANAGED_VENUE\" entityId={venue.id} label=\"Venue tags\" className=\"mt-3\" />\n </GlassCard>\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-5\">\n <div className=\"flex items-center justify-between gap-3\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Floor Plans</h2>\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={() => navigate(`/venues/${venue.id}/floor-plans`)}>\n <SquareStack className=\"h-4 w-4\" />\n Manage Floor Plans\n </Button>\n </div>\n <div className=\"mt-4\">\n {floorPlans.length > 0 ? (\n <ul className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n {floorPlans.map((plan) => (\n <li key={plan.id}>\n <button\n type=\"button\"\n onClick={() => navigate(`/venues/${venue.id}/floor-plans`)}\n className=\"flex w-full items-center gap-3 rounded-card border border-border-seam p-3 text-left transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus\"\n >\n <span className=\"flex h-14 w-14 shrink-0 items-center justify-center overflow-hidden rounded-md bg-bg-sunken\">\n <ResolvedImage\n value={plan.imageUrl}\n alt={`${plan.name} floor plan`}\n className=\"h-full w-full object-cover\"\n fallback={<SquareStack className=\"h-5 w-5 text-text-muted\" />}\n />\n </span>\n <span className=\"min-w-0\">\n <span className=\"block truncate font-medium text-text-primary\">{plan.name}</span>\n <span className=\"block text-sm text-text-secondary\">\n {plan.imageUrl ? 'Map attached' : 'No image configured'}\n </span>\n </span>\n </button>\n </li>\n ))}\n </ul>\n ) : (\n <IllustratedEmptyState\n illustration=\"empty-files\"\n title=\"No floor plans have been added yet.\"\n className=\"py-8\"\n />\n )}\n </div>\n </GlassCard>\n\n <NextSteps\n storageKey=\"eventfullymanaged-venue-detail\"\n title=\"Get this venue ready to host\"\n steps={[\n {\n id: 'edit-venue',\n label: 'Edit venue details',\n description: 'Update capacity, address, status and amenities.',\n icon: <Edit className=\"h-4 w-4\" />,\n onClick: () => navigate(`/venues/${venue.id}/edit`),\n },\n {\n id: 'floor-plans',\n label: 'Add floor plans',\n description: 'Map the layout so attendees and staff can navigate.',\n icon: <SquareStack className=\"h-4 w-4\" />,\n onClick: () => navigate(`/venues/${venue.id}/floor-plans`),\n },\n {\n id: 'resources',\n label: 'Review resource readiness',\n description: 'Check capacity, amenities and plans at a glance.',\n icon: <Megaphone className=\"h-4 w-4\" />,\n onClick: () => navigate(`/venues/${venue.id}/resources`),\n },\n ]}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AA0CA,SAAwBE,IAAkB;CACxC,IAAM,EAAE,QAAK,OAAOC,EAA0B,GACxC,EAAE,gBAAaC,EAAqB,GACpC,EAAE,SAAM,eAAYC,EAAcC,CAAE,GAEpCC,IAASC,GAAM,SAAS,MACxBC,IAAcD,GAAM,YAAY,SAAS,CAAC;CAEhD,IAAIE,GACF,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAACC,GAAD,EAAU,WAAU,WAAY,CAAA;GAChC,kBAACA,GAAD,EAAU,WAAU,WAAY,CAAA;GAChC,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,kBAACA,GAAD,EAAU,WAAU,oBAAqB,CAAA;KACzC,kBAACA,GAAD,EAAU,WAAU,oBAAqB,CAAA;KACzC,kBAACA,GAAD,EAAU,WAAU,oBAAqB,CAAA;IACtC;;GACL,kBAACA,GAAD,EAAU,WAAU,oBAAqB,CAAA;EACtC;;CAIT,IAAMC,IACJL,GAAO,WAAW,WAAW,YAAY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AU,UAAW,CAAA;MACxC,eAAeV,EAAS,WAAWR,EAAM,GAAG,aAAa;KAC3D;KACA;MACE,IAAI;MACJ,OAAO;MACP,aAAa;MACb,MAAM,kBAACuB,GAAD,EAAW,WAAU,UAAW,CAAA;MACtC,eAAef,EAAS,WAAWR,EAAM,GAAG,WAAW;KACzD;IACF;GACD,CAAA;EACE;C,KAzKH,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAACO,GAAD;GAAQ,MAAK;GAAS,SAAQ;GAAQ,MAAK;GAAK,eAAeC,EAAS,SAAS;GAAjF,UAAA,CACE,kBAACC,GAAD,EAAW,WAAU,UAAW,CAAA,GAAC,gBAE3B;EACR,CAAA,GAAA,kBAACG,GAAD;GAAW,WAAU;GAAQ,WAAU;GACrC,UAAA,kBAACS,GAAD;IACE,cAAa;IACb,OAAM;IACN,aAAY;GACb,CAAA;EACQ,CAAA,CACR;;AA+JX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuery.js","names":["React","equal","React$1","lastWatchOptions","useQuery","options","wrapHook","useQuery_","useApolloClient","query","client","watchQueryOptions","useOptions","createState","observable","previous","state","setState","useInitialFetchPolicyIfNecessary","useResubscribeIfNecessary","resultData","result","useResult","ssr","obsQueryFields","previousData","rest","fromSkipToken","useDeepMemo","skipToken","opts","mergeOptions","defaultOptions","variablesUnknownSymbol","fetchPolicy","useSyncExternalStore","subscription","observeOn","asapScheduler","handleStoreChange","shouldReobserve","previousOptions","maybeDeepFreeze","NetworkStatus"],"sources":["../../../../../../node_modules/@apollo/client/react/hooks/useQuery.js"],"sourcesContent":["/**\n * Function parameters in this file try to follow a common order for the sake of\n * readability and consistency. The order is as follows:\n *\n * resultData\n * observable\n * client\n * query\n * options\n * watchQueryOptions\n * makeWatchQueryOptions\n */\n/** */\nimport { equal } from \"@wry/equality\";\nimport * as React from \"react\";\nimport { asapScheduler, observeOn } from \"rxjs\";\nimport { NetworkStatus } from \"@apollo/client\";\nimport { maybeDeepFreeze, mergeOptions, variablesUnknownSymbol, } from \"@apollo/client/utilities/internal\";\nimport { skipToken } from \"./constants.js\";\nimport { useDeepMemo, wrapHook } from \"./internal/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\nimport { useSyncExternalStore } from \"./useSyncExternalStore.js\";\nconst lastWatchOptions = Symbol();\nexport const useQuery = function useQuery(query, ...[options]) {\n \"use no memo\";\n return wrapHook(\"useQuery\", useQuery_, useApolloClient(typeof options === \"object\" ? options.client : undefined))(query, options);\n};\nfunction useQuery_(query, options = {}) {\n const client = useApolloClient(typeof options === \"object\" ? options.client : undefined);\n const { ssr } = typeof options === \"object\" ? options : {};\n const watchQueryOptions = useOptions(query, options, client.defaultOptions.watchQuery);\n function createState(previous) {\n const observable = client.watchQuery(watchQueryOptions);\n return {\n client,\n query,\n observable,\n resultData: {\n current: observable.getCurrentResult(),\n // Reuse previousData from previous InternalState (if any) to provide\n // continuity of previousData even if/when the query or client changes.\n previousData: previous?.resultData.current.data,\n variables: observable.variables,\n },\n };\n }\n let [state, setState] = React.useState(createState);\n if (client !== state.client || query !== state.query) {\n // If the client or query have changed, we need to create a new InternalState.\n // This will trigger a re-render with the new state, but it will also continue\n // to run the current render function to completion.\n // Since we sometimes trigger some side-effects in the render function, we\n // re-assign `state` to the new state to ensure that those side-effects are\n // triggered with the new state.\n setState((state = createState(state)));\n }\n const { observable, resultData } = state;\n useInitialFetchPolicyIfNecessary(watchQueryOptions, observable);\n useResubscribeIfNecessary(resultData, // might get mutated during render\n observable, // might get mutated during render\n watchQueryOptions);\n const result = useResult(observable, resultData, ssr);\n const obsQueryFields = React.useMemo(() => ({\n refetch: observable.refetch.bind(observable),\n fetchMore: observable.fetchMore.bind(observable),\n updateQuery: observable.updateQuery.bind(observable),\n startPolling: observable.startPolling.bind(observable),\n stopPolling: observable.stopPolling.bind(observable),\n subscribeToMore: observable.subscribeToMore.bind(observable),\n }), [observable]);\n const previousData = resultData.previousData;\n return React.useMemo(() => {\n const { partial, ...rest } = result;\n return {\n ...rest,\n client,\n observable,\n variables: observable.variables,\n previousData,\n ...obsQueryFields,\n };\n }, [result, client, observable, previousData, obsQueryFields]);\n}\nconst fromSkipToken = Symbol();\nfunction useOptions(query, options, defaultOptions) {\n return useDeepMemo(() => {\n if (options === skipToken) {\n const opts = {\n ...mergeOptions(defaultOptions, {\n query,\n fetchPolicy: \"standby\",\n }),\n [variablesUnknownSymbol]: true,\n };\n opts[fromSkipToken] = true;\n return opts;\n }\n const watchQueryOptions = mergeOptions(defaultOptions, { ...options, query });\n if (options.skip) {\n watchQueryOptions.initialFetchPolicy =\n options.initialFetchPolicy || options.fetchPolicy;\n watchQueryOptions.fetchPolicy = \"standby\";\n }\n return watchQueryOptions;\n }, [query, options, defaultOptions]);\n}\nfunction useInitialFetchPolicyIfNecessary(watchQueryOptions, observable) {\n \"use no memo\";\n if (!watchQueryOptions.fetchPolicy) {\n watchQueryOptions.fetchPolicy = observable.options.initialFetchPolicy;\n }\n}\nfunction useResult(observable, resultData, ssr) {\n \"use no memo\";\n const fetchPolicy = observable.options.fetchPolicy;\n return useSyncExternalStore(React.useCallback((handleStoreChange) => {\n const subscription = observable\n // We use the asapScheduler here to prevent issues with trying to\n // update in the middle of a render. `reobserve` is kicked off in the\n // middle of a render and because RxJS emits values synchronously,\n // its possible for this `handleStoreChange` to be called in that same\n // render. This allows the render to complete before trying to emit a\n // new value.\n .pipe(observeOn(asapScheduler))\n .subscribe((result) => {\n const previous = resultData.current;\n if (\n // Avoid rerendering if the result is the same\n equal(previous, result) &&\n // Force rerender if the value was emitted because variables\n // changed, such as when calling `refetch(newVars)` which returns\n // the same data when `notifyOnNetworkStatusChange` is `false`.\n equal(resultData.variables, observable.variables)) {\n return;\n }\n resultData.variables = observable.variables;\n if (previous.data && !equal(previous.data, result.data)) {\n resultData.previousData = previous.data;\n }\n resultData.current = result;\n handleStoreChange();\n });\n // Do the \"unsubscribe\" with a short delay.\n // This way, an existing subscription can be reused without an additional\n // request if \"unsubscribe\" and \"resubscribe\" to the same ObservableQuery\n // happen in very fast succession.\n return () => {\n setTimeout(() => subscription.unsubscribe());\n };\n }, [observable, resultData]), () => resultData.current, () => ((fetchPolicy !== \"standby\" && ssr === false) ||\n fetchPolicy === \"no-cache\") ?\n useQuery.ssrDisabledResult\n : resultData.current);\n}\n// this hook is not compatible with any rules of React, and there's no good way to rewrite it.\n// it should stay a separate hook that will not be optimized by the compiler\nfunction useResubscribeIfNecessary(\n/** this hook will mutate properties on `resultData` */\nresultData, \n/** this hook will mutate properties on `observable` */\nobservable, watchQueryOptions) {\n \"use no memo\";\n if (observable[lastWatchOptions] &&\n !equal(observable[lastWatchOptions], watchQueryOptions)) {\n // If skipToken was used to generate options, we won't know the correct\n // initialFetchPolicy until the hook is rerendered with real options, so we\n // set it the next time we get real options\n if (observable[lastWatchOptions][fromSkipToken] &&\n !watchQueryOptions.initialFetchPolicy) {\n watchQueryOptions.initialFetchPolicy =\n watchQueryOptions.fetchPolicy;\n }\n // Though it might be tempting to postpone this reobserve call to the\n // useEffect block, we need getCurrentResult to return an appropriate\n // loading:true result synchronously (later within the same call to\n // useQuery). Since we already have this.observable here (not true for\n // the very first call to useQuery), we are not initiating any new\n // subscriptions, though it does feel less than ideal that reobserve\n // (potentially) kicks off a network request (for example, when the\n // variables have changed), which is technically a side-effect.\n if (shouldReobserve(observable[lastWatchOptions], watchQueryOptions)) {\n observable.reobserve(watchQueryOptions);\n }\n else {\n observable.applyOptions(watchQueryOptions);\n }\n // Make sure getCurrentResult returns a fresh ApolloQueryResult<TData>,\n // but save the current data as this.previousData, just like setResult\n // usually does.\n const result = observable.getCurrentResult();\n if (!equal(result.data, resultData.current.data)) {\n resultData.previousData = (resultData.current.data ||\n resultData.previousData);\n }\n resultData.current = result;\n resultData.variables = observable.variables;\n }\n observable[lastWatchOptions] = watchQueryOptions;\n}\nfunction shouldReobserve(previousOptions, options) {\n return (previousOptions.query !== options.query ||\n !equal(previousOptions.variables, options.variables) ||\n (previousOptions.fetchPolicy !== options.fetchPolicy &&\n (options.fetchPolicy === \"standby\" ||\n previousOptions.fetchPolicy === \"standby\")));\n}\nuseQuery.ssrDisabledResult = maybeDeepFreeze({\n loading: true,\n data: void 0,\n dataState: \"empty\",\n error: void 0,\n networkStatus: NetworkStatus.loading,\n partial: true,\n});\n//# sourceMappingURL=useQuery.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAsBA,IAAMG,IAAmB,OAAO,GACnBC,IAAW,SAAkB,GAAO,GAAG,CAACC,IAAU;CAC3D;CACA,OAAOC,EAAS,YAAYC,GAAWC,EAAgB,OAAOH,KAAY,WAAWA,EAAQ,SAAS,KAAA,CAAS,CAAC,CAAC,CAACI,GAAOJ,CAAO;AACpI;AACA,SAASE,EAAU,GAAO,IAAU,CAAC,GAAG;CACpC,IAAMG,IAASF,EAAgB,OAAOH,KAAY,WAAWA,EAAQ,SAAS,KAAA,CAAS,GACjF,EAAE,WAAQ,OAAOA,KAAY,WAAWA,IAAU,CAAC,GACnDM,IAAoBC,EAAWH,GAAOJ,GAASK,EAAO,eAAe,UAAU;CACrF,SAASG,EAAY,GAAU;EAC3B,IAAMC,IAAaJ,EAAO,WAAWC,CAAiB;EACtD,OAAO;GACH;GACA;GACA;GACA,YAAY;IACR,SAASG,EAAW,iBAAiB;IAGrC,cAAcC,GAAU,WAAW,QAAQ;IAC3C,WAAWD,EAAW;GAC1B;EACJ;CACJ;CACA,IAAI,CAACE,GAAOC,KAAYjB,EAAM,SAASa,CAAW;CAClD,CAAIH,MAAWM,EAAM,UAAUP,MAAUO,EAAM,UAO3CC,EAAU,IAAQJ,EAAYG,CAAK,CAAE;CAEzC,IAAM,EAAE,eAAY,kBAAeA;CAEnC,AADAE,EAAiCP,GAAmBG,CAAU,GAC9DK,EAA0BC,GAC1BN,GACAH,CAAiB;CACjB,IAAMU,IAASC,EAAUR,GAAYM,GAAYG,CAAG,GAC9CC,IAAiBxB,EAAM,eAAe;EACxC,SAASc,EAAW,QAA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,WAAW;CACX,OAAO,KAAK;CACZ,eAAeC,EAAc;CAC7B,SAAS;AACb,CAAC"}
|
|
1
|
+
{"version":3,"file":"useQuery.js","names":["React","useSyncExternalStore","equal","useSyncExternalStore$1","React$1","lastWatchOptions","useQuery","options","wrapHook","useQuery_","useApolloClient","query","client","watchQueryOptions","useOptions","createState","observable","previous","state","setState","useInitialFetchPolicyIfNecessary","useResubscribeIfNecessary","resultData","result","useResult","ssr","obsQueryFields","previousData","rest","fromSkipToken","useDeepMemo","skipToken","opts","mergeOptions","defaultOptions","variablesUnknownSymbol","fetchPolicy","subscription","observeOn","asapScheduler","handleStoreChange","shouldReobserve","previousOptions","maybeDeepFreeze","NetworkStatus"],"sources":["../../../../../../node_modules/@apollo/client/react/hooks/useQuery.js"],"sourcesContent":["/**\n * Function parameters in this file try to follow a common order for the sake of\n * readability and consistency. The order is as follows:\n *\n * resultData\n * observable\n * client\n * query\n * options\n * watchQueryOptions\n * makeWatchQueryOptions\n */\n/** */\nimport { equal } from \"@wry/equality\";\nimport * as React from \"react\";\nimport { asapScheduler, observeOn } from \"rxjs\";\nimport { NetworkStatus } from \"@apollo/client\";\nimport { maybeDeepFreeze, mergeOptions, variablesUnknownSymbol, } from \"@apollo/client/utilities/internal\";\nimport { skipToken } from \"./constants.js\";\nimport { useDeepMemo, wrapHook } from \"./internal/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\nimport { useSyncExternalStore } from \"./useSyncExternalStore.js\";\nconst lastWatchOptions = Symbol();\nexport const useQuery = function useQuery(query, ...[options]) {\n \"use no memo\";\n return wrapHook(\"useQuery\", useQuery_, useApolloClient(typeof options === \"object\" ? options.client : undefined))(query, options);\n};\nfunction useQuery_(query, options = {}) {\n const client = useApolloClient(typeof options === \"object\" ? options.client : undefined);\n const { ssr } = typeof options === \"object\" ? options : {};\n const watchQueryOptions = useOptions(query, options, client.defaultOptions.watchQuery);\n function createState(previous) {\n const observable = client.watchQuery(watchQueryOptions);\n return {\n client,\n query,\n observable,\n resultData: {\n current: observable.getCurrentResult(),\n // Reuse previousData from previous InternalState (if any) to provide\n // continuity of previousData even if/when the query or client changes.\n previousData: previous?.resultData.current.data,\n variables: observable.variables,\n },\n };\n }\n let [state, setState] = React.useState(createState);\n if (client !== state.client || query !== state.query) {\n // If the client or query have changed, we need to create a new InternalState.\n // This will trigger a re-render with the new state, but it will also continue\n // to run the current render function to completion.\n // Since we sometimes trigger some side-effects in the render function, we\n // re-assign `state` to the new state to ensure that those side-effects are\n // triggered with the new state.\n setState((state = createState(state)));\n }\n const { observable, resultData } = state;\n useInitialFetchPolicyIfNecessary(watchQueryOptions, observable);\n useResubscribeIfNecessary(resultData, // might get mutated during render\n observable, // might get mutated during render\n watchQueryOptions);\n const result = useResult(observable, resultData, ssr);\n const obsQueryFields = React.useMemo(() => ({\n refetch: observable.refetch.bind(observable),\n fetchMore: observable.fetchMore.bind(observable),\n updateQuery: observable.updateQuery.bind(observable),\n startPolling: observable.startPolling.bind(observable),\n stopPolling: observable.stopPolling.bind(observable),\n subscribeToMore: observable.subscribeToMore.bind(observable),\n }), [observable]);\n const previousData = resultData.previousData;\n return React.useMemo(() => {\n const { partial, ...rest } = result;\n return {\n ...rest,\n client,\n observable,\n variables: observable.variables,\n previousData,\n ...obsQueryFields,\n };\n }, [result, client, observable, previousData, obsQueryFields]);\n}\nconst fromSkipToken = Symbol();\nfunction useOptions(query, options, defaultOptions) {\n return useDeepMemo(() => {\n if (options === skipToken) {\n const opts = {\n ...mergeOptions(defaultOptions, {\n query,\n fetchPolicy: \"standby\",\n }),\n [variablesUnknownSymbol]: true,\n };\n opts[fromSkipToken] = true;\n return opts;\n }\n const watchQueryOptions = mergeOptions(defaultOptions, { ...options, query });\n if (options.skip) {\n watchQueryOptions.initialFetchPolicy =\n options.initialFetchPolicy || options.fetchPolicy;\n watchQueryOptions.fetchPolicy = \"standby\";\n }\n return watchQueryOptions;\n }, [query, options, defaultOptions]);\n}\nfunction useInitialFetchPolicyIfNecessary(watchQueryOptions, observable) {\n \"use no memo\";\n if (!watchQueryOptions.fetchPolicy) {\n watchQueryOptions.fetchPolicy = observable.options.initialFetchPolicy;\n }\n}\nfunction useResult(observable, resultData, ssr) {\n \"use no memo\";\n const fetchPolicy = observable.options.fetchPolicy;\n return useSyncExternalStore(React.useCallback((handleStoreChange) => {\n const subscription = observable\n // We use the asapScheduler here to prevent issues with trying to\n // update in the middle of a render. `reobserve` is kicked off in the\n // middle of a render and because RxJS emits values synchronously,\n // its possible for this `handleStoreChange` to be called in that same\n // render. This allows the render to complete before trying to emit a\n // new value.\n .pipe(observeOn(asapScheduler))\n .subscribe((result) => {\n const previous = resultData.current;\n if (\n // Avoid rerendering if the result is the same\n equal(previous, result) &&\n // Force rerender if the value was emitted because variables\n // changed, such as when calling `refetch(newVars)` which returns\n // the same data when `notifyOnNetworkStatusChange` is `false`.\n equal(resultData.variables, observable.variables)) {\n return;\n }\n resultData.variables = observable.variables;\n if (previous.data && !equal(previous.data, result.data)) {\n resultData.previousData = previous.data;\n }\n resultData.current = result;\n handleStoreChange();\n });\n // Do the \"unsubscribe\" with a short delay.\n // This way, an existing subscription can be reused without an additional\n // request if \"unsubscribe\" and \"resubscribe\" to the same ObservableQuery\n // happen in very fast succession.\n return () => {\n setTimeout(() => subscription.unsubscribe());\n };\n }, [observable, resultData]), () => resultData.current, () => ((fetchPolicy !== \"standby\" && ssr === false) ||\n fetchPolicy === \"no-cache\") ?\n useQuery.ssrDisabledResult\n : resultData.current);\n}\n// this hook is not compatible with any rules of React, and there's no good way to rewrite it.\n// it should stay a separate hook that will not be optimized by the compiler\nfunction useResubscribeIfNecessary(\n/** this hook will mutate properties on `resultData` */\nresultData, \n/** this hook will mutate properties on `observable` */\nobservable, watchQueryOptions) {\n \"use no memo\";\n if (observable[lastWatchOptions] &&\n !equal(observable[lastWatchOptions], watchQueryOptions)) {\n // If skipToken was used to generate options, we won't know the correct\n // initialFetchPolicy until the hook is rerendered with real options, so we\n // set it the next time we get real options\n if (observable[lastWatchOptions][fromSkipToken] &&\n !watchQueryOptions.initialFetchPolicy) {\n watchQueryOptions.initialFetchPolicy =\n watchQueryOptions.fetchPolicy;\n }\n // Though it might be tempting to postpone this reobserve call to the\n // useEffect block, we need getCurrentResult to return an appropriate\n // loading:true result synchronously (later within the same call to\n // useQuery). Since we already have this.observable here (not true for\n // the very first call to useQuery), we are not initiating any new\n // subscriptions, though it does feel less than ideal that reobserve\n // (potentially) kicks off a network request (for example, when the\n // variables have changed), which is technically a side-effect.\n if (shouldReobserve(observable[lastWatchOptions], watchQueryOptions)) {\n observable.reobserve(watchQueryOptions);\n }\n else {\n observable.applyOptions(watchQueryOptions);\n }\n // Make sure getCurrentResult returns a fresh ApolloQueryResult<TData>,\n // but save the current data as this.previousData, just like setResult\n // usually does.\n const result = observable.getCurrentResult();\n if (!equal(result.data, resultData.current.data)) {\n resultData.previousData = (resultData.current.data ||\n resultData.previousData);\n }\n resultData.current = result;\n resultData.variables = observable.variables;\n }\n observable[lastWatchOptions] = watchQueryOptions;\n}\nfunction shouldReobserve(previousOptions, options) {\n return (previousOptions.query !== options.query ||\n !equal(previousOptions.variables, options.variables) ||\n (previousOptions.fetchPolicy !== options.fetchPolicy &&\n (options.fetchPolicy === \"standby\" ||\n previousOptions.fetchPolicy === \"standby\")));\n}\nuseQuery.ssrDisabledResult = maybeDeepFreeze({\n loading: true,\n data: void 0,\n dataState: \"empty\",\n error: void 0,\n networkStatus: NetworkStatus.loading,\n partial: true,\n});\n//# sourceMappingURL=useQuery.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAsBA,IAAMK,IAAmB,OAAO,GACnBC,IAAW,SAAkB,GAAO,GAAG,CAACC,IAAU;CAC3D;CACA,OAAOC,EAAS,YAAYC,GAAWC,EAAgB,OAAOH,KAAY,WAAWA,EAAQ,SAAS,KAAA,CAAS,CAAC,CAAC,CAACI,GAAOJ,CAAO;AACpI;AACA,SAASE,EAAU,GAAO,IAAU,CAAC,GAAG;CACpC,IAAM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H,EAAMc,EAAWX,IAAmBQ,CAAiB,GAAG;EAiBzD,AAbIG,EAAWX,EAAiB,CAACwB,MAC7B,CAAChB,EAAkB,uBACnB,EAAkB,qBACdA,EAAkB,cAUtB4B,EAAgBzB,EAAWX,IAAmBQ,CAAiB,IAC/DG,EAAW,UAAUH,CAAiB,IAGtCG,EAAW,aAAaH,CAAiB;EAK7C,IAAMU,IAASP,EAAW,iBAAiB;EAM3C,AALKd,EAAMqB,EAAO,MAAMD,EAAW,QAAQ,IAAI,MAC3C,EAAW,eAAgBA,EAAW,QAAQ,QAC1CA,EAAW,eAEnB,EAAW,UAAUC,GACrB,EAAW,YAAYP,EAAW;CACtC;CACA,EAAWX,KAAoBQ;AACnC;AACA,SAAS4B,EAAgB,GAAiB,GAAS;CAC/C,OAAQC,EAAgB,UAAUnC,EAAQ,SACtC,CAACL,EAAMwC,EAAgB,WAAWnC,EAAQ,SAAS,KAClDmC,EAAgB,gBAAgBnC,EAAQ,gBACpCA,EAAQ,gBAAgB,aACrBmC,EAAgB,gBAAgB;AAChD;AACA,EAAS,oBAAoBC,EAAgB;CACzC,SAAS;CACT,MAAM,KAAK;CACX,WAAW;CACX,OAAO,KAAK;CACZ,eAAeC,EAAc;CAC7B,SAAS;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSyncExternalStore.js","names":["React","React$1","realHook","\"useSyncExternalStore\"","isReactNative","maybe","usingJSDOM","canUseLayoutEffect","canUseDOM","useSyncExternalStore","value","getSnapshot","forceUpdate","inst","checkIfSnapshotChanged","subscribe"],"sources":["../../../../../../node_modules/@apollo/client/react/hooks/useSyncExternalStore.js"],"sourcesContent":["import * as React from \"react\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { canUseDOM } from \"@apollo/client/utilities/internal\";\nimport { maybe } from \"@apollo/client/utilities/internal/globals\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nlet didWarnUncachedGetSnapshot = false;\n// Prevent webpack from complaining about our feature detection of the\n// useSyncExternalStore property of the React namespace, which is expected not\n// to exist when using React 17 and earlier, and that's fine.\nconst uSESKey = \"useSyncExternalStore\";\nconst realHook = React[uSESKey];\nconst isReactNative = maybe(() => navigator.product) == \"ReactNative\";\nconst usingJSDOM = \n// Following advice found in this comment from @domenic (maintainer of jsdom):\n// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327\n//\n// Since we control the version of Jest and jsdom used when running Apollo\n// Client tests, and that version is recent enough to include \" jsdom/x.y.z\"\n// at the end of the user agent string, I believe this case is all we need to\n// check. Testing for \"Node.js\" was recommended for backwards compatibility\n// with older version of jsdom, but we don't have that problem.\nmaybe(() => navigator.userAgent.indexOf(\"jsdom\") >= 0) || false;\n// Our tests should all continue to pass if we remove this !usingJSDOM\n// condition, thereby allowing useLayoutEffect when using jsdom. Unfortunately,\n// if we allow useLayoutEffect, then useSyncExternalStore generates many\n// warnings about useLayoutEffect doing nothing on the server. While these\n// warnings are harmless, this !usingJSDOM condition seems to be the best way to\n// prevent them (i.e. skipping useLayoutEffect when using jsdom).\nconst canUseLayoutEffect = (canUseDOM || isReactNative) && !usingJSDOM;\n// Adapted from https://www.npmjs.com/package/use-sync-external-store, with\n// Apollo Client deviations called out by \"// DEVIATION ...\" comments.\n// When/if React.useSyncExternalStore is defined, delegate fully to it.\nexport const useSyncExternalStore = realHook ||\n ((subscribe, getSnapshot, getServerSnapshot) => {\n // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n const value = getSnapshot();\n if (\n // DEVIATION: Using __DEV__\n __DEV__ &&\n !didWarnUncachedGetSnapshot &&\n // DEVIATION: Not using Object.is because we know our snapshots will never\n // be exotic primitive values like NaN, which is !== itself.\n value !== getSnapshot()) {\n didWarnUncachedGetSnapshot = true;\n // DEVIATION: Using invariant.error instead of console.error directly.\n invariant.error(36);\n }\n // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n const [{ inst }, forceUpdate] = React.useState({\n inst: { value, getSnapshot },\n });\n // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n if (canUseLayoutEffect) {\n // DEVIATION: We avoid calling useLayoutEffect when !canUseLayoutEffect,\n // which may seem like a conditional hook, but this code ends up behaving\n // unconditionally (one way or the other) because canUseLayoutEffect is\n // constant.\n React.useLayoutEffect(() => {\n Object.assign(inst, { value, getSnapshot });\n // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n // React Hook React.useLayoutEffect has a missing dependency: 'inst'. Either include it or remove the dependency array.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe, value, getSnapshot]);\n }\n else {\n Object.assign(inst, { value, getSnapshot });\n }\n React.useEffect(() => {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n // Subscribe to the store and return a clean-up function.\n return subscribe(function handleStoreChange() {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n });\n // React Hook React.useEffect has a missing dependency: 'inst'. Either include it or remove the dependency array.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe]);\n return value;\n });\nfunction checkIfSnapshotChanged({ value, getSnapshot, }) {\n try {\n return value !== getSnapshot();\n }\n catch {\n return true;\n }\n}\n//# sourceMappingURL=useSyncExternalStore.js.map\n"],"ignoreList":[0],"mappings":";;;;;AAKA,
|
|
1
|
+
{"version":3,"file":"useSyncExternalStore.js","names":["React","useSyncExternalStore","React$1","realHook","\"useSyncExternalStore\"","isReactNative","maybe","usingJSDOM","canUseLayoutEffect","canUseDOM","useSyncExternalStore$1","value","getSnapshot","forceUpdate","inst","checkIfSnapshotChanged","subscribe"],"sources":["../../../../../../node_modules/@apollo/client/react/hooks/useSyncExternalStore.js"],"sourcesContent":["import * as React from \"react\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { canUseDOM } from \"@apollo/client/utilities/internal\";\nimport { maybe } from \"@apollo/client/utilities/internal/globals\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nlet didWarnUncachedGetSnapshot = false;\n// Prevent webpack from complaining about our feature detection of the\n// useSyncExternalStore property of the React namespace, which is expected not\n// to exist when using React 17 and earlier, and that's fine.\nconst uSESKey = \"useSyncExternalStore\";\nconst realHook = React[uSESKey];\nconst isReactNative = maybe(() => navigator.product) == \"ReactNative\";\nconst usingJSDOM = \n// Following advice found in this comment from @domenic (maintainer of jsdom):\n// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327\n//\n// Since we control the version of Jest and jsdom used when running Apollo\n// Client tests, and that version is recent enough to include \" jsdom/x.y.z\"\n// at the end of the user agent string, I believe this case is all we need to\n// check. Testing for \"Node.js\" was recommended for backwards compatibility\n// with older version of jsdom, but we don't have that problem.\nmaybe(() => navigator.userAgent.indexOf(\"jsdom\") >= 0) || false;\n// Our tests should all continue to pass if we remove this !usingJSDOM\n// condition, thereby allowing useLayoutEffect when using jsdom. Unfortunately,\n// if we allow useLayoutEffect, then useSyncExternalStore generates many\n// warnings about useLayoutEffect doing nothing on the server. While these\n// warnings are harmless, this !usingJSDOM condition seems to be the best way to\n// prevent them (i.e. skipping useLayoutEffect when using jsdom).\nconst canUseLayoutEffect = (canUseDOM || isReactNative) && !usingJSDOM;\n// Adapted from https://www.npmjs.com/package/use-sync-external-store, with\n// Apollo Client deviations called out by \"// DEVIATION ...\" comments.\n// When/if React.useSyncExternalStore is defined, delegate fully to it.\nexport const useSyncExternalStore = realHook ||\n ((subscribe, getSnapshot, getServerSnapshot) => {\n // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n const value = getSnapshot();\n if (\n // DEVIATION: Using __DEV__\n __DEV__ &&\n !didWarnUncachedGetSnapshot &&\n // DEVIATION: Not using Object.is because we know our snapshots will never\n // be exotic primitive values like NaN, which is !== itself.\n value !== getSnapshot()) {\n didWarnUncachedGetSnapshot = true;\n // DEVIATION: Using invariant.error instead of console.error directly.\n invariant.error(36);\n }\n // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n const [{ inst }, forceUpdate] = React.useState({\n inst: { value, getSnapshot },\n });\n // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n if (canUseLayoutEffect) {\n // DEVIATION: We avoid calling useLayoutEffect when !canUseLayoutEffect,\n // which may seem like a conditional hook, but this code ends up behaving\n // unconditionally (one way or the other) because canUseLayoutEffect is\n // constant.\n React.useLayoutEffect(() => {\n Object.assign(inst, { value, getSnapshot });\n // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n // React Hook React.useLayoutEffect has a missing dependency: 'inst'. Either include it or remove the dependency array.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe, value, getSnapshot]);\n }\n else {\n Object.assign(inst, { value, getSnapshot });\n }\n React.useEffect(() => {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n // Subscribe to the store and return a clean-up function.\n return subscribe(function handleStoreChange() {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst });\n }\n });\n // React Hook React.useEffect has a missing dependency: 'inst'. Either include it or remove the dependency array.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe]);\n return value;\n });\nfunction checkIfSnapshotChanged({ value, getSnapshot, }) {\n try {\n return value !== getSnapshot();\n }\n catch {\n return true;\n }\n}\n//# sourceMappingURL=useSyncExternalStore.js.map\n"],"ignoreList":[0],"mappings":";;;;;AAKA,IAKMG,IAAWH,EAAMI,sBACjBC,IAAgBC,QAAY,UAAU,OAAO,KAAK,eAClDC,IASND,QAAY,UAAU,UAAU,QAAQ,OAAO,KAAK,CAAC,KAAK,IAOpDE,KAAsBC,KAAaJ,MAAkB,CAACE,GAI/CN,IAAuBE,OAC9B,GAAW,GAAa,MAAsB;CAK5C,IAAMQ,IAAQC,EAAY,GA0BpB,CAAC,EAAE,WAAQC,KAAeb,EAAM,SAAS,EAC3C,MAAM;EAAE;EAAO;CAAY,EAC/B,CAAC;CAiDD,OA7CIQ,IAKAN,EAAM,sBAAsB;EAMxB,AALA,OAAO,OAAOY,GAAM;GAAE;GAAO;EAAY,CAAC,GAKtCC,EAAuBD,CAAI,KAE3BD,EAAY,EAAE,QAAK,CAAC;CAI5B,GAAG;EAACG;EAAWL;EAAOC;CAAW,CAAC,IAGlC,OAAO,OAAOE,GAAM;EAAE;EAAO;CAAY,CAAC,GAE9CZ,EAAM,iBAGEa,EAAuBD,CAAI,KAE3BD,EAAY,EAAE,QAAK,CAAC,GAGjBG,EAAU,WAA6B;EAO1C,AAAID,EAAuBD,CAAI,KAE3BD,EAAY,EAAE,QAAK,CAAC;CAE5B,CAAC,IAGF,CAACG,CAAS,CAAC,GACPL;AACX;AACJ,SAASI,EAAuB,EAAE,UAAO,kBAAgB;CACrD,IAAI;EACA,OAAOJ,MAAUC,EAAY;CACjC,QACM;EACF,OAAO;CACX;AACJ"}
|
|
@@ -110,7 +110,7 @@ function c(e) {
|
|
|
110
110
|
return t.length ? ["eventfullymanaged", ...t].slice(0, 3).join("/") : "eventfullymanaged";
|
|
111
111
|
}
|
|
112
112
|
function l() {
|
|
113
|
-
return "2026.1102.
|
|
113
|
+
return "2026.1102.5";
|
|
114
114
|
}
|
|
115
115
|
function u() {
|
|
116
116
|
let { origin: e, pathname: t } = window.location, n = s(t);
|