{"version":3,"file":"commerce-component-register-carousel-product-register-js.8ad7177ff6c6a656f9c6.js?ssi=0","mappings":";yIASA,MAKAA,GAA6B,WAAAC,GAAgB,yBAL7C,CACA,SAAaC,EAAA,UAAAC,IAAA,WACb,SAAaD,EAAA,UAAAC,IAAA,WACb,SAAaC,MAAA,KAAAC,OAAA,KAAAC,EAAA,KAAAC,EAAA,IAAAC,GAAA,IAAAL,IAAA,kKC2BbM,GAAgC,EAAAC,EAAAC,GAXhC,UAAAC,eACAA,EAAA,GAAAC,WACAA,EAAA,GAAAC,SACAA,EAAA,MACAC,IAEA,MAAAC,EAAA,IAAAH,EAAAI,QAAAL,GAAyE,EAAAM,EAAAC,IAAmBP,GAAAQ,MAAA,EAAAN,GAAAD,EAC5F,OAAyBQ,EAAAC,cAAoBC,EAAAC,EAAe,IAAIT,EAAAF,WAAAG,GAChE,GAIAS,EAAA,EAA2BX,WAAA,IAAgB,MAC3C,MAAAY,EAAA,CACIR,EAAAS,GACJ,CACAC,KAAA,aACAC,aAAA,cACAC,KAAA,OACAC,UAAA,EACAC,aAAA,GACAC,WAAA,mDAAqEnB,gDACrEoB,UAAiBhB,EAAAiB,GACjBC,OAAclB,EAAAmB,GACdC,SAAAC,IACA,MAAA1B,EAAA0B,EAAAC,IAAA,cACAC,EAAAC,MAAAC,QAAA9B,GAAAA,EAAA+B,OACAC,GAAA,iBAAAA,GAAA,OAAAA,GACA,GACAC,EAAA,IACA,IAAAC,IACAN,EAAAG,OAAAC,GAAAA,GAAAG,WAAAC,IAAAJ,GAAA,CAAAA,EAAAG,UAAAH,KACAK,UACA9B,MAAA,EAAAN,GACAyB,EAAAY,IAAA,aAAAL,KAGA,CACAlB,KAAA,aACAC,aAAA,yBACAC,KAAA,UACAE,cAAA,EACAC,WAAA,oDAEA,CACAL,KAAA,gBACAC,aAAA,iBACAC,KAAA,UACAE,cAAA,EACAC,WAAA,oDAEA,CACAL,KAAA,OACAC,aAAA,gBACAC,KAAA,UACAE,cAAA,EACAC,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3C,IACA,MAAA4C,EAAA5C,EAAAC,IAAA,kBACA,uBAAA2C,IAAAA,EAAAF,sBC9BA,SAAAG,EAAAC,GACA,qEAA+CA,GAC/C,CACA,SAAAC,EAAAC,EAAA3D,EAAA4D,EAAA,WAEA,OAAAJ,EAAA,GAAgCG,KAAQ3D,MADxC4D,EAAAC,cAAAC,QAAA,cAEA,CACA,SAAAC,EAAAC,EAAAJ,EAAA,WACA,OAAAF,EAAA,aAAAM,EAAAJ,EACA,CACA,SAAAK,EAAAC,EAAAN,EAAA,WACA,OAAAF,EAAA,YAAAQ,EAAAN,EACA,CACA,SAAAO,EAAAC,EAAAR,EAAA,WACA,OAAAF,EAAA,YAAAU,EAAAR,EACA,CACA,SAAAS,EAAAC,EAAAV,EAAA,WACA,OAAAF,EAAA,QAAAY,EAAAV,EACA,+GCjBA,SAAAW,EAAAC,GACA,SAAAC,EAAAC,GACA,OAA2BC,EAAAjF,cAAmB8E,EAAA,IAAcE,EAAAE,YAAuBC,EAAA9C,GAAO+C,WAAcD,EAAA9C,GAAOgD,cAC/G,CAEA,OADAN,EAAAO,YAAA,0BAAkDR,EAAAQ,aAAAR,EAAAxE,MAAA,eAClDyE,CACA","sources":["webpack://@logos/commerceweb-frontend/javascript/node_modules/lucide-react/dist/esm/icons/gallery-horizontal-end.mjs","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-BZUXA6Y7.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-C3DWJ7CI.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-QJ7P73DS.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-XCZHOIM6.js"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n  [\"path\", { d: \"M2 7v10\", key: \"a2pl2d\" }],\n  [\"path\", { d: \"M6 5v14\", key: \"1kq3d7\" }],\n  [\"rect\", { width: \"12\", height: \"18\", x: \"10\", y: \"3\", rx: \"2\", key: \"13i7bc\" }]\n];\nconst GalleryHorizontalEnd = createLucideIcon(\"gallery-horizontal-end\", __iconNode);\n\nexport { __iconNode, GalleryHorizontalEnd as default };\n//# sourceMappingURL=gallery-horizontal-end.mjs.map\n","import {\n  bulkProductIdsInput,\n  parseBulkProductIds,\n  productIdSubFields,\n  productIdsListShowIf\n} from \"./chunk-C3DWJ7CI.js\";\nimport {\n  withBuilderPreviewMode\n} from \"./chunk-XCZHOIM6.js\";\nimport {\n  CarouselProduct\n} from \"./chunk-QTJBSIG5.js\";\nimport {\n  ImageAspectRatio\n} from \"./chunk-RYJSUFLS.js\";\nimport {\n  lucideIconUri\n} from \"./chunk-BEFWWR2C.js\";\nimport {\n  getStorybookDocsUrlForMolecule\n} from \"./chunk-QJ7P73DS.js\";\n\n// src/components/carousel-product/register.tsx\nimport { Builder } from \"@builder.io/react\";\nimport { GalleryHorizontalEnd } from \"lucide-react\";\n\n// src/components/carousel-product/builder-carousel-product.tsx\nimport React from \"react\";\nfunction BuilderCarouselProduct({\n  bulkProductIds = \"\",\n  productIds = [],\n  maxItems = 12,\n  ...rest\n}) {\n  const resolvedProductIds = productIds.length === 0 && bulkProductIds ? parseBulkProductIds(bulkProductIds).slice(0, maxItems) : productIds;\n  return /* @__PURE__ */ React.createElement(CarouselProduct, { ...rest, productIds: resolvedProductIds });\n}\n\n// src/components/carousel-product/register.tsx\nvar RegisteredCarouselProduct = withBuilderPreviewMode(BuilderCarouselProduct);\nvar registerComponent = ({ maxItems = 12 } = {}) => {\n  const inputs = [\n    bulkProductIdsInput,\n    {\n      name: \"productIds\",\n      friendlyName: \"Product IDs\",\n      type: \"list\",\n      required: true,\n      defaultValue: [],\n      helperText: `List of product IDs to display in carousel, max ${maxItems} products. Duplicates removed automatically.`,\n      subFields: productIdSubFields,\n      showIf: productIdsListShowIf,\n      onChange: (options) => {\n        const productIds = options.get(\"productIds\");\n        const items = Array.isArray(productIds) ? productIds.filter(\n          (item) => typeof item === \"object\" && item !== null\n        ) : [];\n        const unique = [\n          ...new Map(\n            items.filter((item) => item?.productId).map((item) => [item.productId, item])\n          ).values()\n        ].slice(0, maxItems);\n        options.set(\"productIds\", unique);\n      }\n    },\n    {\n      name: \"showArrows\",\n      friendlyName: \"Show Navigation Arrows\",\n      type: \"boolean\",\n      defaultValue: true,\n      helperText: \"Show or hide the previous/next navigation arrows\"\n    },\n    {\n      name: \"showScrollbar\",\n      friendlyName: \"Show Scrollbar\",\n      type: \"boolean\",\n      defaultValue: false,\n      helperText: \"Show or hide the bottom scrollbar for navigation\"\n    },\n    {\n      name: \"loop\",\n      friendlyName: \"Loop Carousel\",\n      type: \"boolean\",\n      defaultValue: false,\n      helperText: \"Enable infinite looping of the carousel\"\n    },\n    {\n      name: \"isMultiBuy\",\n      friendlyName: \"Multi-Buy Mode\",\n      type: \"boolean\",\n      defaultValue: false,\n      helperText: \"Show quantity stepper on all product cards\"\n    },\n    {\n      name: \"maxItems\",\n      type: \"number\",\n      defaultValue: maxItems,\n      hideFromUI: true\n    },\n    {\n      name: \"scale\",\n      friendlyName: \"Scale\",\n      type: \"enum\",\n      enum: [\"large\", \"small\"],\n      defaultValue: \"large\",\n      helperText: \"Size of the product cards in the carousel\"\n    },\n    {\n      name: \"aspectRatio\",\n      friendlyName: \"Image Aspect Ratio\",\n      type: \"select\",\n      enum: Object.keys(ImageAspectRatio),\n      defaultValue: \"Portrait\",\n      helperText: \"Aspect ratio for product images (e.g. Square, Portrait)\"\n    },\n    {\n      name: \"linkTarget\",\n      friendlyName: \"Link Target\",\n      type: \"enum\",\n      enum: [\"self\", \"blank\"],\n      defaultValue: \"self\",\n      helperText: \"Open product links in the same tab (self) or a new tab (blank)\"\n    }\n  ];\n  Builder.registerComponent(RegisteredCarouselProduct, {\n    name: \"CarouselProduct\",\n    friendlyName: \"Carousel Product\",\n    docsLink: getStorybookDocsUrlForMolecule(\"carousel-product\"),\n    image: lucideIconUri(GalleryHorizontalEnd),\n    inputs\n  });\n  Builder.registerComponent(RegisteredCarouselProduct, {\n    name: \"ProductCarousel\",\n    friendlyName: \"Product Carousel\",\n    docsLink: getStorybookDocsUrlForMolecule(\"carousel-product\"),\n    image: lucideIconUri(GalleryHorizontalEnd),\n    inputs,\n    hideFromInsertMenu: true\n  });\n};\n\nexport {\n  registerComponent\n};\n//# sourceMappingURL=chunk-BZUXA6Y7.js.map","// src/components/shared/bulk-product-ids.ts\nvar productIdSubFields = [\n  {\n    name: \"productId\",\n    friendlyName: \"Product ID\",\n    type: \"string\",\n    required: true,\n    defaultValue: \"\",\n    helperText: \"Product ID\"\n  }\n];\nfunction parseBulkProductIds(text) {\n  const seen = /* @__PURE__ */ new Set();\n  return text.split(/[^\\d]+/).filter(Boolean).filter((id) => {\n    if (seen.has(id)) return false;\n    seen.add(id);\n    return true;\n  }).map((id) => ({ productId: id }));\n}\nvar bulkProductIdsInput = {\n  name: \"bulkProductIds\",\n  friendlyName: \"Bulk Product IDs\",\n  type: \"string\",\n  defaultValue: \"\",\n  helperText: \"Paste product IDs separated by commas, spaces, or any non-numeric character. Duplicates are removed automatically.\",\n  showIf: (options) => {\n    const list = options.get(\"productIds\");\n    return !list || !list.some((item) => item?.productId?.trim());\n  }\n};\nvar productIdsListShowIf = (options) => {\n  const bulk = options.get(\"bulkProductIds\");\n  return typeof bulk !== \"string\" || !bulk.trim();\n};\n\nexport {\n  productIdSubFields,\n  parseBulkProductIds,\n  bulkProductIdsInput,\n  productIdsListShowIf\n};\n//# sourceMappingURL=chunk-C3DWJ7CI.js.map","// src/config/storybook.ts\nvar STORYBOOK_BASE_URL = \"https://storybook.commercecomponents.logos.com\";\nfunction getStorybookDocsUrl(storyId) {\n  return `${STORYBOOK_BASE_URL}/?path=/story/${storyId}`;\n}\nfunction getStorybookDocsUrlForTier(tier, name, story = \"default\") {\n  const storySlug = story.toLowerCase().replace(/\\s+/g, \"-\");\n  return getStorybookDocsUrl(`${tier}-${name}--${storySlug}`);\n}\nfunction getStorybookDocsUrlForComponent(component, story = \"default\") {\n  return getStorybookDocsUrlForTier(\"components\", component, story);\n}\nfunction getStorybookDocsUrlForOrganism(organism, story = \"default\") {\n  return getStorybookDocsUrlForTier(\"organisms\", organism, story);\n}\nfunction getStorybookDocsUrlForMolecule(molecule, story = \"default\") {\n  return getStorybookDocsUrlForTier(\"molecules\", molecule, story);\n}\nfunction getStorybookDocsUrlForAtom(atom, story = \"default\") {\n  return getStorybookDocsUrlForTier(\"atoms\", atom, story);\n}\n\nexport {\n  getStorybookDocsUrl,\n  getStorybookDocsUrlForComponent,\n  getStorybookDocsUrlForOrganism,\n  getStorybookDocsUrlForMolecule,\n  getStorybookDocsUrlForAtom\n};\n//# sourceMappingURL=chunk-QJ7P73DS.js.map","// src/utils/with-builder-preview-mode.tsx\nimport React from \"react\";\nimport { Builder } from \"@builder.io/react\";\nfunction withBuilderPreviewMode(Component) {\n  function Wrapped(props) {\n    return /* @__PURE__ */ React.createElement(Component, { ...props, previewMode: Builder.isEditing || Builder.isPreviewing });\n  }\n  Wrapped.displayName = `withBuilderPreviewMode(${Component.displayName ?? Component.name ?? \"Component\"})`;\n  return Wrapped;\n}\n\nexport {\n  withBuilderPreviewMode\n};\n//# sourceMappingURL=chunk-XCZHOIM6.js.map"],"names":["GalleryHorizontalEnd","A","d","key","width","height","x","y","rx","RegisteredCarouselProduct","_chunk_XCZHOIM6_js__WEBPACK_IMPORTED_MODULE_1__","v","bulkProductIds","productIds","maxItems","rest","resolvedProductIds","length","_chunk_C3DWJ7CI_js__WEBPACK_IMPORTED_MODULE_0__","z8","slice","react__WEBPACK_IMPORTED_MODULE_8__","createElement","_chunk_QTJBSIG5_js__WEBPACK_IMPORTED_MODULE_2__","k","registerComponent","inputs","Ee","name","friendlyName","type","required","defaultValue","helperText","subFields","sr","showIf","ue","onChange","options","get","items","Array","isArray","filter","item","unique","Map","productId","map","values","set","hideFromUI","enum","Object","keys","_chunk_RYJSUFLS_js__WEBPACK_IMPORTED_MODULE_3__","Jq","_builder_io_react__WEBPACK_IMPORTED_MODULE_6__","M$","docsLink","_chunk_QJ7P73DS_js__WEBPACK_IMPORTED_MODULE_5__","Im","image","_chunk_BEFWWR2C_js__WEBPACK_IMPORTED_MODULE_4__","c","lucide_react__WEBPACK_IMPORTED_MODULE_7__","hideFromInsertMenu","productIdSubFields","parseBulkProductIds","text","seen","Set","split","Boolean","id","has","add","bulkProductIdsInput","list","some","trim","productIdsListShowIf","bulk","getStorybookDocsUrl","storyId","getStorybookDocsUrlForTier","tier","story","toLowerCase","replace","getStorybookDocsUrlForComponent","component","getStorybookDocsUrlForOrganism","organism","getStorybookDocsUrlForMolecule","molecule","getStorybookDocsUrlForAtom","atom","withBuilderPreviewMode","Component","Wrapped","props","react__WEBPACK_IMPORTED_MODULE_0__","previewMode","_builder_io_react__WEBPACK_IMPORTED_MODULE_1__","isEditing","isPreviewing","displayName"],"sourceRoot":""}