@timardex/cluemart-shared 1.6.112 → 1.6.130
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/affiliate-Bqqlffw8.d.mts +36 -0
- package/dist/affiliate-Btlp5XUp.d.ts +36 -0
- package/dist/affiliateAdapters-BW3BY7c5.d.mts +118 -0
- package/dist/affiliateAdapters-C51ISmuA.d.ts +118 -0
- package/dist/apollo/index.d.mts +3 -3
- package/dist/apollo/index.d.ts +3 -3
- package/dist/auth/index.cjs +2546 -951
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +28 -30
- package/dist/auth/index.d.ts +28 -30
- package/dist/auth/index.mjs +24 -25
- package/dist/auth/index.mjs.map +1 -1
- package/dist/auth-BOmAO53v.d.ts +169 -0
- package/dist/auth-CsITA95p.d.mts +169 -0
- package/dist/{chunk-VPANTTZI.mjs → chunk-DATBGC2K.mjs} +108 -23
- package/dist/chunk-DATBGC2K.mjs.map +1 -0
- package/dist/chunk-DDHECBJR.mjs +726 -0
- package/dist/chunk-DDHECBJR.mjs.map +1 -0
- package/dist/chunk-INQCDU24.mjs +139 -0
- package/dist/chunk-INQCDU24.mjs.map +1 -0
- package/dist/{chunk-SD42WIMV.mjs → chunk-NWWKI4PJ.mjs} +5 -5
- package/dist/chunk-NWWKI4PJ.mjs.map +1 -0
- package/dist/{chunk-LBEJECG3.mjs → chunk-OHHJ3KJJ.mjs} +71 -64
- package/dist/chunk-OHHJ3KJJ.mjs.map +1 -0
- package/dist/chunk-TOEFAEF2.mjs +69 -0
- package/dist/chunk-TOEFAEF2.mjs.map +1 -0
- package/dist/chunk-UKW7NZEQ.mjs +2813 -0
- package/dist/chunk-UKW7NZEQ.mjs.map +1 -0
- package/dist/dailyClue-C6WXY73z.d.mts +105 -0
- package/dist/dailyClue-C6WXY73z.d.ts +105 -0
- package/dist/enums/index.cjs +2 -229
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +5 -170
- package/dist/enums/index.d.ts +5 -170
- package/dist/enums/index.mjs +1 -41
- package/dist/event-C9K7CSg4.d.ts +53 -0
- package/dist/event-W0NhL5Cd.d.mts +53 -0
- package/dist/formFields/index.cjs +284 -112
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +4 -2
- package/dist/formFields/index.d.ts +4 -2
- package/dist/formFields/index.mjs +919 -50
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/global-BbSFfYdd.d.ts +181 -0
- package/dist/global-C6v9tRji.d.mts +181 -0
- package/dist/graphql/index.cjs +2860 -2292
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +422 -469
- package/dist/graphql/index.d.ts +422 -469
- package/dist/graphql/index.mjs +2547 -160
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/graphql-CDOfA79A.d.ts +1253 -0
- package/dist/graphql-CcvzTs9k.d.mts +1253 -0
- package/dist/hooks/index.cjs +511 -3846
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +10 -9
- package/dist/hooks/index.d.ts +10 -9
- package/dist/hooks/index.mjs +54 -72
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/images/index.mjs +86 -21
- package/dist/images/index.mjs.map +1 -1
- package/dist/index.cjs +4414 -3168
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2439 -1579
- package/dist/index.d.ts +2439 -1579
- package/dist/index.mjs +4350 -3121
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.d.mts +3 -2
- package/dist/map/index.d.ts +3 -2
- package/dist/resourceActivities-CS8YRIIL.d.mts +89 -0
- package/dist/resourceActivities-DOdNPkhW.d.ts +89 -0
- package/dist/sharing/index.cjs +23 -19
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +16 -3
- package/dist/sharing/index.d.ts +16 -3
- package/dist/sharing/index.mjs +183 -29
- package/dist/sharing/index.mjs.map +1 -1
- package/dist/subscription-Cj_qBA7u.d.mts +20 -0
- package/dist/subscription-OiJ50uJb.d.ts +20 -0
- package/dist/theme/index.mjs +41 -5
- package/dist/theme/index.mjs.map +1 -1
- package/dist/types/index.cjs +868 -123
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +234 -15
- package/dist/types/index.d.ts +234 -15
- package/dist/types/index.mjs +61 -31
- package/dist/utils/index.cjs +292 -117
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +25 -23
- package/dist/utils/index.d.ts +25 -23
- package/dist/utils/index.mjs +6 -5
- package/dist/vendor-DmMi2qmx.d.mts +73 -0
- package/dist/vendor-M9hVZlni.d.ts +73 -0
- package/package.json +10 -3
- package/dist/ad-BUYzE6zx.d.ts +0 -181
- package/dist/ad-BhLoEul3.d.mts +0 -181
- package/dist/affiliate-BbtjeUP4.d.mts +0 -73
- package/dist/affiliate-C51nzKsw.d.ts +0 -73
- package/dist/chunk-32MKHJTX.mjs +0 -1207
- package/dist/chunk-32MKHJTX.mjs.map +0 -1
- package/dist/chunk-AYO3E4DM.mjs +0 -224
- package/dist/chunk-AYO3E4DM.mjs.map +0 -1
- package/dist/chunk-BIJ5NDXW.mjs +0 -962
- package/dist/chunk-BIJ5NDXW.mjs.map +0 -1
- package/dist/chunk-DQ7ZHIXW.mjs +0 -26
- package/dist/chunk-DQ7ZHIXW.mjs.map +0 -1
- package/dist/chunk-ILILH7E2.mjs +0 -219
- package/dist/chunk-ILILH7E2.mjs.map +0 -1
- package/dist/chunk-LBEJECG3.mjs.map +0 -1
- package/dist/chunk-NPFJ2CN2.mjs +0 -109
- package/dist/chunk-NPFJ2CN2.mjs.map +0 -1
- package/dist/chunk-R6PCFOYO.mjs +0 -3650
- package/dist/chunk-R6PCFOYO.mjs.map +0 -1
- package/dist/chunk-SD42WIMV.mjs.map +0 -1
- package/dist/chunk-VA5YN2K3.mjs +0 -48
- package/dist/chunk-VA5YN2K3.mjs.map +0 -1
- package/dist/chunk-VPANTTZI.mjs.map +0 -1
- package/dist/chunk-X3OLM35T.mjs +0 -278
- package/dist/chunk-X3OLM35T.mjs.map +0 -1
- package/dist/contactUs--NoohZBu.d.ts +0 -11
- package/dist/contactUs-CBWzefUS.d.mts +0 -11
- package/dist/global-CUYYxpy2.d.ts +0 -699
- package/dist/global-DePDtOFt.d.mts +0 -699
- package/dist/resourceActivities-CMUcn2P7.d.ts +0 -130
- package/dist/resourceActivities-CwbJFGIp.d.mts +0 -130
- package/dist/subscription-BU8GvH2K.d.ts +0 -12
- package/dist/subscription-bmAdrnfi.d.mts +0 -12
- package/dist/user-D47MLFyH.d.ts +0 -134
- package/dist/user-DE8edl3u.d.mts +0 -134
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/mapArrayToOptions.ts","../src/utils/date.ts","../src/sharing/relationShareTypes.ts","../src/sharing/constants.ts","../src/sharing/joinShareDescriptionSections.ts","../src/sharing/normalizeShareDescription.ts"],"sourcesContent":["import { OptionItem } from \"src/types\";\n\n/**\n * Convert an array of strings to an array of objects with label and value properties.\n */\nexport const mapArrayToOptions = (items: string[]): OptionItem[] =>\n items.map((item) => ({\n label: item,\n value: item,\n }));\n","import dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter.js\";\nimport timezone from \"dayjs/plugin/timezone.js\";\nimport utc from \"dayjs/plugin/utc.js\";\n\nimport { EventDateStatusEnumType } from \"../generated/graphql\";\n\nimport { mapArrayToOptions } from \"./mapArrayToOptions\";\n\nexport const dateFormat = \"DD-MM-YYYY\";\nexport const timeFormat = \"HH:mm\";\n\n// Enable custom format parsing\ndayjs.extend(customParseFormat);\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isSameOrAfter);\n\nconst NZ_TZ = \"Pacific/Auckland\";\n\nexport function toNZTime(date?: Date | string) {\n return date ? dayjs(date).tz(NZ_TZ) : dayjs().tz(NZ_TZ);\n}\n\n/** Start of the calendar day in Pacific/Auckland (daily games, streaks, etc.). */\nexport function nzStartOfDay(\n input?: Date | string | number | null,\n): dayjs.Dayjs {\n if (input == null) {\n return dayjs().tz(NZ_TZ).startOf(\"day\");\n }\n return dayjs.tz(input, NZ_TZ).startOf(\"day\");\n}\n\ntype DateFormat = \"date\" | \"time\" | \"datetime\";\n\n/**\n * Format a date string to a more readable format.\n * @param dateStr - the date string\n * @param timeStr - optional time string\n * @param display - 'date' | 'time' | 'datetime'\n * @returns formatted string based on display option\n */\nexport const formatDate = (\n dateStr: string,\n display: DateFormat = \"datetime\",\n timeStr?: string,\n) => {\n // Combine date and time into a single string if time is provided\n const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;\n\n // Parse with formats\n const dateTime = timeStr\n ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`)\n : dayjs(dateStr, dateFormat);\n\n // Format parts\n const formattedDate = dateTime.format(\"dddd, D MMMM, YYYY\");\n const formattedTime = dateTime.format(\"h:mm a\");\n\n // Return based on display option\n switch (display) {\n case \"date\":\n return formattedDate;\n case \"time\":\n return formattedTime;\n case \"datetime\":\n return `${formattedDate} at ${formattedTime}`;\n default:\n return formattedDate;\n }\n};\n\nexport const getCurrentAndFutureDates = <\n T extends { startDate: string; startTime: string },\n>(\n dates: T[],\n): T[] => {\n const now = dayjs(); // current date and time\n\n return dates.filter((dateObj) => {\n const dateTime = dayjs(\n `${dateObj.startDate} ${dateObj.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n return dateTime.isSameOrAfter(now);\n });\n};\n\nexport const isFutureDatesBeforeThreshold = (\n date: {\n startDate: string;\n startTime: string;\n },\n minHoursFromNow: number,\n): boolean => {\n const threshold = minHoursFromNow\n ? dayjs().add(minHoursFromNow, \"hour\")\n : dayjs().startOf(\"day\");\n\n const dateTime = dayjs(\n `${date.startDate} ${date.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n\n return dateTime.isSameOrAfter(threshold);\n};\n\nexport const formatTimestamp = (timestamp: string) => {\n const formattedDate = toNZTime(timestamp).format(dateFormat);\n\n return formatDate(formattedDate, \"date\");\n};\n\nexport const isIsoDateString = (value: unknown): value is string => {\n return typeof value === \"string\" && !Number.isNaN(Date.parse(value));\n};\n\n/**\n * Sort an array of date strings by their proximity to the current date.\n * @param dates - The array of date strings to sort.\n * @returns - The sorted array of date strings.\n */\nexport function sortDatesChronologically<\n T extends { startDate: string; startTime: string },\n>(dates: T[]): T[] {\n if (!dates?.length) {\n return [];\n }\n\n return [...dates].sort((a, b) => {\n const dateTimeFormat = `${dateFormat} ${timeFormat}`;\n const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);\n const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);\n return dateA.valueOf() - dateB.valueOf(); // chronological order\n });\n}\n\nexport const futureTimePeriods = mapArrayToOptions(\n Object.values(EventDateStatusEnumType),\n)\n .filter(\n (period) =>\n period.value !== EventDateStatusEnumType.StartingSoon &&\n period.value !== EventDateStatusEnumType.Canceled &&\n period.value !== EventDateStatusEnumType.Rescheduled &&\n period.value !== EventDateStatusEnumType.Started &&\n period.value !== EventDateStatusEnumType.Ended &&\n period.value !== EventDateStatusEnumType.Invalid,\n )\n .map((period) => ({\n label: period.value.replaceAll(\"_\", \" \"),\n value: period.value,\n }));\n","/** Path segments for relation share URLs — must match mobile `RelationTitle` values. */\nexport const RELATION_SHARE_INVITATION = \"invitation\" as const;\nexport const RELATION_SHARE_APPLICATION = \"application\" as const;\n\n/**\n * Bump when relation overlay SVG/layout changes so og:image URLs and API ETags\n * invalidate after deploy. Facebook caches preview JPEGs by exact URL — changing\n * this value forces crawlers to fetch a fresh image after server deploy.\n */\nexport const RELATION_OVERLAY_LAYOUT_VERSION = 43;\n\nexport const RELATION_SHARE_RESOURCE_TYPES = [\n RELATION_SHARE_INVITATION,\n RELATION_SHARE_APPLICATION,\n] as const;\n\nexport type RelationShareResourceType =\n (typeof RELATION_SHARE_RESOURCE_TYPES)[number];\n\nexport function isRelationShareResourceType(\n resourceType: string,\n): resourceType is RelationShareResourceType {\n return (RELATION_SHARE_RESOURCE_TYPES as readonly string[]).includes(\n resourceType,\n );\n}\n","import {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n type RelationShareResourceType,\n} from \"./relationShareTypes\";\n\nexport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n RELATION_OVERLAY_LAYOUT_VERSION,\n RELATION_SHARE_RESOURCE_TYPES,\n isRelationShareResourceType,\n type RelationShareResourceType,\n} from \"./relationShareTypes\";\n\n/** Open Graph recommended preview size (must match admin `SHARE_OG_IMAGE_*`). */\nexport const SOCIAL_IMAGE_WIDTH = 1200;\n\n/** Open Graph recommended preview size (must match admin `SHARE_OG_IMAGE_*`). */\nexport const SOCIAL_IMAGE_HEIGHT = 630;\n\n/** Keep in sync with `CLUEMART_MAIN_DOMAIN_URL` in utils (avoid utils↔sharing import cycle). */\nexport const SHARE_SITE_URL = \"https://cluemart.co.nz\";\n\n/** Calendar marker for invitation market-dates share copy (U+1F4C5 📅). */\nexport const SHARE_CALENDAR_ICON = \"\\u{1F4C5}\";\n\nexport const SHARE_MARKET_DATES_SECTION_HEADING = `${SHARE_CALENDAR_ICON} Market dates:`;\n\n/** Check mark for invitation requirements share copy (U+2705 ✅). */\nexport const SHARE_CHECKMARK_ICON = \"\\u{2705}\";\n\nexport const SHARE_REQUIREMENTS_SECTION_HEADING = `${SHARE_CHECKMARK_ICON} Requirements:`;\n\n/** Information marker for tags share copy (U+2139 ℹ️). */\nexport const SHARE_INFO_ICON = \"\\u{2139}\\u{FE0F}\";\n\nexport const SHARE_TAGS_SECTION_HEADING = `${SHARE_INFO_ICON} Tags:`;\n\n/** Standalone line when `rainOrShine` is true (invitation share + OG section parsing). */\nexport const SHARE_RAIN_OR_SHINE_LINE = \"Rain or Shine\";\n\n/** Standalone line when `foodTruck` is true (application share + OG section parsing). */\nexport const SHARE_FOOD_TRUCK_LINE = \"Food Truck\";\n\n/** Prefix for application compliance line (share text + OG section parsing). */\nexport const SHARE_COMPLIANCE_PREFIX = `${SHARE_CHECKMARK_ICON} Compliance:`;\n\n/** Label tag for application categories share copy (U+1F3F7 🏷️). */\nexport const SHARE_CATEGORY_ICON = \"\\u{1F3F7}\\u{FE0F}\";\n\nexport const SHARE_CATEGORIES_SECTION_HEADING = `${SHARE_CATEGORY_ICON} Categories:`;\n\n/** Straight ruler for application stall-size share copy (U+1F4CF 📏). */\nexport const SHARE_RULER_ICON = \"\\u{1F4CF}\";\n\n/** Prefix for application stall-size line (share text + OG section parsing). */\nexport const SHARE_STALL_SIZE_PREFIX = `${SHARE_RULER_ICON} Stall size:`;\n\n/** Dollar marker for price-range share copy (U+0024 $ — text, not emoji, so it stays black). */\nexport const SHARE_DOLLAR_ICON = \"$\";\n\n/** Prefix for application price-range line (share text + OG section parsing). */\nexport const SHARE_PRICE_RANGE_PREFIX = `${SHARE_DOLLAR_ICON} Price range:`;\n\n/** Alarm clock for invitation application-deadline share copy (U+23F0 ⏰). */\nexport const SHARE_CLOCK_ICON = \"\\u{23F0}\";\n\n/** Prefix for the invitation application-deadline sentence (share text + OG section parsing). */\nexport const SHARE_APPLICATION_DEADLINE_PREFIX = `${SHARE_CLOCK_ICON} Application deadline:`;\n\n/** First line on share sheet messages, Facebook SDK quote, and `og:description`. */\nexport const SHARE_MORE_INFO_LINE = \"Shared from ClueMart\";\n\nexport const DEFAULT_SHARE_OG_IMAGE = `${SHARE_SITE_URL}/assets/logo.webp`;\n\nexport const RESOURCE_SHARE_TYPES = [\n \"market\",\n \"stallholder\",\n \"partner\",\n \"affiliate\",\n \"school\",\n] as const;\n\nexport type ResourceShareType = (typeof RESOURCE_SHARE_TYPES)[number];\n\nexport const POST_SHARE_RESOURCE_TYPES = [\n \"market_faces\",\n \"clue_bites\",\n \"play_and_win\",\n] as const;\n\nexport type PostShareResourceType = (typeof POST_SHARE_RESOURCE_TYPES)[number];\n\nexport type ShareResourceType =\n | ResourceShareType\n | PostShareResourceType\n | RelationShareResourceType;\n\nexport const SHARE_RESOURCE_LABEL: Record<ShareResourceType, string> = {\n [RELATION_SHARE_APPLICATION]: \"Application\",\n [RELATION_SHARE_INVITATION]: \"Invitation\",\n clue_bites: \"Clue Bites\",\n market_faces: \"Market Faces\",\n play_and_win: \"Play & Win\",\n market: \"Market\",\n partner: \"Partner\",\n stallholder: \"Stallholder\",\n affiliate: \"Affiliate\",\n school: \"School\",\n};\n\nexport function isPostShareResourceType(\n resourceType: ShareResourceType,\n): resourceType is PostShareResourceType {\n return (POST_SHARE_RESOURCE_TYPES as readonly string[]).includes(\n resourceType,\n );\n}\n","import { SHARE_MORE_INFO_LINE } from \"./constants\";\n\n/** Blank line between share sections — title, address, dates, URL, etc. */\nexport const SHARE_DESCRIPTION_SECTION_BREAK = \"\\n\\n\";\n\n/**\n * Line break for `og:description` meta content. Use instead of `\\n` — Next.js\n * HTML serialisation collapses literal newlines to spaces; Facebook reads ` `.\n */\nexport const OG_DESCRIPTION_LINE_BREAK = \" \";\n\n/** Joins OG description sections for Facebook link cards (and Twitter). */\nexport function joinShareOgDescriptionSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return sections\n .map((section) => (typeof section === \"string\" ? section.trim() : \"\"))\n .filter((section): section is string => section.length > 0)\n .map((section) => section.replace(/\\n/g, OG_DESCRIPTION_LINE_BREAK))\n .join(OG_DESCRIPTION_LINE_BREAK);\n}\n\nexport function joinShareDescriptionSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return sections\n .filter((section): section is string => Boolean(section))\n .join(SHARE_DESCRIPTION_SECTION_BREAK);\n}\n\n/** Prepends the standard share branding line when assembling display text. */\nexport function appendShareMoreInfoLine(description: string): string {\n const trimmed = description.trim();\n if (trimmed.startsWith(SHARE_MORE_INFO_LINE)) {\n return trimmed;\n }\n if (trimmed.length === 0) {\n return SHARE_MORE_INFO_LINE;\n }\n return joinShareDescriptionSections([SHARE_MORE_INFO_LINE, trimmed]);\n}\n","import { SHARE_MORE_INFO_LINE, type ShareResourceType } from \"./constants\";\nimport {\n joinShareOgDescriptionSections,\n SHARE_DESCRIPTION_SECTION_BREAK,\n} from \"./joinShareDescriptionSections\";\n\nexport {\n joinShareOgDescriptionSections,\n OG_DESCRIPTION_LINE_BREAK,\n SHARE_DESCRIPTION_SECTION_BREAK,\n} from \"./joinShareDescriptionSections\";\n\n/** Trims share text and collapses spaces per line; preserves `\\n\\n` section breaks. */\nconst LEADING_WHITESPACE = /^[ \\t]*/;\n\nexport function normalizeShareText(value: string | null | undefined): string {\n if (value == null) {\n return \"\";\n }\n return value\n .trim()\n .split(\"\\n\")\n .map((line) => {\n const leading = LEADING_WHITESPACE.exec(line)?.[0] ?? \"\";\n const rest = line\n .slice(leading.length)\n .trim()\n .replace(/[ \\t]{2,}/g, \" \");\n return leading + rest;\n })\n .join(\"\\n\")\n .replace(/\\n{3,}/g, \"\\n\\n\");\n}\n\n/** Branding line placement — first so Facebook truncation does not drop it. */\nexport type ShareMessageFooterPlacement = \"before-body\";\n\nexport function shareMessageFooterPlacementForType(\n _shareType?: ShareResourceType,\n): ShareMessageFooterPlacement {\n return \"before-body\";\n}\n\n/**\n * Ordered sections for share-sheet / Facebook SDK quote text:\n * {@link SHARE_MORE_INFO_LINE} → title → description (full body or post caption).\n */\nexport function buildShareMessageSections(input: {\n title?: string | null;\n description?: string | null;\n shareType?: ShareResourceType;\n}): string[] {\n const title = normalizeShareText(input.title);\n const description = normalizeShareText(input.description);\n\n return [SHARE_MORE_INFO_LINE, title, description].filter(\n (section) => section.length > 0,\n );\n}\n\nexport function splitShareDescriptionSections(value: string): string[] {\n const trimmed = normalizeShareText(value);\n if (!trimmed) {\n return [];\n }\n\n if (/\\n\\n/.test(trimmed)) {\n return trimmed\n .split(/\\n\\n+/)\n .map((section) => normalizeShareText(section))\n .filter((section) => section.length > 0);\n }\n\n if (/\\n/.test(trimmed)) {\n return trimmed\n .split(/\\n+/)\n .map((section) => normalizeShareText(section))\n .filter((section) => section.length > 0);\n }\n\n return [trimmed];\n}\n\n/**\n * Formats share descriptions for Open Graph / Twitter meta tags.\n * Sections are joined with {@link OG_DESCRIPTION_LINE_BREAK} (` `).\n */\nexport function normalizeShareOgDescription(value: string): string {\n return joinShareOgDescriptionSections(splitShareDescriptionSections(value));\n}\n\n/**\n * Quote text for Facebook ShareDialog on iOS (`ShareLinkContent.quote`).\n *\n * Title + blank lines + body sections. URL is omitted — `contentUrl` supplies\n * the link card (OG on resource landing pages controls card title/image).\n */\nexport function buildFacebookShareQuote(\n title: string,\n description: string,\n shareType?: ShareResourceType,\n): string | undefined {\n const sections = buildShareMessageSections({ description, shareType, title });\n const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();\n return quote.length > 0 ? quote : undefined;\n}\n\n/**\n * Open Graph / Twitter description from pre-built section strings.\n * Prefer {@link joinShareOgDescriptionSections} when sections are already known.\n */\nexport function buildShareOgDescriptionFromSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return joinShareOgDescriptionSections(sections);\n}\n\n/** Open Graph / Twitter description — body sections only (`og:title` is separate). */\nexport function buildShareOgDescription(\n _title: string,\n description: string,\n): string {\n return joinShareOgDescriptionSections(\n splitShareDescriptionSections(description),\n );\n}\n\n/**\n * Strips emoji and symbols that do not render reliably in overlay SVG fonts.\n * Keeps letters, numbers, whitespace, and common sentence punctuation.\n */\nexport function stripOverlaySubtitleSpecialChars(text: string): string {\n const regex = /[^\\p{L}\\p{M}\\p{N}\\s.,!?'\"&\\-():;/]/gu;\n const result = text\n .replace(/\\p{Extended_Pictographic}/gu, \"\")\n .replace(regex, \"\");\n return result.trim();\n}\n"],"mappings":";;;;;AAKO,IAAM,oBAAoB,CAAC,UAChC,MAAM,IAAI,CAAC,UAAU;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AACT,EAAE;;;ACTJ,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,OAAO,mBAAmB;AAC1B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ACZ,WAAO,CAAC;AAAA,EACV;AAEA,MAAI,OAAO,KAAK,OAAO,GAAG;AACxB,WAAO,QACJ,MAAM,OAAO,EACb,IAAI,CAAC,YAAY,mBAAmB,OAAO,CAAC,EAC5C,OAAO,CAAC,YAAY,QAAQ,SAAS,CAAC;AAAA,EAC3C;AAEA,MAAI,KAAK,KAAK,OAAO,GAAG;AACtB,WAAO,QACJ,MAAM,KAAK,EACX,IAAI,CAAC,YAAY,mBAAmB,OAAO,CAAC,EAC5C,OAAO,CAAC,YAAY,QAAQ,SAAS,CAAC;AAAA,EAC3C;AAEA,SAAO,CAAC,OAAO;AACjB;AAMO,SAAS,4BAA4B,OAAuB;AACjE,SAAO,+BAA+B,8BAA8B,KAAK,CAAC;AAC5E;AAQO,SAAS,wBACd,OACA,aACA,WACoB;AACpB,QAAM,WAAW,0BAA0B,EAAE,aAAa,WAAW,MAAM,CAAC;AAC5E,QAAM,QAAQ,SAAS,KAAK,+BAA+B,EAAE,KAAK;AAClE,SAAO,MAAM,SAAS,IAAI,QAAQ;AACpC;AAMO,SAAS,oCACd,UACQ;AACR,SAAO,+BAA+B,QAAQ;AAChD;AAGO,SAAS,wBACd,QACA,aACQ;AACR,SAAO;AAAA,IACL,8BAA8B,WAAW;AAAA,EAC3C;AACF;AAMO,SAAS,iCAAiC,MAAsB;AACrE,QAAM,QAAQ;AACd,QAAM,SAAS,KACZ,QAAQ,+BAA+B,EAAE,EACzC,QAAQ,OAAO,EAAE;AACpB,SAAO,OAAO,KAAK;AACrB;","names":[]}
|
|
@@ -6,19 +6,23 @@ import {
|
|
|
6
6
|
nzStartOfDay,
|
|
7
7
|
sortDatesChronologically,
|
|
8
8
|
stripOverlaySubtitleSpecialChars
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NWWKI4PJ.mjs";
|
|
10
10
|
import {
|
|
11
|
-
PROMO_CODE_PREFIX,
|
|
12
11
|
gameScreenIdentifierList
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DDHECBJR.mjs";
|
|
14
13
|
import {
|
|
15
14
|
isTransientNetworkError
|
|
16
15
|
} from "./chunk-RAYUJODN.mjs";
|
|
17
16
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
PROMO_CODE_PREFIX
|
|
18
|
+
} from "./chunk-DATBGC2K.mjs";
|
|
19
|
+
import {
|
|
20
20
|
EnumRegions
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TOEFAEF2.mjs";
|
|
22
|
+
import {
|
|
23
|
+
InviteEnumType,
|
|
24
|
+
PaymentMethodEnumType
|
|
25
|
+
} from "./chunk-INQCDU24.mjs";
|
|
22
26
|
|
|
23
27
|
// src/utils/dailyClueGame.ts
|
|
24
28
|
function createSeededRng(seed) {
|
|
@@ -124,7 +128,7 @@ var capitalizeFirstLetter = (str) => {
|
|
|
124
128
|
return str.split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
125
129
|
};
|
|
126
130
|
var statusOptions = [
|
|
127
|
-
...Object.values(
|
|
131
|
+
...Object.values(InviteEnumType).map((status) => ({
|
|
128
132
|
label: status,
|
|
129
133
|
value: status
|
|
130
134
|
})).sort((a, b) => a.label.localeCompare(b.label))
|
|
@@ -133,39 +137,39 @@ var statusOptions = [
|
|
|
133
137
|
var availableRegionTypes = Object.values(EnumRegions);
|
|
134
138
|
var availableRegionOptions = mapArrayToOptions(availableRegionTypes);
|
|
135
139
|
var paymentMethodOptions = mapArrayToOptions(
|
|
136
|
-
Object.values(
|
|
140
|
+
Object.values(PaymentMethodEnumType)
|
|
137
141
|
);
|
|
138
142
|
function normalizeUrl(url) {
|
|
139
143
|
const withProtocol = !url.startsWith("http://") && !url.startsWith("https://") ? `https://${url}` : url;
|
|
140
144
|
return withProtocol.replace(/\/+$/, "");
|
|
141
145
|
}
|
|
142
146
|
var licenseNiceNames = {
|
|
143
|
-
["pro_event" /*
|
|
144
|
-
["pro_vendor" /*
|
|
145
|
-
["standard_event" /*
|
|
146
|
-
["standard_vendor" /*
|
|
147
|
-
["pro_plus_event" /*
|
|
148
|
-
["pro_plus_vendor" /*
|
|
149
|
-
["standard_partner" /*
|
|
150
|
-
["standard_affiliate" /*
|
|
151
|
-
["standard_school" /*
|
|
147
|
+
["pro_event" /* ProEvent */]: "Pro Event",
|
|
148
|
+
["pro_vendor" /* ProVendor */]: "Pro Stallholder",
|
|
149
|
+
["standard_event" /* StandardEvent */]: "Standard Event",
|
|
150
|
+
["standard_vendor" /* StandardVendor */]: "Standard Stallholder",
|
|
151
|
+
["pro_plus_event" /* ProPlusEvent */]: "Pro+Ads Event",
|
|
152
|
+
["pro_plus_vendor" /* ProPlusVendor */]: "Pro+Ads Stallholder",
|
|
153
|
+
["standard_partner" /* StandardPartner */]: "Partner",
|
|
154
|
+
["standard_affiliate" /* StandardAffiliate */]: "Affiliate",
|
|
155
|
+
["standard_school" /* StandardSchool */]: "School"
|
|
152
156
|
};
|
|
153
157
|
var cluemartSocialMedia = [
|
|
154
158
|
{
|
|
155
159
|
link: "https://www.facebook.com/ClueMartApp",
|
|
156
|
-
name: "facebook" /*
|
|
160
|
+
name: "facebook" /* Facebook */
|
|
157
161
|
},
|
|
158
162
|
{
|
|
159
163
|
link: "https://www.instagram.com/cluemart_app",
|
|
160
|
-
name: "instagram" /*
|
|
164
|
+
name: "instagram" /* Instagram */
|
|
161
165
|
},
|
|
162
166
|
{
|
|
163
167
|
link: "https://www.tiktok.com/@cluemart",
|
|
164
|
-
name: "tiktok" /*
|
|
168
|
+
name: "tiktok" /* Tiktok */
|
|
165
169
|
},
|
|
166
170
|
{
|
|
167
171
|
link: "https://www.youtube.com/@ClueMart-App-NZ",
|
|
168
|
-
name: "youtube" /*
|
|
172
|
+
name: "youtube" /* Youtube */
|
|
169
173
|
}
|
|
170
174
|
];
|
|
171
175
|
var IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
@@ -174,23 +178,23 @@ var DEFAULT_RESOURCES_RETURN_LIMIT = 1e3;
|
|
|
174
178
|
var DEFAULT_RESOURCES_RETURN_OFFSET = 0;
|
|
175
179
|
var CLUEMART_MAIN_DOMAIN_URL = "https://cluemart.co.nz";
|
|
176
180
|
var rewardNiceNames = {
|
|
177
|
-
["mystery_joy_box" /*
|
|
181
|
+
["mystery_joy_box" /* MysteryJoyBox */]: {
|
|
178
182
|
name: "Mystery Joy Box",
|
|
179
183
|
points: 250
|
|
180
184
|
},
|
|
181
|
-
["mystery_squeeze_box" /*
|
|
185
|
+
["mystery_squeeze_box" /* MysterySqueezeBox */]: {
|
|
182
186
|
name: "Mystery Squeeze Box",
|
|
183
187
|
points: 350
|
|
184
188
|
},
|
|
185
|
-
["mystery_deluxe_box" /*
|
|
189
|
+
["mystery_deluxe_box" /* MysteryDeluxeBox */]: {
|
|
186
190
|
name: "Mystery Deluxe Box",
|
|
187
191
|
points: 500
|
|
188
192
|
}
|
|
189
193
|
};
|
|
190
194
|
var PostTypeLabels = {
|
|
191
|
-
["market_faces" /*
|
|
192
|
-
["clue_bites" /*
|
|
193
|
-
["play_and_win" /*
|
|
195
|
+
["market_faces" /* MarketFaces */]: "Market Faces",
|
|
196
|
+
["clue_bites" /* ClueBites */]: "Clue Bites",
|
|
197
|
+
["play_and_win" /* PlayAndWin */]: "Play & Win"
|
|
194
198
|
};
|
|
195
199
|
var CM_SCHOOL_PROMO_CODE = `${PROMO_CODE_PREFIX}SCHOOL`;
|
|
196
200
|
var CM_AFFILIATE_PROMO_CODE = `${PROMO_CODE_PREFIX}AFFILIATE`;
|
|
@@ -228,17 +232,17 @@ var SCHOOL_MAX_STUDENT_COUNT = 0;
|
|
|
228
232
|
|
|
229
233
|
// src/utils/eventDateStatus.ts
|
|
230
234
|
var EVENT_DATE_STATUS_PERIOD_MAP = {
|
|
231
|
-
["Today" /*
|
|
232
|
-
"Started" /*
|
|
233
|
-
"Starting_Soon" /*
|
|
234
|
-
"Today" /*
|
|
235
|
+
["Today" /* Today */]: [
|
|
236
|
+
"Started" /* Started */,
|
|
237
|
+
"Starting_Soon" /* StartingSoon */,
|
|
238
|
+
"Today" /* Today */
|
|
235
239
|
],
|
|
236
|
-
["This_Week" /*
|
|
237
|
-
"Started" /*
|
|
238
|
-
"Starting_Soon" /*
|
|
239
|
-
"This_Week" /*
|
|
240
|
-
"Today" /*
|
|
241
|
-
"Tomorrow" /*
|
|
240
|
+
["This_Week" /* ThisWeek */]: [
|
|
241
|
+
"Started" /* Started */,
|
|
242
|
+
"Starting_Soon" /* StartingSoon */,
|
|
243
|
+
"This_Week" /* ThisWeek */,
|
|
244
|
+
"Today" /* Today */,
|
|
245
|
+
"Tomorrow" /* Tomorrow */
|
|
242
246
|
]
|
|
243
247
|
};
|
|
244
248
|
function getAllowedEventDateStatuses(period) {
|
|
@@ -257,9 +261,9 @@ function filterEventsByDateStatusPeriod(events, period) {
|
|
|
257
261
|
// src/calendar/eventCalendar.ts
|
|
258
262
|
import dayjs from "dayjs";
|
|
259
263
|
var KNOWN_EVENT_SCHEDULE_STATUSES = /* @__PURE__ */ new Set([
|
|
260
|
-
"Started" /*
|
|
261
|
-
"Starting_Soon" /*
|
|
262
|
-
"Ended" /*
|
|
264
|
+
"Started" /* Started */,
|
|
265
|
+
"Starting_Soon" /* StartingSoon */,
|
|
266
|
+
"Ended" /* Ended */
|
|
263
267
|
]);
|
|
264
268
|
function toCalendarIsoDate(startDate) {
|
|
265
269
|
const formatted = dayjs(startDate, dateFormat).format("YYYY-MM-DD");
|
|
@@ -289,11 +293,11 @@ function buildCalendarSheetContentData(dateTimes, isoDate, location, resourceId,
|
|
|
289
293
|
}
|
|
290
294
|
function getEventScheduleStatusTone(status) {
|
|
291
295
|
switch (status) {
|
|
292
|
-
case "Started" /*
|
|
296
|
+
case "Started" /* Started */:
|
|
293
297
|
return "started";
|
|
294
|
-
case "Starting_Soon" /*
|
|
298
|
+
case "Starting_Soon" /* StartingSoon */:
|
|
295
299
|
return "startingSoon";
|
|
296
|
-
case "Ended" /*
|
|
300
|
+
case "Ended" /* Ended */:
|
|
297
301
|
return "ended";
|
|
298
302
|
default:
|
|
299
303
|
return "default";
|
|
@@ -317,10 +321,10 @@ function getEventScheduleStatusLabel(dateTime, onlyShowKnownStatuses) {
|
|
|
317
321
|
return isKnownStatus ? status.replaceAll("_", " ").toLowerCase() : `Next event date: ${formatDate(dateTime.startDate, "date")}`;
|
|
318
322
|
}
|
|
319
323
|
function shouldShowEventActionsWithWeather(resourceType, dateTime, location) {
|
|
320
|
-
return resourceType === "event" /*
|
|
321
|
-
"Ended" /*
|
|
322
|
-
"Canceled" /*
|
|
323
|
-
"Started" /*
|
|
324
|
+
return resourceType === "event" /* Event */ && Boolean(location) && Boolean(dateTime?.dateStatus) && ![
|
|
325
|
+
"Ended" /* Ended */,
|
|
326
|
+
"Canceled" /* Canceled */,
|
|
327
|
+
"Started" /* Started */
|
|
324
328
|
].includes(dateTime.dateStatus);
|
|
325
329
|
}
|
|
326
330
|
|
|
@@ -1437,12 +1441,12 @@ function getEventStallholderEmptyMessage(hasAnyStallholdersForEvent, selectedDat
|
|
|
1437
1441
|
// src/vendorEvents/vendorEventFilters.ts
|
|
1438
1442
|
function relationHasSelectedDate(relation, selectedDate) {
|
|
1439
1443
|
return relation.relationDates?.some(
|
|
1440
|
-
(date) => date.dateTime.startDate === selectedDate
|
|
1444
|
+
(date) => date != null && date.dateTime.startDate === selectedDate
|
|
1441
1445
|
) ?? false;
|
|
1442
1446
|
}
|
|
1443
1447
|
function eventHasSelectedDate(event, selectedDate) {
|
|
1444
1448
|
return event.relations?.some(
|
|
1445
|
-
(relation) => relationHasSelectedDate(relation, selectedDate)
|
|
1449
|
+
(relation) => relation != null && relationHasSelectedDate(relation, selectedDate)
|
|
1446
1450
|
) ?? false;
|
|
1447
1451
|
}
|
|
1448
1452
|
function filterVendorEventsBySelectedDate(events, selectedDate) {
|
|
@@ -1459,11 +1463,14 @@ function collectVendorEventRelationDateTimes(events) {
|
|
|
1459
1463
|
return [];
|
|
1460
1464
|
}
|
|
1461
1465
|
return events.flatMap(
|
|
1462
|
-
(event) => (event.relations ?? []).flatMap(
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1466
|
+
(event) => (event.relations ?? []).flatMap((relation) => {
|
|
1467
|
+
if (relation == null) {
|
|
1468
|
+
return [];
|
|
1469
|
+
}
|
|
1470
|
+
return (relation.relationDates ?? []).flatMap(
|
|
1471
|
+
(relationDate) => relationDate?.dateTime != null ? [relationDate.dateTime] : []
|
|
1472
|
+
);
|
|
1473
|
+
})
|
|
1467
1474
|
);
|
|
1468
1475
|
}
|
|
1469
1476
|
function getVendorEventRelationStartDates(events) {
|
|
@@ -1490,32 +1497,32 @@ function getVendorEventsEmptyMessage() {
|
|
|
1490
1497
|
|
|
1491
1498
|
// src/utils/affiliate.ts
|
|
1492
1499
|
var AFFILIATE_PARTICIPANT_TYPE_LABELS = {
|
|
1493
|
-
["INDIVIDUAL" /*
|
|
1494
|
-
["SOLE_TRADER" /*
|
|
1495
|
-
["COMPANY" /*
|
|
1500
|
+
["INDIVIDUAL" /* Individual */]: "Individual",
|
|
1501
|
+
["SOLE_TRADER" /* SoleTrader */]: "Sole Trader",
|
|
1502
|
+
["COMPANY" /* Company */]: "Company"
|
|
1496
1503
|
};
|
|
1497
1504
|
var AFFILIATE_REWARDS = {
|
|
1498
|
-
["NEW_EVENT_REGISTRATION" /*
|
|
1505
|
+
["NEW_EVENT_REGISTRATION" /* NewEventRegistration */]: {
|
|
1499
1506
|
description: "10 points for new event registration (one-time reward)",
|
|
1500
1507
|
value: 10
|
|
1501
1508
|
},
|
|
1502
|
-
["NEW_VENDOR_REGISTRATION" /*
|
|
1509
|
+
["NEW_VENDOR_REGISTRATION" /* NewVendorRegistration */]: {
|
|
1503
1510
|
description: "5 points for new vendor registration (one-time reward)",
|
|
1504
1511
|
value: 5
|
|
1505
1512
|
},
|
|
1506
|
-
["ACTIVE_VENDOR_PRO_SUBSCRIPTION" /*
|
|
1513
|
+
["ACTIVE_VENDOR_PRO_SUBSCRIPTION" /* ActiveVendorProSubscription */]: {
|
|
1507
1514
|
description: "3 points for active vendor pro subscription (monthly reward)",
|
|
1508
1515
|
value: 3
|
|
1509
1516
|
},
|
|
1510
|
-
["ACTIVE_VENDOR_STANDARD_SUBSCRIPTION" /*
|
|
1517
|
+
["ACTIVE_VENDOR_STANDARD_SUBSCRIPTION" /* ActiveVendorStandardSubscription */]: {
|
|
1511
1518
|
description: "1 point for active vendor standard subscription (monthly reward)",
|
|
1512
1519
|
value: 1
|
|
1513
1520
|
},
|
|
1514
|
-
["ACTIVE_VENDOR_BONUS_REWARD" /*
|
|
1521
|
+
["ACTIVE_VENDOR_BONUS_REWARD" /* ActiveVendorBonusReward */]: {
|
|
1515
1522
|
description: "5 bonus points for every 10th active vendor (one-time reward)",
|
|
1516
1523
|
value: 5
|
|
1517
1524
|
},
|
|
1518
|
-
["ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS" /*
|
|
1525
|
+
["ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS" /* ActiveEventWithVendorRegistrations */]: {
|
|
1519
1526
|
description: "40 points for active event with vendor registrations (one-time reward)",
|
|
1520
1527
|
value: 40
|
|
1521
1528
|
}
|
|
@@ -1696,4 +1703,4 @@ export {
|
|
|
1696
1703
|
toUserFacingErrorMessage,
|
|
1697
1704
|
getErrorMessage
|
|
1698
1705
|
};
|
|
1699
|
-
//# sourceMappingURL=chunk-
|
|
1706
|
+
//# sourceMappingURL=chunk-OHHJ3KJJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/dailyClueGame.ts","../src/utils/utils.ts","../src/utils/resourceImage.ts","../src/utils/school.ts","../src/utils/eventDateStatus.ts","../src/calendar/eventCalendar.ts","../src/formFields/categories/clothingAndFashion.ts","../src/formFields/categories/electronicsAndTechnology.ts","../src/formFields/categories/foodAndBeverages.ts","../src/formFields/categories/handmadeAndLocalProducts.ts","../src/formFields/categories/healthAndWellness.ts","../src/formFields/categories/homeGardenHousehold.ts","../src/formFields/categories/petProductsAndAnimalGoods.ts","../src/formFields/categories/serviceAndExperience.ts","../src/formFields/categories/toysChildren.ts","../src/formFields/categories/vintageAndAntique.ts","../src/formFields/categories/index.ts","../src/eventStallholders/eventStallholderFilters.ts","../src/vendorEvents/vendorEventFilters.ts","../src/utils/affiliate.ts","../src/utils/irdNumber.ts","../src/utils/toUserFacingErrorMessage.ts"],"sourcesContent":["import type { Dayjs } from \"dayjs\";\n\nimport {\n DailyClueGameData,\n GamePlacement,\n GamePlacementClue,\n gameScreenIdentifierList,\n} from \"../types/game/dailyClue\";\n\nimport { nzStartOfDay } from \"./date\";\n\nfunction createSeededRng(seed: number) {\n let t = seed >>> 0;\n\n return function random() {\n t += 0x6d2b79f5;\n let x = t;\n\n x = Math.imul(x ^ (x >>> 15), x | 1);\n x ^= x + Math.imul(x ^ (x >>> 7), x | 61);\n\n return ((x ^ (x >>> 14)) >>> 0) / 4294967296;\n };\n}\n\nfunction hashStringToNumber(seed: string): number {\n let hash = 2166136261;\n\n for (let i = 0; i < seed.length; i++) {\n hash ^= seed.codePointAt(i) ?? 0;\n hash = Math.imul(hash, 16777619);\n }\n\n return hash >>> 0;\n}\n\n/** Seeded shuffle so all players see the same letter order / placements for a game. */\nexport function seededShuffle<T>(array: readonly T[], seed: string): T[] {\n const rng = createSeededRng(hashStringToNumber(seed));\n const result = [...array];\n\n for (let i = result.length - 1; i > 0; i--) {\n const j = Math.floor(rng() * (i + 1));\n [result[i], result[j]] = [result[j], result[i]];\n }\n\n return result;\n}\n\nfunction getDayIndex(start: Dayjs, today: Dayjs): number {\n return today.diff(start, \"day\");\n}\n\nexport function computeDailyClueState(dailyClue: DailyClueGameData): {\n todaysClue: GamePlacementClue | null;\n todaysLetter: string | null;\n todaysPlacement: GamePlacement | null;\n} | null {\n const { startDate, endDate } = dailyClue.gameFields.gameDate;\n const { solutionShuffled, collected } = dailyClue.letterInfo;\n\n const today = nzStartOfDay();\n const start = nzStartOfDay(startDate);\n const end = nzStartOfDay(endDate);\n\n // Before game starts\n if (today.isBefore(start)) {\n return null;\n }\n\n const shuffledPlacements = seededShuffle(\n gameScreenIdentifierList,\n start.toISOString(),\n );\n\n const index = getDayIndex(start, today);\n\n // After game ends\n if (today.isAfter(end)) {\n return {\n todaysClue: null,\n todaysLetter: null,\n todaysPlacement: null,\n };\n }\n\n // Safety: index must exist in BOTH arrays\n if (\n index < 0 ||\n index >= solutionShuffled.length ||\n index >= shuffledPlacements.length\n ) {\n return null;\n }\n\n const letterToday = solutionShuffled[index];\n const placement = shuffledPlacements[index];\n\n if (!letterToday || !placement) return null;\n\n const alreadyCollectedToday = (collected ?? []).includes(letterToday);\n\n // Already completed today\n if (alreadyCollectedToday) {\n return {\n todaysClue: null,\n todaysLetter: null,\n todaysPlacement: null,\n };\n }\n\n // Active state\n return {\n todaysClue: placement.clue,\n todaysLetter: letterToday,\n todaysPlacement: placement.id,\n };\n}\n","import { stripOverlaySubtitleSpecialChars } from \"src/sharing/normalizeShareDescription\";\nimport { OptionItem, PROMO_CODE_PREFIX, SocialMediaType } from \"src/types\";\n\nimport { EnumRegions } from \"../enums/clientEnums\";\nimport {\n InviteEnumType,\n PaymentMethodEnumType,\n PostTypeEnum,\n RewardEnumType,\n SocialMediaEnumType,\n LicencesEnumType,\n} from \"../generated/graphql\";\n\nimport { isIsoDateString } from \"./date\";\nimport { mapArrayToOptions } from \"./mapArrayToOptions\";\n\nexport const removeTypename = (obj: any): any => {\n // Preserve Date objects\n if (obj instanceof Date) {\n return obj;\n }\n\n // Preserve File objects (for apollo-upload-client)\n if (obj instanceof File) {\n return obj;\n }\n\n // Preserve ISO date strings\n if (isIsoDateString(obj)) {\n return obj;\n }\n\n // Handle arrays\n if (Array.isArray(obj)) {\n return obj.map(removeTypename);\n }\n\n // Handle plain objects only\n if (obj !== null && typeof obj === \"object\") {\n const { __typename, ...cleanedObj } = obj;\n\n return Object.keys(cleanedObj).reduce((acc: any, key) => {\n acc[key] = removeTypename(cleanedObj[key]);\n return acc;\n }, {});\n }\n\n // Primitives\n return obj;\n};\n\n/**\n * Truncate text to a specified length and append ellipsis if necessary.\n * @param text\n * @param maxLength\n * @returns\n */\nexport const truncateText = (text: string, maxLength: number = 30): string => {\n const result = stripOverlaySubtitleSpecialChars(text);\n return result.length > maxLength\n ? result.substring(0, maxLength) + \"...\"\n : result;\n};\n\nexport const capitalizeFirstLetter = (str: string): string => {\n return str\n .split(\" \")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n};\n\nexport const statusOptions = [\n ...Object.values(InviteEnumType)\n .map((status) => ({\n label: status,\n value: status,\n }))\n .sort((a, b) => a.label.localeCompare(b.label)), // Sort the options alphabetically\n];\n\nexport const availableRegionTypes = Object.values(EnumRegions);\nexport const availableRegionOptions: OptionItem[] =\n mapArrayToOptions(availableRegionTypes);\n\nexport const paymentMethodOptions: OptionItem[] = mapArrayToOptions(\n Object.values(PaymentMethodEnumType),\n);\n\nexport function normalizeUrl(url: string): string {\n const withProtocol =\n !url.startsWith(\"http://\") && !url.startsWith(\"https://\")\n ? `https://${url}`\n : url;\n return withProtocol.replace(/\\/+$/, \"\");\n}\n\nexport const licenseNiceNames: Record<LicencesEnumType, string> = {\n [LicencesEnumType.ProEvent]: \"Pro Event\",\n [LicencesEnumType.ProVendor]: \"Pro Stallholder\",\n [LicencesEnumType.StandardEvent]: \"Standard Event\",\n [LicencesEnumType.StandardVendor]: \"Standard Stallholder\",\n [LicencesEnumType.ProPlusEvent]: \"Pro+Ads Event\",\n [LicencesEnumType.ProPlusVendor]: \"Pro+Ads Stallholder\",\n [LicencesEnumType.StandardPartner]: \"Partner\",\n [LicencesEnumType.StandardAffiliate]: \"Affiliate\",\n [LicencesEnumType.StandardSchool]: \"School\",\n};\n\nexport const cluemartSocialMedia: SocialMediaType[] = [\n {\n link: \"https://www.facebook.com/ClueMartApp\",\n name: SocialMediaEnumType.Facebook,\n },\n {\n link: \"https://www.instagram.com/cluemart_app\",\n name: SocialMediaEnumType.Instagram,\n },\n {\n link: \"https://www.tiktok.com/@cluemart\",\n name: SocialMediaEnumType.Tiktok,\n },\n {\n link: \"https://www.youtube.com/@ClueMart-App-NZ\",\n name: SocialMediaEnumType.Youtube,\n },\n];\n\nexport const IOS_URL = \"https://apps.apple.com/nz/app/cluemart/id6747251008\";\nexport const ANDROID_URL =\n \"https://play.google.com/store/apps/details?id=com.timardex.cluemart\";\n\nexport const DEFAULT_RESOURCES_RETURN_LIMIT = 1000;\nexport const DEFAULT_RESOURCES_RETURN_OFFSET = 0;\nexport const CLUEMART_MAIN_DOMAIN_URL = \"https://cluemart.co.nz\";\n\nexport const rewardNiceNames: Record<\n RewardEnumType,\n { name: string; points: number }\n> = {\n [RewardEnumType.MysteryJoyBox]: {\n name: \"Mystery Joy Box\",\n points: 250,\n },\n [RewardEnumType.MysterySqueezeBox]: {\n name: \"Mystery Squeeze Box\",\n points: 350,\n },\n [RewardEnumType.MysteryDeluxeBox]: {\n name: \"Mystery Deluxe Box\",\n points: 500,\n },\n};\n\nexport const PostTypeLabels: Record<PostTypeEnum, string> = {\n [PostTypeEnum.MarketFaces]: \"Market Faces\",\n [PostTypeEnum.ClueBites]: \"Clue Bites\",\n [PostTypeEnum.PlayAndWin]: \"Play & Win\",\n};\n\n/** Hardcoded registration gateway code; only valid at sign-up (not a generated school referral code). */\nexport const CM_SCHOOL_PROMO_CODE = `${PROMO_CODE_PREFIX}SCHOOL`;\n\n/** Hardcoded registration gateway code; only valid at sign-up (not a generated affiliate referral code). */\nexport const CM_AFFILIATE_PROMO_CODE = `${PROMO_CODE_PREFIX}AFFILIATE`;\n\nexport function formatNZBankAccount(input: string): string {\n // Remove all non-digit characters\n const digitsOnly = input.replaceAll(/\\D/g, \"\");\n\n // Build the formatted string step-by-step\n const parts = [];\n if (digitsOnly.length > 0) parts.push(digitsOnly.slice(0, 2)); // bank\n if (digitsOnly.length > 2) parts.push(digitsOnly.slice(2, 6)); // branch\n if (digitsOnly.length > 6) parts.push(digitsOnly.slice(6, 13)); // account\n if (digitsOnly.length > 13) parts.push(digitsOnly.slice(13, 15)); // suffix\n\n return parts.join(\"-\");\n}\n","import { ResourceImageType } from \"../types/global\";\n\n/**\n * Loose input shape for normalization helpers. Callers often pass partial or legacy\n * data (e.g. Mongo docs without `active`, GraphQL input, empty placeholders) before\n * it becomes a strict `ResourceImageType`.\n */\ntype ResourceImageLike = {\n active?: boolean | null;\n source?: string | null;\n title?: string | null;\n};\n\n/**\n * Resolves whether a resource image is active.\n * Only an explicit `active: true` shows the image; missing `active` defaults to false\n * so licence downgrades (e.g. standard vendor gallery limit) are not overridden.\n */\nexport function resolveResourceImageActive(\n image: ResourceImageLike | null | undefined,\n): boolean {\n if (image?.active != null) {\n return image.active;\n }\n\n return false;\n}\n\nexport function normalizeResourceImage(\n image: ResourceImageLike | null | undefined,\n): ResourceImageType {\n return {\n active: resolveResourceImageActive(image),\n source: image?.source ?? \"\",\n title: image?.title ?? \"\",\n };\n}\n\nexport function isResourceImageActive(\n image: ResourceImageLike | null | undefined,\n): boolean {\n return resolveResourceImageActive(image);\n}\n","export const SCHOOL_MIN_STUDENT_COUNT = 300;\nexport const SCHOOL_MAX_STUDENT_COUNT = 0;\n","import { EventDateStatusEnumType } from \"../generated/graphql\";\nimport type { DateTimeType } from \"../types/global\";\n\nexport const EVENT_DATE_STATUS_PERIOD_MAP: Partial<\n Record<EventDateStatusEnumType, EventDateStatusEnumType[]>\n> = {\n [EventDateStatusEnumType.Today]: [\n EventDateStatusEnumType.Started,\n EventDateStatusEnumType.StartingSoon,\n EventDateStatusEnumType.Today,\n ],\n [EventDateStatusEnumType.ThisWeek]: [\n EventDateStatusEnumType.Started,\n EventDateStatusEnumType.StartingSoon,\n EventDateStatusEnumType.ThisWeek,\n EventDateStatusEnumType.Today,\n EventDateStatusEnumType.Tomorrow,\n ],\n};\n\nexport function getAllowedEventDateStatuses(\n period: EventDateStatusEnumType,\n): EventDateStatusEnumType[] {\n return EVENT_DATE_STATUS_PERIOD_MAP[period] ?? [period];\n}\n\nexport function eventMatchesDateStatusPeriod(\n dateTime: Pick<DateTimeType, \"dateStatus\">[] | null | undefined,\n period: EventDateStatusEnumType,\n): boolean {\n const allowedStatuses = getAllowedEventDateStatuses(period);\n\n return (\n dateTime?.some((dt) => allowedStatuses.includes(dt.dateStatus)) ?? false\n );\n}\n\nexport function filterEventsByDateStatusPeriod<\n T extends { dateTime?: Pick<DateTimeType, \"dateStatus\">[] | null },\n>(events: T[], period: EventDateStatusEnumType): T[] {\n return events.filter((event) =>\n eventMatchesDateStatusPeriod(event.dateTime, period),\n );\n}\n","import dayjs from \"dayjs\";\n\nimport {\n EventDateStatusEnumType,\n ResourceTypeEnum,\n} from \"../generated/graphql\";\nimport type { DateTimeType, LocationType } from \"../types/global\";\nimport { dateFormat, formatDate } from \"../utils/date\";\n\nexport type CalendarSheetContentData = {\n dateTime: DateTimeType;\n location: LocationType;\n resourceId: string;\n resourceType: ResourceTypeEnum;\n};\n\nexport const KNOWN_EVENT_SCHEDULE_STATUSES = new Set<EventDateStatusEnumType>([\n EventDateStatusEnumType.Started,\n EventDateStatusEnumType.StartingSoon,\n EventDateStatusEnumType.Ended,\n]);\n\nexport type EventScheduleStatusTone =\n | \"started\"\n | \"startingSoon\"\n | \"ended\"\n | \"default\";\n\nexport type EventScheduleStatusPresentation = {\n status: EventDateStatusEnumType;\n statusLabel: string;\n tone: EventScheduleStatusTone;\n};\n\nexport function toCalendarIsoDate(startDate: string): string | null {\n const formatted = dayjs(startDate, dateFormat).format(\"YYYY-MM-DD\");\n\n return dayjs(formatted, \"YYYY-MM-DD\", true).isValid() ? formatted : null;\n}\n\nexport function fromCalendarIsoDate(isoDate: string): string {\n return dayjs(isoDate, \"YYYY-MM-DD\").format(dateFormat);\n}\n\nexport function getEventCalendarIsoDates(\n dateTimes: DateTimeType[] | null | undefined,\n): string[] {\n return (\n dateTimes\n ?.map((dateTime) => toCalendarIsoDate(dateTime.startDate))\n .filter((date): date is string => Boolean(date)) ?? []\n );\n}\n\nexport function findEventDateTimeByIsoDate(\n dateTimes: DateTimeType[] | null | undefined,\n isoDate: string,\n): DateTimeType | null {\n const selected = fromCalendarIsoDate(isoDate);\n\n return dateTimes?.find((dateTime) => dateTime.startDate === selected) ?? null;\n}\n\nexport function buildCalendarSheetContentData(\n dateTimes: DateTimeType[],\n isoDate: string,\n location: LocationType,\n resourceId: string,\n resourceType: ResourceTypeEnum,\n): CalendarSheetContentData | null {\n const dateTime = findEventDateTimeByIsoDate(dateTimes, isoDate);\n\n if (!dateTime) {\n return null;\n }\n\n return {\n dateTime,\n location,\n resourceId,\n resourceType,\n };\n}\n\nexport function getEventScheduleStatusTone(\n status: EventDateStatusEnumType,\n): EventScheduleStatusTone {\n switch (status) {\n case EventDateStatusEnumType.Started:\n return \"started\";\n case EventDateStatusEnumType.StartingSoon:\n return \"startingSoon\";\n case EventDateStatusEnumType.Ended:\n return \"ended\";\n default:\n return \"default\";\n }\n}\n\nexport function getEventScheduleStatusPresentation(\n dateTime: DateTimeType,\n): EventScheduleStatusPresentation {\n return {\n status: dateTime.dateStatus,\n statusLabel: dateTime.dateStatus.replaceAll(\"_\", \" \").toLowerCase(),\n tone: getEventScheduleStatusTone(dateTime.dateStatus),\n };\n}\n\nexport function getEventScheduleStatusLabel(\n dateTime: DateTimeType,\n onlyShowKnownStatuses: boolean,\n): string | null {\n const { dateStatus: status } = dateTime;\n const isKnownStatus = Boolean(\n status && KNOWN_EVENT_SCHEDULE_STATUSES.has(status),\n );\n\n if (onlyShowKnownStatuses && !isKnownStatus) {\n return null;\n }\n\n return isKnownStatus\n ? status.replaceAll(\"_\", \" \").toLowerCase()\n : `Next event date: ${formatDate(dateTime.startDate, \"date\")}`;\n}\n\nexport function shouldShowEventActionsWithWeather(\n resourceType: ResourceTypeEnum,\n dateTime: DateTimeType,\n location: LocationType | null | undefined,\n): boolean {\n return (\n resourceType === ResourceTypeEnum.Event &&\n Boolean(location) &&\n Boolean(dateTime?.dateStatus) &&\n ![\n EventDateStatusEnumType.Ended,\n EventDateStatusEnumType.Canceled,\n EventDateStatusEnumType.Started,\n ].includes(dateTime.dateStatus)\n );\n}\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const clothingAndFashion: Category[] = [\n {\n id: \"clothing-fashion\",\n name: \"Clothing & Fashion\",\n description:\n \"New, handmade, or upcycled clothing and accessories with a creative twist.\",\n subcategories: [\n {\n id: \"apparel-babywear\",\n name: \"Apparel & Babywear\",\n items: [\n {\n id: \"apparel\",\n name: \"Apparel\",\n description: \"Dresses, t-shirts, jumpers, rompers, sets, kidswear.\",\n },\n {\n id: \"baby-toddler-apparel\",\n name: \"Baby & Toddler Apparel\",\n description:\n \"Handmade baby clothes, soft shoes, bibs, hats, knitted sets.\",\n },\n {\n id: \"upcycled-fashion\",\n name: \"Upcycled Fashion\",\n description:\n \"Reworked garments, patchwork pieces, restyled vintage.\",\n },\n {\n id: \"other-wearable-items\",\n name: \"Other wearable items\",\n description: \"Unique clothing not listed above.\",\n },\n ],\n },\n {\n id: \"fashion-accessories\",\n name: \"Fashion Accessories\",\n items: [\n {\n id: \"accessories\",\n name: \"Accessories\",\n description: \"Scarves, belts, gloves, hats, headbands, caps.\",\n },\n {\n id: \"shoes\",\n name: \"Shoes\",\n description: \"Handmade shoes, baby booties, sandals, slippers.\",\n },\n {\n id: \"bags-wallets\",\n name: \"Bags & Wallets\",\n description:\n \"Leather bags, fabric purses, wallets, backpacks, totes.\",\n },\n {\n id: \"other-accessories\",\n name: \"Other accessories\",\n description: \"Brooches, pins, or hybrid functional items.\",\n },\n ],\n },\n {\n id: \"jewelry-creative-wearables\",\n name: \"Jewelry & Creative Wearables\",\n items: [\n {\n id: \"jewelry\",\n name: \"Jewelry\",\n description: \"Necklaces, earrings, bracelets, rings, anklets.\",\n },\n {\n id: \"other-creative-wearables\",\n name: \"Other creative wearables\",\n description:\n \"Wearable art, statement pieces, bold handmade designs.\",\n },\n ],\n },\n {\n id: \"traditional-cultural-clothing-accessories\",\n name: \"Traditional & Cultural Clothing and Accessories\",\n items: [\n {\n id: \"traditional-clothing-accessories\",\n name: \"Traditional Clothing & Accessories \",\n description:\n \"raditional clothing, jewellery, accessories and footwear from around the world, including both handmade and non-handmade items.\",\n },\n {\n id: \"other-traditional-cultural-items\",\n name: \"Other Traditional & Cultural Items\",\n description:\n \"traditional or culturally inspired wearables and decorative cultural pieces such as plates, table linens and similar items.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const electronicsAndTechnology: Category[] = [\n {\n id: \"electronics-technology\",\n name: \"Electronics & Technology\",\n description:\n \"New, second-hand, or handmade tech and digital items commonly found at markets.\",\n subcategories: [\n {\n id: \"mobile-everyday-tech\",\n name: \"Mobile & Everyday Tech\",\n items: [\n {\n id: \"mobile-phone-accessories\",\n name: \"Mobile & Phone Accessories\",\n description:\n \"Phone cases, holders, screen protectors, charging cables, power banks, grips.\",\n },\n {\n id: \"other-mobile-gadgets\",\n name: \"Other mobile gadgets\",\n description:\n \"Stands, styluses, SIM tools, cleaning kits, wallet accessories.\",\n },\n ],\n },\n {\n id: \"audio-music-creative-tech\",\n name: \"Audio, Music & Creative Tech\",\n items: [\n {\n id: \"audio-music-tech\",\n name: \"Audio & Music Tech\",\n description:\n \"Portable speakers, headphones, mini radios, Bluetooth adapters, sound accessories.\",\n },\n {\n id: \"instruments-music-gear\",\n name: \"Instruments & Music Gear\",\n description:\n \"Small electronic instruments, DIY synth kits, drum pads, loop machines.\",\n },\n {\n id: \"recording-creative-devices\",\n name: \"Recording & Creative Devices\",\n description:\n \"USB microphones, podcast tools, voice recorders, mobile lighting, content tools.\",\n },\n {\n id: \"other-audio-music-items\",\n name: \"Other audio or music-related items\",\n description: \"Musical gadgets or creative gear not listed above.\",\n },\n ],\n },\n {\n id: \"diy-gadgets-secondhand-finds\",\n name: \"DIY, Gadgets & Second-Hand Finds\",\n items: [\n {\n id: \"diy-electronics-tools\",\n name: \"DIY Electronics & Tools\",\n description:\n \"LED lights, USB gadgets, circuit boards, repair kits, tech-themed toys, novelty items.\",\n },\n {\n id: \"other-tech-finds\",\n name: \"Other Tech Finds\",\n description:\n \"Used electronics, smart gadgets, wearable tech, calculators, tablet stands, e-waste upcycles.\",\n },\n {\n id: \"other-technology-innovation-items\",\n name: \"Other technology or innovation-related items\",\n description: \"Anything not covered but clearly tech-driven.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const foodAndBeverages: Category[] = [\n {\n id: \"food-beverages\",\n name: \"Food & Beverages\",\n description:\n \"Fresh produce, drinks, sweet and savoury street food, ready-to-eat meals, and packaged goods.\",\n subcategories: [\n {\n id: \"fresh-food-groceries\",\n name: \"Fresh Food & Groceries\",\n items: [\n {\n id: \"fruits-vegetables\",\n name: \"Fruits & Vegetables\",\n description:\n \"Fresh seasonal fruit, organic vegetables, specialty produce, berries, tropical fruit, heritage varieties.\",\n },\n {\n id: \"meat-seafood\",\n name: \"Meat & Seafood\",\n description:\n \"Butcher cuts, fresh fish, smoked meats, sausages, seafood platters, artisanal jerky.\",\n },\n {\n id: \"dairy-eggs\",\n name: \"Dairy & Eggs\",\n description:\n \"Farm eggs, handmade cheeses, yoghurt, fresh milk, goat’s milk products.\",\n },\n {\n id: \"bakery-pastries\",\n name: \"Bakery & Pastries\",\n description:\n \"Freshly baked bread, sourdough, bagels, croissants, focaccia, traditional baked goods.\",\n },\n {\n id: \"spices-condiments\",\n name: \"Spices & Condiments\",\n description:\n \"Dried herbs, spice blends, specialty salts, hot sauces, infused oils, chutneys.\",\n },\n {\n id: \"packaged-specialty-foods\",\n name: \"Packaged & Specialty Foods\",\n description:\n \"Honey, jams, preserves, pickles, nut butters, sauces, pre-packaged snacks.\",\n },\n {\n id: \"other-fresh-food-items\",\n name: \"Other fresh food items\",\n description:\n \"Items that don’t fit above, e.g. fermented foods, plant-based substitutes.\",\n },\n ],\n },\n {\n id: \"beverages-specialty-drinks\",\n name: \"Beverages & Specialty Drinks\",\n items: [\n {\n id: \"fresh-juices-smoothies\",\n name: \"Fresh Juices & Smoothies\",\n description:\n \"Cold-pressed juices, detox blends, fruit smoothies, tropical mixes.\",\n },\n {\n id: \"coffee-teas\",\n name: \"Coffee & Teas\",\n description:\n \"Espresso, pour-over coffee, herbal teas, matcha, bubble tea, locally blended tea.\",\n },\n {\n id: \"dairy-plant-based-drinks\",\n name: \"Dairy & Plant-Based Drinks\",\n description:\n \"Milkshakes, lassis, almond/oat milk drinks, coconut water.\",\n },\n {\n id: \"alcoholic-beverages\",\n name: \"Alcoholic Beverages\",\n description:\n \"Local wines, craft beer, mead, cider, infused spirits, cocktail kits.\",\n },\n {\n id: \"other-beverages\",\n name: \"Other beverages\",\n description:\n \"Kombucha, kefir, energy drinks, non-alcoholic wines or beers.\",\n },\n ],\n },\n {\n id: \"savoury-prepared-foods-street-food\",\n name: \"Savoury Prepared Foods & Street Food\",\n items: [\n {\n id: \"local-specialties\",\n name: \"Local Specialties\",\n description:\n \"Meat pies, hangi, seafood chowder, fry bread, traditional NZ dishes.\",\n },\n {\n id: \"asian-cuisine\",\n name: \"Asian Cuisine\",\n description:\n \"Sushi, bao buns, dumplings, ramen, satay, spring rolls, fried rice.\",\n },\n {\n id: \"mediterranean-cuisine\",\n name: \"Mediterranean Cuisine\",\n description: \"Falafel, hummus wraps, souvlaki, Greek salad, dolma.\",\n },\n {\n id: \"italian-delights\",\n name: \"Italian Delights\",\n description: \"Pizza, calzone, focaccia, fresh pasta, arancini.\",\n },\n {\n id: \"bbq-grilled-foods\",\n name: \"BBQ & Grilled Foods\",\n description: \"Kebabs, grilled chicken, ribs, burgers, sausages.\",\n },\n {\n id: \"savoury-crepes-pancakes\",\n name: \"Savoury Crepes & Pancakes\",\n description: \"Filled savoury crepes, mini savoury pancakes.\",\n },\n {\n id: \"savoury-baked-goods-pastries\",\n name: \"Savoury Baked Goods & Pastries\",\n description:\n \"Quiches, savoury muffins, filled savoury pastries, empanadas.\",\n },\n {\n id: \"vegan-vegetarian-dishes\",\n name: \"Vegan & Vegetarian Dishes\",\n description:\n \"Buddha bowls, plant-based burgers, salads, vegan sushi.\",\n },\n {\n id: \"other-savoury-foods\",\n name: \"Other Savoury Foods\",\n description: \"Fusion dishes, mixed platters, savoury meal kits.\",\n },\n ],\n },\n {\n id: \"sweet-prepared-foods\",\n name: \"Sweet Prepared Foods\",\n items: [\n {\n id: \"sweet-crepes-pancakes-fried-treats\",\n name: \"Sweet Crepes, Pancakes & Fried Treats\",\n description: \"Crepes, waffles, mini pancakes, muffins, doughnuts.\",\n },\n {\n id: \"sweet-baked-goods-desserts\",\n name: \"Sweet Baked Goods & Desserts\",\n description: \"Cakes, pastries, slices, trifles, layered desserts.\",\n },\n {\n id: \"fruit-based-snacks\",\n name: \"Fruit-Based Snacks\",\n description:\n \"Fruit skewers, dried fruit packs, chocolate-dipped fruit.\",\n },\n {\n id: \"candy-confectionery\",\n name: \"Candy & Confectionery\",\n description: \"Fudge, handmade candies, toffee, nougat, brittle.\",\n },\n {\n id: \"other-sweet-foods\",\n name: \"Other Sweet Foods\",\n description: \"Fusion desserts, sweet platters, sweet meal kits.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const handmadeAndLocalProducts: Category[] = [\n {\n id: \"handmade-local-products\",\n name: \"Handmade & Local Products\",\n description: \"Unique, handmade, or locally produced artisan goods.\",\n subcategories: [\n {\n id: \"home-living\",\n name: \"Home & Living\",\n items: [\n {\n id: \"ceramics-pottery\",\n name: \"Ceramics & Pottery\",\n description:\n \"Handmade mugs, vases, bowls, decorative plates, plant pots.\",\n },\n {\n id: \"candles-home-scents\",\n name: \"Candles & Home Scents\",\n description:\n \"Soy candles, beeswax candles, wax melts, incense sticks, room sprays and herbal sachets.\",\n },\n {\n id: \"botanical-crafts\",\n name: \"Botanical Crafts\",\n description: \"Dried-flower décor and pressed-flower crafts\",\n },\n {\n id: \"textiles-embroidery\",\n name: \"Textiles & Embroidery\",\n description:\n \"Handsewn items, embroidered napkins, home linens, aprons, fabric gift wraps, handmade fabric bags, quilted goods, personalized textile gifts.\",\n },\n {\n id: \"woodcraft-metalcraft\",\n name: \"Woodcraft & Metalcraft\",\n description:\n \"Wooden boards, handmade frames, sculptures, metal signs, furniture.\",\n },\n {\n id: \"handmade-soaps-natural-body-goods\",\n name: \"Handmade Soaps & Natural Body Goods\",\n description: \"Handmade soaps, balms, oils, bath items\",\n },\n {\n id: \"seasonal-festive-crafts\",\n name: \"Seasonal & Festive Crafts\",\n description: \"Christmas, Easter and seasonal handmade decor\",\n },\n {\n id: \"other-home-living-products\",\n name: \"Other home & living products\",\n description:\n \"Items that don't fit above but serve home-related purposes.\",\n },\n ],\n },\n {\n id: \"art-personal-expression\",\n name: \"Art & Personal Expression\",\n items: [\n {\n id: \"paintings-illustrations\",\n name: \"Paintings & Illustrations\",\n description:\n \"Paintings, canvas art, hand-drawn illustrations, digital prints, graphic art and calligraphy pieces.\",\n },\n {\n id: \"sculptures-carvings\",\n name: \"Sculptures & Carvings \",\n description:\n \"Sculptures made from wood, stone, metal, clay or resin, carved decorative pieces and artistic 3D works.\",\n },\n {\n id: \"creative-handmade-alternative-art\",\n name: \"Creative Handmade & Alternative Art\",\n description:\n \"Handmade textile décor, fabric ornaments, mixed-media art, creative craft pieces and modern handmade artworks.\",\n },\n {\n id: \"handmade-mini-figures-decor\",\n name: \"Handmade Mini Figures & Décor\",\n description:\n \"Small handmade figures, tiny houses and crafted mini decorative items.\",\n },\n {\n id: \"other-artistic-expressive-products\",\n name: \"Other Artistic or Expressive Products\",\n description:\n \"Custom artworks, specialty handmade décor, unique crafts.\",\n },\n ],\n },\n {\n id: \"handmade-jewellery-accessories-cultural-crafts\",\n name: \"Handmade Jewellery, Accessories & Cultural Crafts\",\n items: [\n {\n id: \"jewellery-handmade-items-nz-traditional-materials\",\n name: \"Jewellery & Handmade Items from NZ Traditional Materials\",\n description:\n \"Handmade jewellery and decorative or functional items crafted from pounamu, bone, wood and other traditional New Zealand materials.\",\n },\n {\n id: \"maori-pasifika-cultural-crafts-clothing\",\n name: \"Māori & Pasifika Cultural Crafts and Clothing\",\n description:\n \"Culturally inspired handmade items, accessories and garments featuring Māori or Pasifika motifs, traditional patterns and regional craftsmanship.\",\n },\n {\n id: \"traditional-handmade-clothing-jewellery-crafts-global-cultures\",\n name: \"Traditional Handmade Clothing, Jewellery & Crafts from Global Cultures\",\n description:\n \"Handcrafted clothing, jewellery and cultural items from diverse traditions — including Asian, African, European, Middle Eastern, Indian, Chinese, Japanese, Pacific, and other culturally significant handmade pieces.\",\n },\n {\n id: \"other-handmade-cultural-items\",\n name: \"Other Handmade Cultural Items\",\n description:\n \"Unique or culturally inspired handmade pieces not specifically covered in the categories above.\",\n },\n ],\n },\n {\n id: \"gift-ideas-accessories\",\n name: \"Gift Ideas & Accessories\",\n items: [\n {\n id: \"handmade-pens-keychains-fridge-magnets\",\n name: \"Handmade Pens, Keychains and Fridge Magnets\",\n description: null,\n },\n {\n id: \"gift-packaging-wrapping-accessories\",\n name: \"Gift Packaging & Wrapping Accessories\",\n description: null,\n },\n {\n id: \"handmade-crochet-knitting-fibre-crafts\",\n name: \"Handmade Crochet, Knitting & Fibre Crafts\",\n description:\n \"Handmade crochet and knitted items, fabric-based crafts, small decorative pieces, creative fibre artworks and unique handcrafted accessories.\",\n },\n {\n id: \"handmade-toys-mini-play-items\",\n name: \"Handmade Toys & Mini Play Items\",\n description:\n \"small handmade toys, soft toys, wooden miniatures, crochet or felt play pieces\",\n },\n {\n id: \"other-small-handmade-gifts-accessories\",\n name: \"Other small handmade gifts or accessories\",\n description: \"Compact creative items made to surprise or delight.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const healthAndWellness: Category[] = [\n {\n id: \"health-wellness\",\n name: \"Health & Wellness\",\n description:\n \"Natural products and services that promote wellbeing, body care, and holistic health.\",\n subcategories: [\n {\n id: \"body-skincare\",\n name: \"Body & Skincare\",\n items: [\n {\n id: \"skincare-body-products\",\n name: \"Skincare & Body Products\",\n description:\n \"Soaps, creams, lip balms, bath salts, bath bombs, body oils, natural deodorants.\",\n },\n {\n id: \"other-body-care-items\",\n name: \"Other body care items\",\n description:\n \"Additional handmade or eco-conscious personal care goods.\",\n },\n ],\n },\n {\n id: \"aromatherapy-herbal-wellness\",\n name: \"Aromatherapy & Herbal Wellness\",\n items: [\n {\n id: \"aromatherapy-herbal-remedies\",\n name: \"Aromatherapy & Herbal Remedies\",\n description:\n \"Essential oils, herbal balms, massage oils, salves, natural teas, rollers.\",\n },\n {\n id: \"other-herbal-aroma-products\",\n name: \"Other herbal or aroma-based products\",\n description: \"Wellness blends, herb sachets, custom infusions.\",\n },\n ],\n },\n {\n id: \"wellness-tools-accessories\",\n name: \"Wellness Tools & Accessories\",\n items: [\n {\n id: \"wellness-accessories\",\n name: \"Wellness Accessories\",\n description:\n \"Yoga mats, meditation cushions, eye pillows, incense, smudging sticks, eco water bottles, wellness journals.\",\n },\n {\n id: \"spiritual-tools-crystals\",\n name: \"Spiritual Tools & Crystals\",\n description:\n \"Healing crystals, gemstone bracelets, pendulums, sprays, spiritual kits, altar decor.\",\n },\n {\n id: \"other-wellness-spiritual-items\",\n name: \"Other wellness or spiritual items\",\n description: \"Items that aid relaxation, focus, or inner work.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const homeGardenHousehold: Category[] = [\n {\n id: \"home-garden-household-goods\",\n name: \"Home, Garden & Household Goods\",\n description:\n \"Functional, decorative, and eco-conscious products designed for everyday use indoors and outdoors.\",\n subcategories: [\n {\n id: \"home-decor-living\",\n name: \"Home Decor & Living\",\n items: [\n {\n id: \"home-decor\",\n name: \"Home Decor\",\n description:\n \"Cushions, wall art, table runners, vases, trays, mirrors, handmade centerpieces.\",\n },\n {\n id: \"kitchenware-dining\",\n name: \"Kitchenware & Dining\",\n description:\n \"Mugs, bowls, cutting boards, utensils, jars, coasters, kitchen textiles.\",\n },\n {\n id: \"mini-figures-decor\",\n name: \"Mini Figures & Décor\",\n description:\n \"handmade or non-handmade small figures, tiny houses and miniature decorative items.\",\n },\n {\n id: \"other-indoor-home-items\",\n name: \"Other indoor home items\",\n description:\n \"Any decorative or practical household items not listed above.\",\n },\n ],\n },\n {\n id: \"cleaning-eco-essentials\",\n name: \"Cleaning & Eco Essentials\",\n items: [\n {\n id: \"cleaning-eco-supplies\",\n name: \"Cleaning & Eco Supplies\",\n description:\n \"Beeswax wraps, reusable cloths, brushes, natural soaps, detergent bars, eco sponges.\",\n },\n {\n id: \"other-eco-cleaning-items\",\n name: \"Other eco or cleaning items\",\n description: \"Environmentally friendly goods not listed above.\",\n },\n ],\n },\n {\n id: \"garden-outdoor-living\",\n name: \"Garden & Outdoor Living\",\n items: [\n {\n id: \"plants-botanical-decor\",\n name: \"Plants & Botanical Decor\",\n description:\n \"Potted herbs, succulents, dried flowers, terrariums, plant-based ornaments.\",\n },\n {\n id: \"fresh-flowers-botanical-bouquets\",\n name: \"Fresh Flowers & Botanical Bouquets\",\n description:\n \"Cut flowers, seasonal bouquets, simple floral arrangements, native flower selections, and other fresh botanical items.\",\n },\n {\n id: \"natural-decor-nature-inspired-elements\",\n name: \"Natural Decor & Nature-Inspired Elements\",\n description:\n \"Seashell décor, driftwood pieces, sand ornaments, natural wood accents, stone or mineral decorations, and other nature-based decorative items.\",\n },\n {\n id: \"garden-tools-outdoor-items\",\n name: \"Garden Tools & Outdoor Items\",\n description:\n \"Plant markers, garden signs, stakes, small tools, wind chimes, gifts.\",\n },\n {\n id: \"other-outdoor-garden-products\",\n name: \"Other outdoor or garden products\",\n description: \"Functional or decorative items for outside use.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const petProductsAndAnimalGoods: Category[] = [\n {\n id: \"pet-products-animal-goods\",\n name: \"Pet Products & Animal Goods\",\n description: \"Items for pets, pet lovers, or animal-themed market stalls.\",\n subcategories: [\n {\n id: \"products-for-pets\",\n name: \"Products for Pets\",\n items: [\n {\n id: \"pet-food-treats\",\n name: \"Pet Food & Treats\",\n description:\n \"Homemade dog biscuits, cat snacks, natural chews, pet-safe cakes, training treats.\",\n },\n {\n id: \"apparel-toys-accessories\",\n name: \"Apparel, Toys & Accessories\",\n description:\n \"Leashes, collars, harnesses, toys, grooming tools, beds, travel gear, jumpers, bandanas.\",\n },\n {\n id: \"other-pet-products\",\n name: \"Other pet products\",\n description: \"Any pet-related items not listed above.\",\n },\n ],\n },\n {\n id: \"small-pets-birds-exotic-animals\",\n name: \"Small Pets, Birds & Exotic Animals\",\n items: [\n {\n id: \"products-small-pets-birds-exotics\",\n name: \"Products for Small Pets, Birds & Exotics\",\n description:\n \"Toys, enclosures, perches, feeding bowls, bedding, habitat decor, transport gear, and care items for birds, rabbits, hamsters, reptiles, turtles, aquarium pets, and other exotic species.\",\n },\n {\n id: \"other-small-exotic-animal-items\",\n name: \"Other small or exotic animal items\",\n description: \"Unusual accessories for non-mainstream pets.\",\n },\n ],\n },\n {\n id: \"farm-working-animals\",\n name: \"Farm & Working Animals\",\n items: [\n {\n id: \"goods-for-farm-working-animals\",\n name: \"Goods for Farm & Working Animals\",\n description:\n \"Treats, care products, equipment, signage and accessories for chickens, goats, alpacas, horses, and other livestock.\",\n },\n {\n id: \"other-farm-animal-items\",\n name: \"Other farm animal-related items\",\n description:\n \"Rural, barnyard, or utility-specific gear not listed above.\",\n },\n ],\n },\n {\n id: \"animal-themed-gifts-custom-items\",\n name: \"Animal-Themed Gifts & Custom Items\",\n items: [\n {\n id: \"pet-art-custom-gifts\",\n name: \"Pet Art & Custom Gifts\",\n description:\n \"Pet portraits, name tags, personalized bowls, breed-specific items, pet-themed home decor and stationery.\",\n },\n {\n id: \"other-animal-themed-gifts\",\n name: \"Other animal-themed gifts\",\n description:\n \"Artistic or sentimental items made for animal lovers.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"src/types\";\n\n/* eslint-disable sort-keys */\nexport const serviceAndExperience: Category[] = [\n {\n id: \"services-experiences\",\n name: \"Services & Experiences\",\n description:\n \"On-site offerings that provide entertainment, personal care, learning, or interactive activities beyond products.\",\n subcategories: [\n {\n id: \"personal-care-body-art\",\n name: \"Personal Care & Body Art\",\n items: [\n {\n id: \"nails-handcare\",\n name: \"Nails & Handcare\",\n description:\n \"Nail painting, decoration, quick manicures, temporary nail extensions.\",\n },\n {\n id: \"hair-styling-braiding\",\n name: \"Hair Styling & Braiding\",\n description:\n \"Hair braiding, plaits, child-friendly festival hairstyles.\",\n },\n {\n id: \"face-body-decoration\",\n name: \"Face & Body Decoration\",\n description:\n \"Henna, glitter tattoos, face painting, light makeup, eyelash styling, professional tattooing (where permitted).\",\n },\n {\n id: \"other-beauty-grooming-services\",\n name: \"Other beauty or grooming services\",\n description: \"Small-scale personal care options offered on-site.\",\n },\n ],\n },\n {\n id: \"practical-wellness-services\",\n name: \"Practical & Wellness Services\",\n items: [\n {\n id: \"mobile-practical-services\",\n name: \"Mobile & Practical Services\",\n description:\n \"Shoe repair, phone repairs, knife sharpening, key cutting, battery replacement, bike repairs, engraving.\",\n },\n {\n id: \"wellness-alternative-therapies\",\n name: \"Wellness & Alternative Therapies\",\n description:\n \"Massage, aromatherapy, reflexology, energy healing (e.g. Reiki), natural consultations.\",\n },\n {\n id: \"other-service-based-offerings\",\n name: \"Other service-based offerings\",\n description: \"Wellness or functional services not listed above.\",\n },\n ],\n },\n {\n id: \"creative-educational-experiences\",\n name: \"Creative & Educational Experiences\",\n items: [\n {\n id: \"creative-workshops-maker-services\",\n name: \"Creative Workshops & Maker Services\",\n description:\n \"Candle making, pottery, jewelry crafting, soap or balm workshops, calligraphy, seasonal crafts.\",\n },\n {\n id: \"education-awareness-stalls\",\n name: \"Education & Awareness Stalls\",\n description:\n \"Eco awareness, cultural storytelling, local history, first aid demos, health booths, sustainability education, kids’ science displays.\",\n },\n {\n id: \"other-creative-educational-services\",\n name: \"Other creative or educational services\",\n description:\n \"Informal learning, demonstrations, or community-focused sessions.\",\n },\n ],\n },\n {\n id: \"kids-activities-family-fun\",\n name: \"Kids’ Activities & Family Fun\",\n items: [\n {\n id: \"kids-activities-fun\",\n name: \"Kids’ Activities & Fun\",\n description:\n \"Face painting, glitter tattoos, pony rides, bouncy castles, small amusement rides, balloon twisting, animal petting zones.\",\n },\n {\n id: \"other-family-oriented-activities\",\n name: \"Other family-oriented activities\",\n description:\n \"On-site entertainment that engages children or family groups.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"src/types\";\n\n/* eslint-disable sort-keys */\nexport const toysChildren: Category[] = [\n {\n id: \"toys-childrens-items\",\n name: \"Toys & Children’s Items\",\n description: \"Products and services made for or inspired by children.\",\n subcategories: [\n {\n id: \"toys-playthings\",\n name: \"Toys & Playthings\",\n items: [\n {\n id: \"toys-classic-electric-character\",\n name: \"Toys – Classic, Electric & Character-Based\",\n description:\n \"Building blocks, dolls, puzzles, plush animals, toy vehicles, remote-control toys, light-up gadgets, character figurines, themed playsets.\",\n },\n {\n id: \"handmade-toys-crafty-playthings\",\n name: \"Handmade Toys & Crafty Playthings\",\n description:\n \"Wooden puzzles, crocheted animals, felt toys, fabric dolls, DIY kits, nature-inspired games, sensory toys.\",\n },\n {\n id: \"other-play-items\",\n name: \"Other play items\",\n description:\n \"Toys not listed above, including limited-edition or hybrid items.\",\n },\n ],\n },\n {\n id: \"educational-developmental\",\n name: \"Educational & Developmental\",\n items: [\n {\n id: \"educational-developmental-tools\",\n name: \"Educational & Developmental Tools\",\n description:\n \"STEM kits, Montessori toys, storybooks, picture books, flashcards, early learning games, language tools.\",\n },\n {\n id: \"other-educational-experience-based-items\",\n name: \"Other educational or experience-based items\",\n description:\n \"Creative experiences or learning aids not listed above.\",\n },\n ],\n },\n {\n id: \"baby-kidswear-accessories\",\n name: \"Baby & Kidswear + Accessories\",\n items: [\n {\n id: \"baby-kidswear-accessories\",\n name: \"Baby & Kidswear + Accessories\",\n description:\n \"Handmade baby clothes, toddler outfits, bibs, hats, headbands, bags, pacifier clips, soft shoes.\",\n },\n {\n id: \"baby-developmental-soft-toys\",\n name: \"Baby Developmental Soft Toys\",\n description:\n \"Sensory toys, rattles, fabric books, teething items, high-contrast cards, and early-skill. Montessori materials designed to support infants’ cognitive and motor development.\",\n },\n {\n id: \"other-childrens-clothing-accessories\",\n name: \"Other children’s clothing or accessories\",\n description: \"Unique fashion or functional pieces for kids.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const vintageAndAntique: Category[] = [\n {\n id: \"vintage-antique\",\n name: \"Vintage & Antique\",\n description:\n \"Unique, historic, or nostalgic items with collectible or decorative value.\",\n subcategories: [\n {\n id: \"vintage-antique-clothing-accessories\",\n name: \"Vintage & Antique Clothing & Accessories\",\n items: [\n {\n id: \"clothing-vintage-fashion\",\n name: \"Clothing and wearable items from past eras\",\n description:\n \"Vintage dresses, jackets, hats, gloves, belts, bags, shoes, jewellery.\",\n },\n {\n id: \"other-clothing-accessory-items\",\n name: \"Other clothing-related items\",\n description:\n \"Hair clips, brooches, pins, scarf rings, small fashion accessories.\",\n },\n ],\n },\n {\n id: \"collectibles-memorabilia\",\n name: \"Collectibles & Memorabilia\",\n items: [\n {\n id: \"small-collectible-items\",\n name: \"Small collectible items with historical or nostalgic significance\",\n description:\n \"Coins, stamps, toys, postcards, comics, sports cards, vintage packaging.\",\n },\n {\n id: \"other-collectible-items\",\n name: \"Other collectible items\",\n description:\n \"Rare small objects, miniature figurines, special-edition items.\",\n },\n ],\n },\n {\n id: \"homewares-decor-curiosities\",\n name: \"Homewares, Decor & Curiosities\",\n items: [\n {\n id: \"decorative-functional-vintage-items\",\n name: \"Decorative or functional items with a vintage or antique aesthetic\",\n description:\n \"Teacups, plates, vases, mirrors, clocks, furniture, old tools, lanterns, typewriters, curiosities.\",\n },\n {\n id: \"handmade-vintage-art\",\n name: \"Handmade vintage art\",\n description: \"Paintings, sculptures, crafted pieces.\",\n },\n {\n id: \"other-home-decor-items\",\n name: \"Other home or decor items\",\n description:\n \"Decorative pieces not listed above, unique household objects.\",\n },\n ],\n },\n {\n id: \"vintage-media-printed-nostalgia\",\n name: \"Vintage Media & Printed Nostalgia\",\n items: [\n {\n id: \"older-media-printed-works\",\n name: \"Older media formats and printed works\",\n description:\n \"Vinyl records, cassette tapes, CDs, DVDs, books, magazines, board games, posters.\",\n },\n {\n id: \"other-media-printed-items\",\n name: \"Other media or printed items\",\n description: \"Maps, manuals, leaflets, out-of-print materials.\",\n },\n ],\n },\n {\n id: \"other-vintage-antique-items\",\n name: \"Other Vintage & Antique Items\",\n items: [\n {\n id: \"any-vintage-antique-items-not-listed\",\n name: \"Any vintage or antique items not listed above\",\n description: \"Unique, rare or uncategorised pieces.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"../../types/global\";\n\nimport { clothingAndFashion } from \"./clothingAndFashion\";\nimport { electronicsAndTechnology } from \"./electronicsAndTechnology\";\nimport { foodAndBeverages } from \"./foodAndBeverages\";\nimport { handmadeAndLocalProducts } from \"./handmadeAndLocalProducts\";\nimport { healthAndWellness } from \"./healthAndWellness\";\nimport { homeGardenHousehold } from \"./homeGardenHousehold\";\nimport { petProductsAndAnimalGoods } from \"./petProductsAndAnimalGoods\";\nimport { serviceAndExperience } from \"./serviceAndExperience\";\nimport { toysChildren } from \"./toysChildren\";\nimport { vintageAndAntique } from \"./vintageAndAntique\";\n\nexport const categoryColors: Record<string, string> = {\n \"clothing-fashion\": \"#9D4EDD\",\n \"electronics-technology\": \"#3AF3FF\",\n \"food-beverages\": \"#FF0D1F\",\n \"handmade-local-products\": \"#EE7E54\",\n \"health-wellness\": \"#E23794\",\n \"home-garden-household-goods\": \"#067325\",\n \"pet-products-animal-goods\": \"#68E788\",\n \"services-experiences\": \"#2E16A5\",\n \"toys-childrens-items\": \"#FFF966\",\n \"vintage-antique\": \"#8D6748\",\n};\n\nconst assignColorToCategories = (categories: Category[]): Category[] => {\n const result = categories.map((category) => ({\n ...category,\n color: categoryColors[category.id],\n }));\n return result;\n};\n\nexport const availableCategories = assignColorToCategories([\n ...foodAndBeverages,\n ...handmadeAndLocalProducts,\n ...clothingAndFashion,\n ...homeGardenHousehold,\n ...toysChildren,\n ...healthAndWellness,\n ...electronicsAndTechnology,\n ...vintageAndAntique,\n ...petProductsAndAnimalGoods,\n ...serviceAndExperience,\n]);\n","import { availableCategories } from \"../formFields/categories\";\nimport type { UnregisteredVendorType, VendorType } from \"../types\";\nimport type { DateTimeType } from \"../types/global\";\nimport { sortDatesChronologically } from \"../utils/date\";\n\ntype RelationType = NonNullable<VendorType[\"relations\"]>[number];\ntype RelationDateType = NonNullable<RelationType[\"relationDates\"]>[number];\n\nexport type StallholderFilterOption = {\n label: string;\n value: string;\n};\n\nexport function eventStartDatesSet(\n dateTime: DateTimeType[] | undefined,\n): Set<string> {\n return new Set((dateTime ?? []).map((date) => date.startDate));\n}\n\nexport function hasMatchingEventDate(\n vendorStartDates: string[],\n eventStartDates: Set<string>,\n): boolean {\n return vendorStartDates.some((startDate) => eventStartDates.has(startDate));\n}\n\nexport function matchesSelectedDate(\n vendorStartDates: string[],\n selectedDate: string | null,\n): boolean {\n if (!selectedDate) {\n return true;\n }\n\n return vendorStartDates.includes(selectedDate);\n}\n\nexport function matchesCategory(\n categoryNames: string[],\n selectedCategory: string | null,\n): boolean {\n if (!selectedCategory) {\n return true;\n }\n\n return categoryNames.includes(selectedCategory);\n}\n\nexport function getRegisteredVendorStartDates(vendor: VendorType): string[] {\n const relations = vendor.relations ?? [];\n\n return relations.flatMap((relation) =>\n (relation.relationDates ?? []).map(\n (relationDate: RelationDateType) => relationDate.dateTime.startDate,\n ),\n );\n}\n\nexport function getRegisteredVendorCategoryNames(vendor: VendorType): string[] {\n return (vendor.categories ?? []).map((category) => category.name);\n}\n\nexport function getUnregisteredVendorStartDates(\n vendor: UnregisteredVendorType,\n): string[] {\n return (vendor.invitations ?? []).flatMap((invitation) =>\n invitation.dateTime.map((date) => date.startDate),\n );\n}\n\nexport function getUnregisteredVendorCategoryNames(\n vendor: UnregisteredVendorType,\n): string[] {\n return availableCategories\n .filter(\n (category) => category.id && vendor.categoryIds.includes(category.id),\n )\n .map((category) => category.name);\n}\n\nexport function filterRegisteredVendorsForEvent(\n vendors: VendorType[] | null | undefined,\n eventStartDates: Set<string>,\n selectedDate: string | null,\n selectedCategory: string | null,\n): VendorType[] {\n if (!vendors) {\n return [];\n }\n\n return vendors.filter((vendor) => {\n const startDates = getRegisteredVendorStartDates(vendor);\n\n return (\n hasMatchingEventDate(startDates, eventStartDates) &&\n matchesSelectedDate(startDates, selectedDate) &&\n matchesCategory(\n getRegisteredVendorCategoryNames(vendor),\n selectedCategory,\n )\n );\n });\n}\n\nexport function filterUnregisteredVendorsForEvent(\n vendors: UnregisteredVendorType[],\n eventStartDates: Set<string>,\n selectedDate: string | null,\n selectedCategory: string | null,\n): UnregisteredVendorType[] {\n return vendors.filter((vendor) => {\n const startDates = getUnregisteredVendorStartDates(vendor);\n\n return (\n hasMatchingEventDate(startDates, eventStartDates) &&\n matchesSelectedDate(startDates, selectedDate) &&\n matchesCategory(\n getUnregisteredVendorCategoryNames(vendor),\n selectedCategory,\n )\n );\n });\n}\n\nexport function filterRegisteredVendorsByEventDatesOnly(\n vendors: VendorType[] | null | undefined,\n eventStartDates: Set<string>,\n): VendorType[] {\n if (!vendors) {\n return [];\n }\n\n return vendors.filter((vendor) =>\n hasMatchingEventDate(\n getRegisteredVendorStartDates(vendor),\n eventStartDates,\n ),\n );\n}\n\nexport function filterUnregisteredVendorsByEventDatesOnly(\n vendors: UnregisteredVendorType[],\n eventStartDates: Set<string>,\n): UnregisteredVendorType[] {\n return vendors.filter((vendor) =>\n hasMatchingEventDate(\n getUnregisteredVendorStartDates(vendor),\n eventStartDates,\n ),\n );\n}\n\nexport function collectStallholderStartDates(\n registeredVendors: VendorType[],\n unregisteredVendors: UnregisteredVendorType[] = [],\n): string[] {\n return [\n ...registeredVendors.flatMap(getRegisteredVendorStartDates),\n ...unregisteredVendors.flatMap(getUnregisteredVendorStartDates),\n ];\n}\n\nexport function getEventDatesWithStallholders(\n eventDateTime: DateTimeType[] | undefined,\n stallholderStartDates: string[],\n): DateTimeType[] {\n if (!eventDateTime?.length) {\n return [];\n }\n\n const startDates = new Set(stallholderStartDates);\n\n return sortDatesChronologically(\n eventDateTime.filter((date) => startDates.has(date.startDate)),\n );\n}\n\nexport function getStallholderCategoryNames(\n registeredVendors: VendorType[],\n unregisteredVendors: UnregisteredVendorType[] = [],\n): string[] {\n const names = [\n ...registeredVendors.flatMap(getRegisteredVendorCategoryNames),\n ...unregisteredVendors.flatMap(getUnregisteredVendorCategoryNames),\n ];\n\n return Array.from(new Set(names));\n}\n\nexport function getStallholderCategoryOptions(\n registeredVendors: VendorType[],\n unregisteredVendors: UnregisteredVendorType[] = [],\n): StallholderFilterOption[] {\n return getStallholderCategoryNames(\n registeredVendors,\n unregisteredVendors,\n ).map((name) => ({\n label: name,\n value: name,\n }));\n}\n\nexport function getEventStallholderEmptyMessage(\n hasAnyStallholdersForEvent: boolean,\n selectedDate: string | null,\n): string {\n return hasAnyStallholdersForEvent && selectedDate\n ? \"No stallholders found for this event date.\"\n : \"No stallholders found for this event.\";\n}\n","import type { StallholderFilterOption } from \"../eventStallholders/eventStallholderFilters\";\nimport type {\n EventListItemType,\n RelationDateTimeType,\n} from \"../generated/graphql\";\nimport { sortDatesChronologically } from \"../utils/date\";\n\ntype RelationType = NonNullable<\n NonNullable<EventListItemType[\"relations\"]>[number]\n>;\ntype RelationDateType = NonNullable<\n NonNullable<RelationType[\"relationDates\"]>[number]\n>;\n\nexport function relationHasSelectedDate(\n relation: RelationType,\n selectedDate: string,\n): boolean {\n return (\n relation.relationDates?.some(\n (date) => date != null && date.dateTime.startDate === selectedDate,\n ) ?? false\n );\n}\n\nexport function eventHasSelectedDate(\n event: EventListItemType,\n selectedDate: string,\n): boolean {\n return (\n event.relations?.some(\n (relation) =>\n relation != null && relationHasSelectedDate(relation, selectedDate),\n ) ?? false\n );\n}\n\nexport function filterVendorEventsBySelectedDate(\n events: EventListItemType[] | null | undefined,\n selectedDate: string | null,\n): EventListItemType[] {\n if (!events) {\n return [];\n }\n\n if (!selectedDate) {\n return events;\n }\n\n return events.filter((event) => eventHasSelectedDate(event, selectedDate));\n}\n\nexport function collectVendorEventRelationDateTimes(\n events: EventListItemType[] | null | undefined,\n): RelationDateTimeType[] {\n if (!events?.length) {\n return [];\n }\n\n return events.flatMap((event) =>\n (event.relations ?? []).flatMap((relation) => {\n if (relation == null) {\n return [];\n }\n return (relation.relationDates ?? []).flatMap((relationDate) =>\n relationDate?.dateTime != null ? [relationDate.dateTime] : [],\n );\n }),\n );\n}\n\nexport function getVendorEventRelationStartDates(\n events: EventListItemType[] | null | undefined,\n): string[] {\n const sortedDates = sortDatesChronologically(\n collectVendorEventRelationDateTimes(events),\n );\n const uniqueStartDates: string[] = [];\n\n for (const dateTime of sortedDates) {\n if (!uniqueStartDates.includes(dateTime.startDate)) {\n uniqueStartDates.push(dateTime.startDate);\n }\n }\n\n return uniqueStartDates;\n}\n\nexport function getVendorEventRelationDateOptions(\n events: EventListItemType[] | null | undefined,\n): StallholderFilterOption[] {\n return getVendorEventRelationStartDates(events).map((startDate) => ({\n label: startDate,\n value: startDate,\n }));\n}\n\nexport function getVendorEventsEmptyMessage(): string {\n return \"No events found.\";\n}\n","import { AffiliateRewardWriteType } from \"src/types/affiliate\";\n\nimport {\n AffiliateParticipantTypeEnum,\n AffiliateRewardEnumType,\n} from \"../generated/graphql\";\n\nexport const AFFILIATE_PARTICIPANT_TYPE_LABELS = {\n [AffiliateParticipantTypeEnum.Individual]: \"Individual\",\n [AffiliateParticipantTypeEnum.SoleTrader]: \"Sole Trader\",\n [AffiliateParticipantTypeEnum.Company]: \"Company\",\n} as const satisfies Record<AffiliateParticipantTypeEnum, string>;\n\ntype AffiliateRewardConfig = {\n description: string;\n value: number;\n};\n\nexport const AFFILIATE_REWARDS = {\n [AffiliateRewardEnumType.NewEventRegistration]: {\n description: \"10 points for new event registration (one-time reward)\",\n value: 10,\n },\n [AffiliateRewardEnumType.NewVendorRegistration]: {\n description: \"5 points for new vendor registration (one-time reward)\",\n value: 5,\n },\n [AffiliateRewardEnumType.ActiveVendorProSubscription]: {\n description: \"3 points for active vendor pro subscription (monthly reward)\",\n value: 3,\n },\n [AffiliateRewardEnumType.ActiveVendorStandardSubscription]: {\n description:\n \"1 point for active vendor standard subscription (monthly reward)\",\n value: 1,\n },\n [AffiliateRewardEnumType.ActiveVendorBonusReward]: {\n description:\n \"5 bonus points for every 10th active vendor (one-time reward)\",\n value: 5,\n },\n [AffiliateRewardEnumType.ActiveEventWithVendorRegistrations]: {\n description:\n \"40 points for active event with vendor registrations (one-time reward)\",\n value: 40,\n },\n} satisfies Record<AffiliateRewardEnumType, AffiliateRewardConfig>;\n\n/**\n * Create an affiliate reward\n * @param rewardType - The type of reward\n * @param createdAt - The date the reward was received\n * @returns The affiliate reward\n * @example\n * const reward = createAffiliateReward(AffiliateRewardEnumType.NewEventRegistration, new Date());\n * console.log(reward);\n */\nexport function createAffiliateReward(\n rewardType: AffiliateRewardEnumType,\n createdAt: Date,\n): AffiliateRewardWriteType {\n const reward = AFFILIATE_REWARDS[rewardType];\n\n return {\n createdAt,\n redeemedAt: null,\n rewardDescription: reward.description,\n rewardType,\n rewardValue: reward.value,\n };\n}\n","/**\n * NZ IRD number validation (Inland Revenue modulus-11 check digit).\n *\n * Valid range: 10,000,000 – 200,000,000 (upper limit raised Feb 2026; length stays\n * 8–9 digits). See IRD file-upload / payday filing specifications.\n */\n\nconst PRIMARY_WEIGHTS = [3, 2, 7, 6, 5, 4, 3, 2] as const;\nconst SECONDARY_WEIGHTS = [7, 4, 3, 2, 5, 2, 7, 6] as const;\n\nconst IRD_MIN = 10_000_000;\n/** Raised from 150_000_000 as of IRD's Feb 2026 annual update. */\nconst IRD_MAX = 200_000_000;\n\nfunction calculateCheckDigit(\n baseDigits: string,\n weights: readonly number[],\n): number {\n const sum = [...baseDigits].reduce(\n (acc, digit, index) => acc + Number(digit) * weights[index],\n 0,\n );\n const remainder = sum % 11;\n return remainder === 0 ? 0 : 11 - remainder;\n}\n\n/** Digits only; strips spaces/hyphens and other non-digits. */\nexport function normalizeIrdNumber(value: string): string {\n return value.replace(/\\D/g, \"\");\n}\n\n/**\n * Formats an IRD number as groups of three digits separated by hyphens\n * (e.g. `490-918-50` / `049-091-850`), capping at 9 digits.\n */\nexport function formatIrdNumber(input: string): string {\n const digitsOnly = normalizeIrdNumber(input).slice(0, 9);\n\n const parts = [];\n if (digitsOnly.length > 0) parts.push(digitsOnly.slice(0, 3));\n if (digitsOnly.length > 3) parts.push(digitsOnly.slice(3, 6));\n if (digitsOnly.length > 6) parts.push(digitsOnly.slice(6, 9));\n\n return parts.join(\"-\");\n}\n\n/**\n * Returns true when `value` is a valid NZ IRD number (8–9 digits, in issued\n * range, and modulus-11 check digit matches).\n */\nexport function isValidIrdNumber(value: string): boolean {\n const digits = normalizeIrdNumber(value);\n\n if (!/^\\d{8,9}$/.test(digits)) {\n return false;\n }\n\n const ird = Number(digits);\n if (ird < IRD_MIN || ird > IRD_MAX) {\n return false;\n }\n\n const padded = digits.padStart(9, \"0\");\n const baseDigits = padded.slice(0, -1);\n const checkDigit = Number(padded.slice(-1));\n\n let calculated = calculateCheckDigit(baseDigits, PRIMARY_WEIGHTS);\n if (calculated === 10) {\n calculated = calculateCheckDigit(baseDigits, SECONDARY_WEIGHTS);\n if (calculated === 10) {\n return false;\n }\n }\n\n return calculated === checkDigit;\n}\n","import { isTransientNetworkError } from \"./isTransientNetworkError\";\n\nexport const DEFAULT_USER_FACING_ERROR =\n \"Something went wrong. Please try again.\";\n\nexport const NETWORK_USER_FACING_ERROR =\n \"Unable to connect. Please check your internet connection and try again.\";\n\n/** Backend/infra messages that must never be shown to end users. */\nconst INTERNAL_ERROR_PATTERNS = [\n /connection\\s*<monitor>/i,\n /\\bmongo/i,\n /\\b\\d{1,3}(?:\\.\\d{1,3}){3}(?::\\d+)?\\b/,\n /\\beconn(?:refused|reset|aborted)\\b/i,\n /\\betimedout\\b/i,\n /\\benotfound\\b/i,\n /\\bsocket hang up\\b/i,\n /\\binternal server error\\b/i,\n /received status code 5\\d\\d/i,\n /\\bat\\s+\\S+\\s+\\([^)]+:\\d+:\\d+\\)/,\n] as const;\n\nexport function isInternalErrorMessage(message: string): boolean {\n return INTERNAL_ERROR_PATTERNS.some((pattern) => pattern.test(message));\n}\n\n/**\n * Maps raw API/client errors to a safe message for UI surfaces.\n * Keeps intentional product copy (e.g. \"Vendor not found\"); hides infra details.\n */\nexport function toUserFacingErrorMessage(\n error: string | null | undefined,\n fallback = DEFAULT_USER_FACING_ERROR,\n): string {\n const message = (error ?? \"\").trim();\n if (!message) return fallback;\n\n if (isTransientNetworkError(message)) {\n return NETWORK_USER_FACING_ERROR;\n }\n\n if (isInternalErrorMessage(message)) {\n return fallback;\n }\n\n return message;\n}\n\n/** Extracts and sanitizes an unknown catch/Apollo error for toasts and alerts. */\nexport function getErrorMessage(\n error: unknown,\n fallback = DEFAULT_USER_FACING_ERROR,\n): string {\n let raw: string | undefined;\n if (error instanceof Error) {\n raw = error.message;\n } else if (typeof error === \"string\") {\n raw = error;\n }\n\n return toUserFacingErrorMessage(raw, fallback);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAAS,gBAAgB,MAAc;AACrC,MAAI,IAAI,SAAS;AAEjB,SAAO,SAAS,SAAS;AACvB,SAAK;AACL,QAAI,IAAI;AAER,QAAI,KAAK,KAAK,IAAK,MAAM,IAAK,IAAI,CAAC;AACnC,SAAK,IAAI,KAAK,KAAK,IAAK,MAAM,GAAI,IAAI,EAAE;AAExC,aAAS,IAAK,MAAM,QAAS,KAAK;AA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