@sanity/sfcc
1.0.291.0.30
~
Modified (2 files)
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@sanity/sfcc",
- "version": "1.0.29",
+ "version": "1.0.30",
"description": "Sanity plugin for Salesforce Commerce Cloud (SFCC) integration — synced product and category data with editorial enrichment.",
"keywords": [
"salesforce-commerce-cloud",
"sanity",
@@ -37,9 +37,9 @@
"@sanity/tsdown-config": "^0.26.0",
"@types/node": "^24.13.3",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
- "babel-plugin-react-compiler": "^1.0.0",
+ "oxc-transform-react": "^0.145.0",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"sanity": "^6.10.1",
"styled-components": "^6.5.3", Index: package/dist/index.js.map
===================================================================
--- package/dist/index.js.map
+++ package/dist/index.js.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"index.js","names":["WarningOutlineIcon","Card","Flex","Text","useFormValue","SfccOfflineBanner","$","_c","t0","Symbol","for","onlineFlagRaw","t1","onlineRaw","onlineFlag","undefined","online","isOnline","t2","API_VERSION","TrashIcon","Stack","Text","useToast","useState","DocumentActionComponent","useClient","useRouter","API_VERSION","CONFIG","Record","message","backPath","product","category","createSfccDeleteAction","originalDeleteAction","SfccDeleteAction","props","originalResult","dialogOpen","setDialogOpen","router","toast","client","apiVersion","type","draft","published","config","tone","icon","label","onHandle","dialog","onCancel","onConfirm","transaction","_id","delete","store","variants","Array","isArray","v","_ref","commit","navigateUrl","path","err","Error","push","status","title","CloseIcon","ImageIcon","Ref","useState","Props","isDeleted","imageUrl","title","ref","HTMLDivElement","SfccDocumentStatus","props","$","_c","imageVisible","setImageVisible","t0","Symbol","for","handleImageError","t1","alignItems","borderRadius","display","height","justifyContent","overflow","width","t2","replace","left","objectFit","position","top","t3","background","color","t4","defineField","SfccDocumentStatus","sfccCategoryStoreField","readOnly","name","title","type","group","fields","to","sfccCategoryPreview","select","imageUrl","isActive","displayName","categoryId","parentDisplayName","parentName","parentId","prepare","value","displayTitle","isRoot","parentLabel","subtitle","media","defineField","SfccDocumentStatus","sfccProductStoreField","readOnly","name","title","type","group","fields","of","to","weak","VariationAttrKey","VARIATION_ATTRIBUTE_MAP","Record","label","storeKey","color","size","memorySize","tvSize","sfccProductPreview","select","id","productType","variationAttributes","productImage","isActive","prepare","selection","value","attrValues","meta","push","length","attr","mapped","Object","entries","subtitle","join","media","defineStructure","categoryStructure","S","listItem","title","schemaType","child","documentTypeList","API_VERSION","defineStructure","productStructure","S","context","client","getClient","apiVersion","listItem","title","schemaType","child","documentList","filter","productId","product","fetch","id","store","productType","variantRefs","variants","map","v","_ref","list","items","documentListItem","divider","ref","document","documentId","ConfigContext","StructureBuilder","defineStructure","factory","S","context","StructureType","DecorationMember","definePlugin","ObjectMember","SfccOfflineBanner","createSfccDeleteAction","sfccCategoryPreview","sfccCategoryStoreField","sfccProductPreview","sfccProductStoreField","categoryStructure","productStructure","SfccDocumentStatus","sfccRenderMembers","members","key","kind","component","SFCC_TYPES","Set","sfccPlugin","name","document","actions","prev","context","has","schemaType","filter","action","map","newDocumentOptions","template","templateId"],"sources":["../src/components/SfccOfflineBanner.tsx","../src/constants.ts","../src/documentActions/sfccDelete.tsx","../src/components/SfccDocumentStatus.tsx","../src/schemas/category.tsx","../src/schemas/product.tsx","../src/structure/categoryStructure.ts","../src/structure/productStructure.ts","../src/structure/index.ts","../src/index.ts"],"sourcesContent":["import {WarningOutlineIcon} from '@sanity/icons/WarningOutline'\nimport {Card, Flex, Text} from '@sanity/ui'\nimport {useFormValue} from 'sanity'\n\n/**\n * Decorative banner injected via `renderMembers` that warns editors when a\n * product or category is offline in SFCC.\n *\n * Reads `store.onlineFlag` (products) and `store.online` (categories) via\n * `useFormValue` so it works without props.\n */\nexport function SfccOfflineBanner() {\n const onlineFlagRaw = useFormValue(['store', 'onlineFlag'])\n const onlineRaw = useFormValue(['store', 'online'])\n\n const onlineFlag = typeof onlineFlagRaw === 'boolean' ? onlineFlagRaw : undefined\n const online = typeof onlineRaw === 'boolean' ? onlineRaw : undefined\n const isOnline = onlineFlag ?? online\n\n if (isOnline !== false) return null\n\n return (\n <Card padding={4} radius={2} shadow={1} tone=\"caution\">\n <Flex align=\"center\" gap={3}>\n <Text size={2}>\n <WarningOutlineIcon />\n </Text>\n <Text size={1} weight=\"medium\">\n This document is currently offline in SFCC.\n </Text>\n </Flex>\n </Card>\n )\n}\n","export const API_VERSION = '2026-02-24'\n","import {TrashIcon} from '@sanity/icons/Trash'\nimport {Stack, Text} from '@sanity/ui'\nimport {useToast} from '@sanity/ui/toast'\nimport {useState} from 'react'\nimport {type DocumentActionComponent, useClient} from 'sanity'\nimport {useRouter} from 'sanity/router'\n\nimport {API_VERSION} from '../constants'\n\nconst CONFIG: Record<string, {message: string; backPath: string}> = {\n product: {\n message: 'Delete the current product and all associated variants in your dataset?',\n backPath: '/structure/products',\n },\n category: {\n message: 'Delete the current category from your dataset?',\n backPath: '/structure/categories',\n },\n}\n\n/**\n * Wraps the built-in delete action for SFCC-synced documents.\n *\n * - **Products**: deletes the product *and* all associated variants\n * (resolved from `store.variants[]._ref`) in a single transaction,\n * then navigates back to the products list.\n * - **Categories**: deletes the category with a confirmation warning,\n * then navigates back to the categories list.\n */\nexport function createSfccDeleteAction(\n originalDeleteAction: DocumentActionComponent,\n): DocumentActionComponent {\n return function SfccDeleteAction(props) {\n const originalResult = originalDeleteAction(props)\n\n const [dialogOpen, setDialogOpen] = useState(false)\n const router = useRouter()\n const toast = useToast()\n const client = useClient({apiVersion: API_VERSION})\n\n const {type, draft, published} = props\n const config = CONFIG[type]\n\n if (!config) return originalResult\n\n return {\n ...originalResult,\n tone: 'critical',\n icon: TrashIcon,\n label: 'Delete',\n onHandle: () => setDialogOpen(true),\n dialog: dialogOpen && {\n type: 'confirm',\n message: (\n <Stack gap={4}>\n <Text size={1}>{config.message}</Text>\n <Text size={1} weight=\"medium\">\n No data on SFCC will be deleted.\n </Text>\n </Stack>\n ),\n onCancel: () => setDialogOpen(false),\n onConfirm: async () => {\n const transaction = client.transaction()\n if (published?._id) transaction.delete(published._id)\n if (draft?._id) transaction.delete(draft._id)\n\n if (type === 'product' && published) {\n const store = published['store']\n const variants =\n store != null &&\n typeof store === 'object' &&\n 'variants' in store &&\n Array.isArray(store.variants)\n ? store.variants\n : []\n for (const v of variants) {\n if (v != null && typeof v === 'object' && '_ref' in v && typeof v._ref === 'string') {\n transaction.delete(v._ref)\n transaction.delete(`drafts.${v._ref}`)\n }\n }\n }\n\n try {\n await transaction.commit()\n router.navigateUrl({path: config.backPath})\n } catch (err) {\n const message = err instanceof Error ? err.message : 'Unknown Error'\n toast.push({status: 'error', title: message})\n } finally {\n setDialogOpen(false)\n }\n },\n },\n }\n }\n}\n","import {CloseIcon} from '@sanity/icons/Close'\nimport {ImageIcon} from '@sanity/icons/Image'\nimport {type Ref, useState} from 'react'\n\ntype Props = {\n isDeleted: boolean\n imageUrl: string\n title: string\n ref?: Ref<HTMLDivElement>\n}\n\nconst SfccDocumentStatus = (props: Props) => {\n const {isDeleted, imageUrl, title, ref} = props\n\n const [imageVisible, setImageVisible] = useState(true)\n\n const handleImageError = () => setImageVisible(false)\n\n return (\n <div\n ref={ref}\n style={{\n alignItems: 'center',\n borderRadius: 'inherit',\n display: 'flex',\n height: '100%',\n justifyContent: 'center',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n {imageVisible && imageUrl ? (\n <img\n onError={handleImageError}\n src={imageUrl.replace('/large/', '/small/')}\n style={{\n height: '100%',\n left: 0,\n objectFit: 'contain',\n position: 'absolute',\n top: 0,\n width: '100%',\n }}\n alt={`${title} preview`}\n />\n ) : (\n <ImageIcon style={{position: 'absolute'}} />\n )}\n\n {isDeleted && (\n <CloseIcon\n style={{\n background: 'rgba(255, 0, 0, 0.7)',\n color: 'rgba(255, 255, 255, 0.85)',\n height: '100%',\n position: 'relative',\n width: '100%',\n }}\n />\n )}\n </div>\n )\n}\n\nexport {SfccDocumentStatus}\n","import {defineField} from 'sanity'\n\nimport {SfccDocumentStatus} from '../components/SfccDocumentStatus'\n\n/**\n * SFCC category store field — contains all read-only data synced from\n * Salesforce Commerce Cloud. Add this to a `category` document type's\n * `fields` array alongside your own custom fields.\n *\n * The field is placed in the `sfcc` group; make sure the document type\n * declares that group.\n */\nexport const sfccCategoryStoreField = defineField({\n readOnly: true,\n name: 'store',\n title: 'SFCC Data',\n type: 'object',\n group: 'sfcc',\n fields: [\n defineField({name: 'categoryId', title: 'Category ID', type: 'string', readOnly: true}),\n defineField({\n name: 'thumbnailImage',\n title: 'Thumbnail Image',\n type: 'string',\n readOnly: true,\n }),\n defineField({name: 'online', title: 'Online', type: 'boolean', readOnly: true}),\n defineField({name: 'onlineFrom', title: 'Online From', type: 'date', readOnly: true}),\n defineField({name: 'onlineTo', title: 'Online To', type: 'date', readOnly: true}),\n defineField({name: 'creationDate', title: 'Creation Date', type: 'date', readOnly: true}),\n defineField({name: 'isDeleted', title: 'Is Deleted', type: 'boolean', readOnly: true}),\n defineField({\n name: 'parentCategory',\n type: 'reference',\n to: [{type: 'category'}],\n readOnly: true,\n }),\n defineField({\n name: 'displayName',\n title: 'Display Name',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'description',\n title: 'Description',\n type: 'internationalizedArrayText',\n readOnly: true,\n }),\n ],\n})\n\n/**\n * Default preview configuration for the `category` document type.\n * Shows Category Name with parent category as subtitle.\n */\nexport const sfccCategoryPreview = {\n select: {\n imageUrl: 'store.thumbnailImage',\n isActive: 'store.online',\n displayName: 'store.displayName',\n title: 'title',\n name: 'name',\n categoryId: 'store.categoryId',\n parentDisplayName: 'store.parentCategory.store.displayName',\n parentName: 'store.parentCategory.name',\n parentId: 'store.parentCategory.store.categoryId',\n },\n prepare({\n imageUrl,\n displayName,\n title,\n name,\n categoryId,\n parentDisplayName,\n parentName,\n parentId,\n isActive,\n }: {\n imageUrl?: string\n displayName?: {value: string}[]\n title?: string\n name?: string\n categoryId?: string\n parentDisplayName?: {value: string}[]\n parentName?: string\n parentId?: string\n isActive?: boolean\n }) {\n const displayTitle =\n title || name || displayName?.[0]?.value || categoryId || 'Untitled Category'\n\n const isRoot = parentId === 'root'\n const parentLabel = !isRoot && (parentName || parentDisplayName?.[0]?.value || parentId)\n\n return {\n title: displayTitle,\n subtitle: parentLabel ? `Parent: ${parentLabel}` : '',\n media: (\n <SfccDocumentStatus isDeleted={!isActive} imageUrl={imageUrl ?? ''} title={displayTitle} />\n ),\n }\n },\n}\n","import {defineField} from 'sanity'\n\nimport {SfccDocumentStatus} from '../components/SfccDocumentStatus'\n\n/**\n * SFCC product store field — contains all read-only data synced from\n * Salesforce Commerce Cloud. Add this to a `product` document type's\n * `fields` array alongside your own custom fields.\n *\n * The field is placed in the `sfcc` group; make sure the document type\n * declares that group.\n */\nexport const sfccProductStoreField = defineField({\n readOnly: true,\n name: 'store',\n title: 'SFCC Data',\n type: 'object',\n group: 'sfcc',\n fields: [\n defineField({name: 'productId', title: 'Product ID', type: 'string', readOnly: true}),\n defineField({name: 'brand', title: 'Brand', type: 'string', readOnly: true}),\n defineField({name: 'color', title: 'Color', type: 'string', readOnly: true}),\n defineField({name: 'size', title: 'Size', type: 'string', readOnly: true}),\n defineField({name: 'width', title: 'Width', type: 'string', readOnly: true}),\n defineField({name: 'productType', title: 'Product Type', type: 'string', readOnly: true}),\n defineField({name: 'styleNumber', title: 'Style Number', type: 'string', readOnly: true}),\n defineField({name: 'searchable', title: 'Searchable', type: 'boolean', readOnly: true}),\n defineField({name: 'isSale', title: 'On Sale?', type: 'boolean', readOnly: true}),\n defineField({name: 'isNew', title: 'New Arrival?', type: 'boolean', readOnly: true}),\n defineField({\n name: 'manufacturerName',\n title: 'Manufacturer',\n type: 'string',\n readOnly: true,\n }),\n defineField({\n name: 'manufacturerSKU',\n title: 'Manufacturer Product ID',\n type: 'string',\n readOnly: true,\n }),\n defineField({\n name: 'creationDate',\n title: 'Creation Date',\n type: 'datetime',\n readOnly: true,\n }),\n defineField({\n name: 'lastModified',\n title: 'Last Modified',\n type: 'datetime',\n readOnly: true,\n }),\n defineField({name: 'onlineFlag', title: 'Online', type: 'boolean', readOnly: true}),\n defineField({name: 'onlineFrom', title: 'Online From', type: 'datetime', readOnly: true}),\n defineField({name: 'onlineTo', title: 'Online To', type: 'datetime', readOnly: true}),\n defineField({name: 'length', title: 'Length', type: 'string', readOnly: true}),\n defineField({name: 'memorySize', title: 'Memory Size', type: 'string', readOnly: true}),\n defineField({name: 'tvSize', title: 'TV Size', type: 'string', readOnly: true}),\n defineField({\n name: 'tvType',\n title: 'TV Type',\n type: 'array',\n of: [{type: 'string'}],\n readOnly: true,\n }),\n defineField({\n name: 'productImage',\n title: 'Product Image',\n type: 'string',\n readOnly: true,\n }),\n defineField({\n name: 'refinementColor',\n title: 'Refinement Color',\n type: 'string',\n readOnly: true,\n }),\n defineField({\n name: 'variants',\n title: 'Variants',\n type: 'array',\n of: [{type: 'reference', to: [{type: 'product'}], weak: true}],\n readOnly: true,\n }),\n defineField({\n name: 'variationAttributes',\n title: 'Variation Attributes',\n type: 'array',\n of: [{type: 'string'}],\n readOnly: true,\n }),\n defineField({name: 'isDeleted', title: 'Is Deleted', type: 'boolean'}),\n defineField({\n name: 'name',\n title: 'Name',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'longDescription',\n title: 'Long Description',\n type: 'internationalizedArrayText',\n readOnly: true,\n }),\n defineField({\n name: 'shortDescription',\n title: 'Short Description',\n type: 'internationalizedArrayText',\n readOnly: true,\n }),\n defineField({\n name: 'pageTitle',\n title: 'Page Title',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'pageDescription',\n title: 'Page Description',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'pageKeywords',\n title: 'Page Keywords',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'pageURL',\n title: 'Page URL',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n ],\n})\n\ntype VariationAttrKey = 'color' | 'size' | 'memorySize' | 'tvSize'\n\n/**\n * Maps SFCC variation attribute IDs to their store field keys and display labels.\n */\nconst VARIATION_ATTRIBUTE_MAP: Record<string, {label: string; storeKey: VariationAttrKey}> = {\n color: {label: 'Color', storeKey: 'color'},\n size: {label: 'Size', storeKey: 'size'},\n memorySize: {label: 'Memory Size', storeKey: 'memorySize'},\n tvSize: {label: 'TV Size', storeKey: 'tvSize'},\n}\n\n/**\n * Default preview configuration for the `product` document type.\n * Shows product type for Master/Simple, and the relevant variation\n * attributes (driven by `store.variationAttributes`) for all products.\n */\nexport const sfccProductPreview = {\n select: {\n name: 'store.name',\n id: 'store.productId',\n productType: 'store.productType',\n variationAttributes: 'store.variationAttributes',\n color: 'store.color',\n size: 'store.size',\n memorySize: 'store.memorySize',\n tvSize: 'store.tvSize',\n productImage: 'store.productImage',\n isActive: 'store.onlineFlag',\n },\n prepare(selection: {\n name?: {value: string}[]\n id?: string\n productType?: string\n variationAttributes?: string[]\n color?: string\n size?: string\n memorySize?: string\n tvSize?: string\n productImage?: string\n isActive?: boolean\n }) {\n const {name, id, productType, variationAttributes, productImage, isActive, ...attrValues} =\n selection\n\n const title = name?.[0]?.value || id || 'Untitled Product'\n const meta: string[] = []\n if (productType && productType !== 'Variant') meta.push(productType)\n\n if (variationAttributes?.length) {\n for (const attr of variationAttributes) {\n const mapped = VARIATION_ATTRIBUTE_MAP[attr]\n const value = mapped && attrValues[mapped.storeKey]\n if (mapped && value) meta.push(`${mapped.label}: ${value}`)\n }\n } else {\n for (const [, {label, storeKey}] of Object.entries(VARIATION_ATTRIBUTE_MAP)) {\n const value = attrValues[storeKey]\n if (value) meta.push(`${label}: ${value}`)\n }\n }\n\n return {\n title,\n subtitle: meta.join(' | '),\n media: (\n <SfccDocumentStatus isDeleted={!isActive} imageUrl={productImage ?? ''} title={title} />\n ),\n }\n },\n}\n","import {defineStructure} from './index'\n\nexport const categoryStructure = defineStructure((S) =>\n S.listItem().title('Categories').schemaType('category').child(S.documentTypeList('category')),\n)\n","import {API_VERSION} from '../constants'\nimport {defineStructure} from './index'\n\nexport const productStructure = defineStructure((S, context) => {\n const client = context.getClient({apiVersion: API_VERSION})\n\n return S.listItem()\n .title('Products')\n .schemaType('product')\n .child(\n S.documentList()\n .title('Products')\n .schemaType('product')\n .filter('_type == \"product\" && store.productType in [\"Master\", \"Simple\"]')\n .apiVersion(API_VERSION)\n .child(async (productId) => {\n const product = await client.fetch('*[_id == $id][0]{store}', {id: productId})\n\n if (product?.store?.productType === 'Master') {\n const variantRefs: string[] =\n product.store.variants?.map((v: {_ref: string}) => v._ref) ?? []\n\n return S.list()\n .title('Product')\n .items([\n S.documentListItem().id(productId).schemaType('product'),\n S.divider().title('Variants'),\n ...variantRefs.map((ref) => S.documentListItem().id(ref).schemaType('product')),\n ])\n }\n\n return S.document().documentId(productId).schemaType('product')\n }),\n )\n})\n","import type {ConfigContext} from 'sanity'\nimport type {StructureBuilder} from 'sanity/structure'\n\n/**\n * Helper for creating and typing composable structure parts.\n */\nexport function defineStructure<StructureType>(\n factory: (S: StructureBuilder, context: ConfigContext) => StructureType,\n) {\n return factory\n}\n\nexport * from './categoryStructure'\nexport * from './productStructure'\n","import '@sanity/ui/styles.css'\nimport {type DecorationMember, definePlugin, type ObjectMember} from 'sanity'\n\nimport {SfccOfflineBanner} from './components/SfccOfflineBanner'\nimport {createSfccDeleteAction} from './documentActions/sfccDelete'\n\n// Schema building blocks\nexport {sfccCategoryPreview, sfccCategoryStoreField} from './schemas/category'\nexport {sfccProductPreview, sfccProductStoreField} from './schemas/product'\n\n// Structure builders\nexport {categoryStructure, productStructure} from './structure'\n\n// Components\nexport {SfccDocumentStatus} from './components/SfccDocumentStatus'\nexport {SfccOfflineBanner} from './components/SfccOfflineBanner'\n\n/**\n * `renderMembers` callback that injects a caution banner at the top of the\n * document form when the SFCC document is offline or deleted.\n *\n * Usage: add `renderMembers: sfccRenderMembers` to your `defineType` call.\n */\nexport const sfccRenderMembers = (members: ObjectMember[]): (ObjectMember | DecorationMember)[] => [\n {\n key: 'sfcc-offline-banner',\n kind: 'decoration',\n component: SfccOfflineBanner,\n },\n ...members,\n]\n\nconst SFCC_TYPES = new Set(['product', 'category'])\n\n/**\n * SFCC plugin — enforces document-level guardrails for synced commerce data:\n *\n * - Replaces the built-in `delete` action with a custom one that also cleans\n * up associated product variants when deleting a product.\n * - Removes the `duplicate` action (documents are managed by SFCC sync).\n * - Hides product / category from the \"Create new document\" menu\n * (new documents are only created by the sync process).\n */\nexport const sfccPlugin = definePlugin(() => ({\n name: 'sfcc',\n document: {\n actions: (prev, context) => {\n if (SFCC_TYPES.has(context.schemaType)) {\n return prev\n .filter((action) => action.action !== 'duplicate')\n .map((action) => (action.action === 'delete' ? createSfccDeleteAction(action) : action))\n }\n return prev\n },\n newDocumentOptions: (prev) => {\n return prev.filter((template) => !SFCC_TYPES.has(template.templateId))\n },\n },\n}))\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,SAAOK,oBAAA;CAAA,IAAAC,IAAAC,EAAA,CAAA,GAAAC;CAAA,AAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,KAC8BF,KAAA,CAAC,SAAS,YAAY,GAACF,EAAA,KAAAE,MAAAA,KAAAF,EAAA;CAA1D,IAAAK,gBAAsBP,aAAaI,EAAuB,GAACI;CAAA,AAAAN,EAAA,OAAAG,OAAAC,IAAA,2BAAA,KAC5BE,KAAA,CAAC,SAAS,QAAQ,GAACN,EAAA,KAAAM,MAAAA,KAAAN,EAAA;CAAlD,IAAAO,YAAkBT,aAAaQ,EAAmB;CAMlD,MAJmB,OAAOD,iBAAkB,YAAzBA,gBAAAI,KAAAA,OACJ,OAAOF,aAAc,YAArBA,YAAAE,KAAAA,QAGE,IAAK,OAAS;CAAI,IAAAG;CAY1B,OAZ0BZ,EAAA,OAAAG,OAAAC,IAAA,2BAAA,KAGjCQ,KAAA,oBAAC,MAAD;EAAe,SAAA;EAAW,QAAA;EAA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;AACJ,CAAC;;;;AC5BD,SAAgBwB,gBACdC,SACA;CACA,OAAOA;AACT;;;;;;;ACaA,MAAagB,qBAAqBC,YAAiE,CACjG;CACEC,KAAK;CACLC,MAAM;CACNC,WAAWb;AACb,GACA,GAAGU,OAAO,GAGNI,6BAAa,IAAIC,IAAI,CAAC,WAAW,UAAU,CAAC,GAWrCC,aAAalB,oBAAoB;CAC5CmB,MAAM;CACNC,UAAU;EACRC,UAAUC,MAAMC,YACVP,WAAWQ,IAAID,QAAQE,UAAU,IAC5BH,KACJI,QAAQC,WAAWA,OAAOA,WAAW,WAAW,CAAC,CACjDC,KAAKD,WAAYA,OAAOA,WAAW,WAAWxB,uBAAuBwB,MAAM,IAAIA,MAAO,IAEpFL;EAETO,qBAAqBP,SACZA,KAAKI,QAAQI,aAAa,CAACd,WAAWQ,IAAIM,SAASC,UAAU,CAAC;CAEzE;AACF,EAAE"}
\ No newline at end of file
+{"version":3,"file":"index.js","names":["['store', 'onlineFlag']","['store', 'online']","<Card padding={4} radius={2} shadow={1} tone=\"caution\">\n <Flex align=\"center\" gap={3}>\n <Text size={2}>\n <WarningOutlineIcon />\n </Text>\n <Text size={1} weight=\"medium\">\n This document is currently offline in SFCC.\n </Text>\n </Flex>\n </Card>","() => setImageVisible(false)","{\n alignItems: 'center',\n borderRadius: 'inherit',\n display: 'flex',\n height: '100%',\n justifyContent: 'center',\n overflow: 'hidden',\n width: '100%',\n }","imageVisible && imageUrl ? (\n <img\n onError={handleImageError}\n src={imageUrl.replace('/large/', '/small/')}\n style={{\n height: '100%',\n left: 0,\n objectFit: 'contain',\n position: 'absolute',\n top: 0,\n width: '100%',\n }}\n alt={`${title} preview`}\n />\n ) : (\n <ImageIcon style={{position: 'absolute'}} />\n )","isDeleted && (\n <CloseIcon\n style={{\n background: 'rgba(255, 0, 0, 0.7)',\n color: 'rgba(255, 255, 255, 0.85)',\n height: '100%',\n position: 'relative',\n width: '100%',\n }}\n />\n )","<div\n ref={ref}\n style={{\n alignItems: 'center',\n borderRadius: 'inherit',\n display: 'flex',\n height: '100%',\n justifyContent: 'center',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n {imageVisible && imageUrl ? (\n <img\n onError={handleImageError}\n src={imageUrl.replace('/large/', '/small/')}\n style={{\n height: '100%',\n left: 0,\n objectFit: 'contain',\n position: 'absolute',\n top: 0,\n width: '100%',\n }}\n alt={`${title} preview`}\n />\n ) : (\n <ImageIcon style={{position: 'absolute'}} />\n )}\n\n {isDeleted && (\n <CloseIcon\n style={{\n background: 'rgba(255, 0, 0, 0.7)',\n color: 'rgba(255, 255, 255, 0.85)',\n height: '100%',\n position: 'relative',\n width: '100%',\n }}\n />\n )}\n </div>"],"sources":["../src/components/SfccOfflineBanner.tsx","../src/constants.ts","../src/documentActions/sfccDelete.tsx","../src/components/SfccDocumentStatus.tsx","../src/schemas/category.tsx","../src/schemas/product.tsx","../src/structure/categoryStructure.ts","../src/structure/productStructure.ts","../src/structure/index.ts","../src/index.ts"],"sourcesContent":["import {WarningOutlineIcon} from '@sanity/icons/WarningOutline'\nimport {Card, Flex, Text} from '@sanity/ui'\nimport {useFormValue} from 'sanity'\n\n/**\n * Decorative banner injected via `renderMembers` that warns editors when a\n * product or category is offline in SFCC.\n *\n * Reads `store.onlineFlag` (products) and `store.online` (categories) via\n * `useFormValue` so it works without props.\n */\nexport function SfccOfflineBanner() {\n const onlineFlagRaw = useFormValue(['store', 'onlineFlag'])\n const onlineRaw = useFormValue(['store', 'online'])\n\n const onlineFlag = typeof onlineFlagRaw === 'boolean' ? onlineFlagRaw : undefined\n const online = typeof onlineRaw === 'boolean' ? onlineRaw : undefined\n const isOnline = onlineFlag ?? online\n\n if (isOnline !== false) return null\n\n return (\n <Card padding={4} radius={2} shadow={1} tone=\"caution\">\n <Flex align=\"center\" gap={3}>\n <Text size={2}>\n <WarningOutlineIcon />\n </Text>\n <Text size={1} weight=\"medium\">\n This document is currently offline in SFCC.\n </Text>\n </Flex>\n </Card>\n )\n}\n","export const API_VERSION = '2026-02-24'\n","import {TrashIcon} from '@sanity/icons/Trash'\nimport {Stack, Text} from '@sanity/ui'\nimport {useToast} from '@sanity/ui/toast'\nimport {useState} from 'react'\nimport {type DocumentActionComponent, useClient} from 'sanity'\nimport {useRouter} from 'sanity/router'\n\nimport {API_VERSION} from '../constants'\n\nconst CONFIG: Record<string, {message: string; backPath: string}> = {\n product: {\n message: 'Delete the current product and all associated variants in your dataset?',\n backPath: '/structure/products',\n },\n category: {\n message: 'Delete the current category from your dataset?',\n backPath: '/structure/categories',\n },\n}\n\n/**\n * Wraps the built-in delete action for SFCC-synced documents.\n *\n * - **Products**: deletes the product *and* all associated variants\n * (resolved from `store.variants[]._ref`) in a single transaction,\n * then navigates back to the products list.\n * - **Categories**: deletes the category with a confirmation warning,\n * then navigates back to the categories list.\n */\nexport function createSfccDeleteAction(\n originalDeleteAction: DocumentActionComponent,\n): DocumentActionComponent {\n return function SfccDeleteAction(props) {\n const originalResult = originalDeleteAction(props)\n\n const [dialogOpen, setDialogOpen] = useState(false)\n const router = useRouter()\n const toast = useToast()\n const client = useClient({apiVersion: API_VERSION})\n\n const {type, draft, published} = props\n const config = CONFIG[type]\n\n if (!config) return originalResult\n\n return {\n ...originalResult,\n tone: 'critical',\n icon: TrashIcon,\n label: 'Delete',\n onHandle: () => setDialogOpen(true),\n dialog: dialogOpen && {\n type: 'confirm',\n message: (\n <Stack gap={4}>\n <Text size={1}>{config.message}</Text>\n <Text size={1} weight=\"medium\">\n No data on SFCC will be deleted.\n </Text>\n </Stack>\n ),\n onCancel: () => setDialogOpen(false),\n onConfirm: async () => {\n const transaction = client.transaction()\n if (published?._id) transaction.delete(published._id)\n if (draft?._id) transaction.delete(draft._id)\n\n if (type === 'product' && published) {\n const store = published['store']\n const variants =\n store != null &&\n typeof store === 'object' &&\n 'variants' in store &&\n Array.isArray(store.variants)\n ? store.variants\n : []\n for (const v of variants) {\n if (v != null && typeof v === 'object' && '_ref' in v && typeof v._ref === 'string') {\n transaction.delete(v._ref)\n transaction.delete(`drafts.${v._ref}`)\n }\n }\n }\n\n try {\n await transaction.commit()\n router.navigateUrl({path: config.backPath})\n } catch (err) {\n const message = err instanceof Error ? err.message : 'Unknown Error'\n toast.push({status: 'error', title: message})\n } finally {\n setDialogOpen(false)\n }\n },\n },\n }\n }\n}\n","import {CloseIcon} from '@sanity/icons/Close'\nimport {ImageIcon} from '@sanity/icons/Image'\nimport {type Ref, useState} from 'react'\n\ntype Props = {\n isDeleted: boolean\n imageUrl: string\n title: string\n ref?: Ref<HTMLDivElement>\n}\n\nconst SfccDocumentStatus = (props: Props) => {\n const {isDeleted, imageUrl, title, ref} = props\n\n const [imageVisible, setImageVisible] = useState(true)\n\n const handleImageError = () => setImageVisible(false)\n\n return (\n <div\n ref={ref}\n style={{\n alignItems: 'center',\n borderRadius: 'inherit',\n display: 'flex',\n height: '100%',\n justifyContent: 'center',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n {imageVisible && imageUrl ? (\n <img\n onError={handleImageError}\n src={imageUrl.replace('/large/', '/small/')}\n style={{\n height: '100%',\n left: 0,\n objectFit: 'contain',\n position: 'absolute',\n top: 0,\n width: '100%',\n }}\n alt={`${title} preview`}\n />\n ) : (\n <ImageIcon style={{position: 'absolute'}} />\n )}\n\n {isDeleted && (\n <CloseIcon\n style={{\n background: 'rgba(255, 0, 0, 0.7)',\n color: 'rgba(255, 255, 255, 0.85)',\n height: '100%',\n position: 'relative',\n width: '100%',\n }}\n />\n )}\n </div>\n )\n}\n\nexport {SfccDocumentStatus}\n","import {defineField} from 'sanity'\n\nimport {SfccDocumentStatus} from '../components/SfccDocumentStatus'\n\n/**\n * SFCC category store field — contains all read-only data synced from\n * Salesforce Commerce Cloud. Add this to a `category` document type's\n * `fields` array alongside your own custom fields.\n *\n * The field is placed in the `sfcc` group; make sure the document type\n * declares that group.\n */\nexport const sfccCategoryStoreField = defineField({\n readOnly: true,\n name: 'store',\n title: 'SFCC Data',\n type: 'object',\n group: 'sfcc',\n fields: [\n defineField({name: 'categoryId', title: 'Category ID', type: 'string', readOnly: true}),\n defineField({\n name: 'thumbnailImage',\n title: 'Thumbnail Image',\n type: 'string',\n readOnly: true,\n }),\n defineField({name: 'online', title: 'Online', type: 'boolean', readOnly: true}),\n defineField({name: 'onlineFrom', title: 'Online From', type: 'date', readOnly: true}),\n defineField({name: 'onlineTo', title: 'Online To', type: 'date', readOnly: true}),\n defineField({name: 'creationDate', title: 'Creation Date', type: 'date', readOnly: true}),\n defineField({name: 'isDeleted', title: 'Is Deleted', type: 'boolean', readOnly: true}),\n defineField({\n name: 'parentCategory',\n type: 'reference',\n to: [{type: 'category'}],\n readOnly: true,\n }),\n defineField({\n name: 'displayName',\n title: 'Display Name',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'description',\n title: 'Description',\n type: 'internationalizedArrayText',\n readOnly: true,\n }),\n ],\n})\n\n/**\n * Default preview configuration for the `category` document type.\n * Shows Category Name with parent category as subtitle.\n */\nexport const sfccCategoryPreview = {\n select: {\n imageUrl: 'store.thumbnailImage',\n isActive: 'store.online',\n displayName: 'store.displayName',\n title: 'title',\n name: 'name',\n categoryId: 'store.categoryId',\n parentDisplayName: 'store.parentCategory.store.displayName',\n parentName: 'store.parentCategory.name',\n parentId: 'store.parentCategory.store.categoryId',\n },\n prepare({\n imageUrl,\n displayName,\n title,\n name,\n categoryId,\n parentDisplayName,\n parentName,\n parentId,\n isActive,\n }: {\n imageUrl?: string\n displayName?: {value: string}[]\n title?: string\n name?: string\n categoryId?: string\n parentDisplayName?: {value: string}[]\n parentName?: string\n parentId?: string\n isActive?: boolean\n }) {\n const displayTitle =\n title || name || displayName?.[0]?.value || categoryId || 'Untitled Category'\n\n const isRoot = parentId === 'root'\n const parentLabel = !isRoot && (parentName || parentDisplayName?.[0]?.value || parentId)\n\n return {\n title: displayTitle,\n subtitle: parentLabel ? `Parent: ${parentLabel}` : '',\n media: (\n <SfccDocumentStatus isDeleted={!isActive} imageUrl={imageUrl ?? ''} title={displayTitle} />\n ),\n }\n },\n}\n","import {defineField} from 'sanity'\n\nimport {SfccDocumentStatus} from '../components/SfccDocumentStatus'\n\n/**\n * SFCC product store field — contains all read-only data synced from\n * Salesforce Commerce Cloud. Add this to a `product` document type's\n * `fields` array alongside your own custom fields.\n *\n * The field is placed in the `sfcc` group; make sure the document type\n * declares that group.\n */\nexport const sfccProductStoreField = defineField({\n readOnly: true,\n name: 'store',\n title: 'SFCC Data',\n type: 'object',\n group: 'sfcc',\n fields: [\n defineField({name: 'productId', title: 'Product ID', type: 'string', readOnly: true}),\n defineField({name: 'brand', title: 'Brand', type: 'string', readOnly: true}),\n defineField({name: 'color', title: 'Color', type: 'string', readOnly: true}),\n defineField({name: 'size', title: 'Size', type: 'string', readOnly: true}),\n defineField({name: 'width', title: 'Width', type: 'string', readOnly: true}),\n defineField({name: 'productType', title: 'Product Type', type: 'string', readOnly: true}),\n defineField({name: 'styleNumber', title: 'Style Number', type: 'string', readOnly: true}),\n defineField({name: 'searchable', title: 'Searchable', type: 'boolean', readOnly: true}),\n defineField({name: 'isSale', title: 'On Sale?', type: 'boolean', readOnly: true}),\n defineField({name: 'isNew', title: 'New Arrival?', type: 'boolean', readOnly: true}),\n defineField({\n name: 'manufacturerName',\n title: 'Manufacturer',\n type: 'string',\n readOnly: true,\n }),\n defineField({\n name: 'manufacturerSKU',\n title: 'Manufacturer Product ID',\n type: 'string',\n readOnly: true,\n }),\n defineField({\n name: 'creationDate',\n title: 'Creation Date',\n type: 'datetime',\n readOnly: true,\n }),\n defineField({\n name: 'lastModified',\n title: 'Last Modified',\n type: 'datetime',\n readOnly: true,\n }),\n defineField({name: 'onlineFlag', title: 'Online', type: 'boolean', readOnly: true}),\n defineField({name: 'onlineFrom', title: 'Online From', type: 'datetime', readOnly: true}),\n defineField({name: 'onlineTo', title: 'Online To', type: 'datetime', readOnly: true}),\n defineField({name: 'length', title: 'Length', type: 'string', readOnly: true}),\n defineField({name: 'memorySize', title: 'Memory Size', type: 'string', readOnly: true}),\n defineField({name: 'tvSize', title: 'TV Size', type: 'string', readOnly: true}),\n defineField({\n name: 'tvType',\n title: 'TV Type',\n type: 'array',\n of: [{type: 'string'}],\n readOnly: true,\n }),\n defineField({\n name: 'productImage',\n title: 'Product Image',\n type: 'string',\n readOnly: true,\n }),\n defineField({\n name: 'refinementColor',\n title: 'Refinement Color',\n type: 'string',\n readOnly: true,\n }),\n defineField({\n name: 'variants',\n title: 'Variants',\n type: 'array',\n of: [{type: 'reference', to: [{type: 'product'}], weak: true}],\n readOnly: true,\n }),\n defineField({\n name: 'variationAttributes',\n title: 'Variation Attributes',\n type: 'array',\n of: [{type: 'string'}],\n readOnly: true,\n }),\n defineField({name: 'isDeleted', title: 'Is Deleted', type: 'boolean'}),\n defineField({\n name: 'name',\n title: 'Name',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'longDescription',\n title: 'Long Description',\n type: 'internationalizedArrayText',\n readOnly: true,\n }),\n defineField({\n name: 'shortDescription',\n title: 'Short Description',\n type: 'internationalizedArrayText',\n readOnly: true,\n }),\n defineField({\n name: 'pageTitle',\n title: 'Page Title',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'pageDescription',\n title: 'Page Description',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'pageKeywords',\n title: 'Page Keywords',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n defineField({\n name: 'pageURL',\n title: 'Page URL',\n type: 'internationalizedArrayString',\n readOnly: true,\n }),\n ],\n})\n\ntype VariationAttrKey = 'color' | 'size' | 'memorySize' | 'tvSize'\n\n/**\n * Maps SFCC variation attribute IDs to their store field keys and display labels.\n */\nconst VARIATION_ATTRIBUTE_MAP: Record<string, {label: string; storeKey: VariationAttrKey}> = {\n color: {label: 'Color', storeKey: 'color'},\n size: {label: 'Size', storeKey: 'size'},\n memorySize: {label: 'Memory Size', storeKey: 'memorySize'},\n tvSize: {label: 'TV Size', storeKey: 'tvSize'},\n}\n\n/**\n * Default preview configuration for the `product` document type.\n * Shows product type for Master/Simple, and the relevant variation\n * attributes (driven by `store.variationAttributes`) for all products.\n */\nexport const sfccProductPreview = {\n select: {\n name: 'store.name',\n id: 'store.productId',\n productType: 'store.productType',\n variationAttributes: 'store.variationAttributes',\n color: 'store.color',\n size: 'store.size',\n memorySize: 'store.memorySize',\n tvSize: 'store.tvSize',\n productImage: 'store.productImage',\n isActive: 'store.onlineFlag',\n },\n prepare(selection: {\n name?: {value: string}[]\n id?: string\n productType?: string\n variationAttributes?: string[]\n color?: string\n size?: string\n memorySize?: string\n tvSize?: string\n productImage?: string\n isActive?: boolean\n }) {\n const {name, id, productType, variationAttributes, productImage, isActive, ...attrValues} =\n selection\n\n const title = name?.[0]?.value || id || 'Untitled Product'\n const meta: string[] = []\n if (productType && productType !== 'Variant') meta.push(productType)\n\n if (variationAttributes?.length) {\n for (const attr of variationAttributes) {\n const mapped = VARIATION_ATTRIBUTE_MAP[attr]\n const value = mapped && attrValues[mapped.storeKey]\n if (mapped && value) meta.push(`${mapped.label}: ${value}`)\n }\n } else {\n for (const [, {label, storeKey}] of Object.entries(VARIATION_ATTRIBUTE_MAP)) {\n const value = attrValues[storeKey]\n if (value) meta.push(`${label}: ${value}`)\n }\n }\n\n return {\n title,\n subtitle: meta.join(' | '),\n media: (\n <SfccDocumentStatus isDeleted={!isActive} imageUrl={productImage ?? ''} title={title} />\n ),\n }\n },\n}\n","import {defineStructure} from './index'\n\nexport const categoryStructure = defineStructure((S) =>\n S.listItem().title('Categories').schemaType('category').child(S.documentTypeList('category')),\n)\n","import {API_VERSION} from '../constants'\nimport {defineStructure} from './index'\n\nexport const productStructure = defineStructure((S, context) => {\n const client = context.getClient({apiVersion: API_VERSION})\n\n return S.listItem()\n .title('Products')\n .schemaType('product')\n .child(\n S.documentList()\n .title('Products')\n .schemaType('product')\n .filter('_type == \"product\" && store.productType in [\"Master\", \"Simple\"]')\n .apiVersion(API_VERSION)\n .child(async (productId) => {\n const product = await client.fetch('*[_id == $id][0]{store}', {id: productId})\n\n if (product?.store?.productType === 'Master') {\n const variantRefs: string[] =\n product.store.variants?.map((v: {_ref: string}) => v._ref) ?? []\n\n return S.list()\n .title('Product')\n .items([\n S.documentListItem().id(productId).schemaType('product'),\n S.divider().title('Variants'),\n ...variantRefs.map((ref) => S.documentListItem().id(ref).schemaType('product')),\n ])\n }\n\n return S.document().documentId(productId).schemaType('product')\n }),\n )\n})\n","import type {ConfigContext} from 'sanity'\nimport type {StructureBuilder} from 'sanity/structure'\n\n/**\n * Helper for creating and typing composable structure parts.\n */\nexport function defineStructure<StructureType>(\n factory: (S: StructureBuilder, context: ConfigContext) => StructureType,\n) {\n return factory\n}\n\nexport * from './categoryStructure'\nexport * from './productStructure'\n","import '@sanity/ui/styles.css'\nimport {type DecorationMember, definePlugin, type ObjectMember} from 'sanity'\n\nimport {SfccOfflineBanner} from './components/SfccOfflineBanner'\nimport {createSfccDeleteAction} from './documentActions/sfccDelete'\n\n// Schema building blocks\nexport {sfccCategoryPreview, sfccCategoryStoreField} from './schemas/category'\nexport {sfccProductPreview, sfccProductStoreField} from './schemas/product'\n\n// Structure builders\nexport {categoryStructure, productStructure} from './structure'\n\n// Components\nexport {SfccDocumentStatus} from './components/SfccDocumentStatus'\nexport {SfccOfflineBanner} from './components/SfccOfflineBanner'\n\n/**\n * `renderMembers` callback that injects a caution banner at the top of the\n * document form when the SFCC document is offline or deleted.\n *\n * Usage: add `renderMembers: sfccRenderMembers` to your `defineType` call.\n */\nexport const sfccRenderMembers = (members: ObjectMember[]): (ObjectMember | DecorationMember)[] => [\n {\n key: 'sfcc-offline-banner',\n kind: 'decoration',\n component: SfccOfflineBanner,\n },\n ...members,\n]\n\nconst SFCC_TYPES = new Set(['product', 'category'])\n\n/**\n * SFCC plugin — enforces document-level guardrails for synced commerce data:\n *\n * - Replaces the built-in `delete` action with a custom one that also cleans\n * up associated product variants when deleting a product.\n * - Removes the `duplicate` action (documents are managed by SFCC sync).\n * - Hides product / category from the \"Create new document\" menu\n * (new documents are only created by the sync process).\n */\nexport const sfccPlugin = definePlugin(() => ({\n name: 'sfcc',\n document: {\n actions: (prev, context) => {\n if (SFCC_TYPES.has(context.schemaType)) {\n return prev\n .filter((action) => action.action !== 'duplicate')\n .map((action) => (action.action === 'delete' ? createSfccDeleteAction(action) : action))\n }\n return prev\n },\n newDocumentOptions: (prev) => {\n return prev.filter((template) => !SFCC_TYPES.has(template.templateId))\n },\n },\n}))\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,SAAgB,oBAAoB;eACCA;qDAAC,KAAA,CAAA,SAAS,YAAY;CAAzD,IAAM,gBAAgB,aAAaA,EAAuB,GAC3BC;qDAAC,KAAA,CAAA,SAAS,QAAQ;CAAjD,IAAM,YAAY,aAAaA,EAAmB;CAMlD,MAJmB,OAAO,iBAAkB,YAAY,gBAAgB,KAAA,OACzD,OAAO,aAAc,YAAY,YAAY,KAAA,QAG3C,IAAO,OAAO;CAG7BC,IAAAA;CADF,2DACG,KAAA,oBAAA,MAAD;EAAM,SAAS;EAAG,QAAQ;EAAG,QAAQ;EAAG,MAAK;EAC3C,UAAA,qBAAC,MAAD;GAAM,OAAM;GAAS,KAAK;GAA1B,UAAA,CACE,oBAAC,MAAD;IAAM,MAAM;IACV,UAAA,oBAAC,oBAAD,CAAqB,CAAA;GACjB,CAAA,GACN,oBAAC,MAAD;IAAM,MAAM;IAAG,QAAO;IACpB,UAAA;GACI,CAAA,CACF;;CACF,CAAA,2BATNA;AAWJ;ACjCA,MAAa,cAAc,cCSrB,SAA8D;CAClE,SAAS;EACP,SAAS;EACT,UAAU;CACZ;CACA,UAAU;EACR,SAAS;EACT,UAAU;CACZ;AACF;;;;;;;;;;AAWA,SAAgB,uBACd,sBACyB;CACzB,OAAO,SAAS,iBAAiB,OAAO;EACtC,IAAM,iBAAiB,qBAAqB,KAAK,GAE3C,CAAC,YAAY,iBAAiB,SAAS,EAAK,GAC5C,SAAS,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