admesh-ui-sdk 0.12.3 → 0.13.0
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/README.md +105 -1
- package/dist/components/AdMeshEcommerceCards.d.ts +2 -23
- package/dist/components/AdMeshEcommerceCards.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +420 -441
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.ts +65 -89
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/themeUtils.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1533,7 +1533,7 @@ The AdMesh UI SDK provides a complete solution for displaying product recommenda
|
|
|
1533
1533
|
|
|
1534
1534
|
### ✅ What You Get
|
|
1535
1535
|
- **10+ Ad Unit Types** - From simple cards to complex conversational interfaces
|
|
1536
|
-
- **Unified JSON
|
|
1536
|
+
- **Unified JSON Schema** - Same recommendation structure works across all components and sources (Walmart, AdMesh, etc.)
|
|
1537
1537
|
- **Built-in Tracking** - Automatic analytics for views, clicks, and conversions
|
|
1538
1538
|
- **Full Responsive Design** - Mobile-first with accessibility compliance
|
|
1539
1539
|
- **TypeScript Support** - Complete type safety and IntelliSense
|
|
@@ -1546,6 +1546,110 @@ The AdMesh UI SDK provides a complete solution for displaying product recommenda
|
|
|
1546
1546
|
2. **Import**: `import { AdMeshProductCard } from 'admesh-ui-sdk';`
|
|
1547
1547
|
3. **Use**: `<AdMeshProductCard recommendations={recommendations} />`
|
|
1548
1548
|
|
|
1549
|
+
📋 **New in v0.13.0**: [Unified Schema Guide](./UNIFIED_SCHEMA_GUIDE.md) - Learn about the new unified JSON schema that works across all recommendation sources.
|
|
1550
|
+
|
|
1551
|
+
## 📋 Unified JSON Schema
|
|
1552
|
+
|
|
1553
|
+
The AdMesh UI SDK uses a unified JSON schema that works across all recommendation sources (Walmart, AdMesh, Amazon, etc.). This ensures consistent data structure regardless of the source:
|
|
1554
|
+
|
|
1555
|
+
```typescript
|
|
1556
|
+
interface AdMeshRecommendation {
|
|
1557
|
+
// Required core fields
|
|
1558
|
+
ad_id: string;
|
|
1559
|
+
admesh_link: string;
|
|
1560
|
+
audience_segment: string;
|
|
1561
|
+
availability: string;
|
|
1562
|
+
brand: string;
|
|
1563
|
+
brand_trust_score: number;
|
|
1564
|
+
categories: string[];
|
|
1565
|
+
description: string;
|
|
1566
|
+
discount_percentage: number;
|
|
1567
|
+
external_id: string;
|
|
1568
|
+
feature_sections: any[];
|
|
1569
|
+
features: string[];
|
|
1570
|
+
image_url: string;
|
|
1571
|
+
integrations: any[];
|
|
1572
|
+
intent_match_score: number; // 0-1 normalized score
|
|
1573
|
+
is_fallback: boolean;
|
|
1574
|
+
keywords: string[];
|
|
1575
|
+
offer_trust_score: number;
|
|
1576
|
+
original_price: number;
|
|
1577
|
+
price: number;
|
|
1578
|
+
pricing: string; // Formatted price string (e.g., "$99.48")
|
|
1579
|
+
product_id: string;
|
|
1580
|
+
rating: number;
|
|
1581
|
+
reason: string; // Match reason/explanation
|
|
1582
|
+
recommendation_description: string; // Marketing-optimized description
|
|
1583
|
+
recommendation_title: string; // Marketing-optimized title
|
|
1584
|
+
redirect_url: string;
|
|
1585
|
+
review_count: number;
|
|
1586
|
+
reward_note: string;
|
|
1587
|
+
source: string; // Source platform (walmart, admesh, etc.)
|
|
1588
|
+
title: string; // Product title
|
|
1589
|
+
trial_days: number;
|
|
1590
|
+
url: string;
|
|
1591
|
+
|
|
1592
|
+
// Optional fields
|
|
1593
|
+
content_variations?: {
|
|
1594
|
+
statement?: any;
|
|
1595
|
+
question?: any;
|
|
1596
|
+
};
|
|
1597
|
+
shipping_info?: {
|
|
1598
|
+
free_shipping_over_35: boolean;
|
|
1599
|
+
standard_rate: number;
|
|
1600
|
+
two_day_rate: number;
|
|
1601
|
+
ship_to_store: boolean;
|
|
1602
|
+
free_ship_to_store: boolean;
|
|
1603
|
+
};
|
|
1604
|
+
// ... additional optional fields
|
|
1605
|
+
}
|
|
1606
|
+
```
|
|
1607
|
+
|
|
1608
|
+
### Example Unified Response
|
|
1609
|
+
|
|
1610
|
+
```json
|
|
1611
|
+
{
|
|
1612
|
+
"ad_id": "walmart_249887530",
|
|
1613
|
+
"admesh_link": "https://goto.walmart.com/c/None/568844/9383?veh=aff&sourceid=imp_000011112222333344&u=https%3A%2F%2Fwww.walmart.com%2Fip%2F249887530",
|
|
1614
|
+
"audience_segment": "",
|
|
1615
|
+
"availability": "in_stock",
|
|
1616
|
+
"brand": "ZENY",
|
|
1617
|
+
"brand_trust_score": 0.5,
|
|
1618
|
+
"categories": ["All Walmart Restored Large Appliances"],
|
|
1619
|
+
"description": "The smallest and lightest twin tub portable washing machine available...",
|
|
1620
|
+
"discount_percentage": 34.9,
|
|
1621
|
+
"external_id": "249887530",
|
|
1622
|
+
"features": ["Free 2-3 day shipping"],
|
|
1623
|
+
"image_url": "https://i5.walmartimages.com/asr/7505138e-bbfa-4a43-9de4-2ab8c71eed99.6810f971aaffdca38d18e9928b3e4450.jpeg?odnHeight=450&odnWidth=450&odnBg=ffffff",
|
|
1624
|
+
"intent_match_score": 0.72,
|
|
1625
|
+
"is_fallback": false,
|
|
1626
|
+
"keywords": [],
|
|
1627
|
+
"offer_trust_score": 1,
|
|
1628
|
+
"original_price": 152.9,
|
|
1629
|
+
"price": 99.48,
|
|
1630
|
+
"pricing": "$99.48",
|
|
1631
|
+
"product_id": "walmart_249887530",
|
|
1632
|
+
"rating": 4,
|
|
1633
|
+
"reason": "Perfect match for 'best washing machine to buy' - from trusted brand ZENY, highly rated (4.0/5)",
|
|
1634
|
+
"recommendation_description": "The smallest and lightest twin tub portable washing machine available...",
|
|
1635
|
+
"recommendation_title": "ZENY Portable Washing Machine Mini Twin Tub Washing Machine with Washer & Spinner, Gravity Drain ...",
|
|
1636
|
+
"redirect_url": "https://www.walmart.com/ip/249887530",
|
|
1637
|
+
"review_count": 384,
|
|
1638
|
+
"reward_note": "",
|
|
1639
|
+
"source": "walmart",
|
|
1640
|
+
"title": "ZENY Portable Washing Machine Mini Twin Tub Washing Machine with Washer & Spinner, Gravity Drain ...",
|
|
1641
|
+
"trial_days": 0,
|
|
1642
|
+
"url": "https://www.walmart.com/ip/249887530",
|
|
1643
|
+
"shipping_info": {
|
|
1644
|
+
"free_shipping_over_35": false,
|
|
1645
|
+
"standard_rate": 0,
|
|
1646
|
+
"two_day_rate": 0,
|
|
1647
|
+
"ship_to_store": false,
|
|
1648
|
+
"free_ship_to_store": false
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
```
|
|
1652
|
+
|
|
1549
1653
|
### 🌟 Perfect For
|
|
1550
1654
|
- **AI Applications** - Citation-based conversation ads
|
|
1551
1655
|
- **Chat Interfaces** - Inline and floating recommendation units
|
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { AdMeshRecommendation } from '../types/index';
|
|
3
|
-
export interface EcommerceProduct {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
price?: number;
|
|
7
|
-
original_price?: number;
|
|
8
|
-
discount_percentage?: number;
|
|
9
|
-
image_url?: string;
|
|
10
|
-
brand?: string;
|
|
11
|
-
rating?: number;
|
|
12
|
-
review_count?: number;
|
|
13
|
-
url: string;
|
|
14
|
-
source?: 'walmart' | 'admesh' | string;
|
|
15
|
-
availability?: string;
|
|
16
|
-
shipping_info?: {
|
|
17
|
-
free_shipping_over_35?: boolean;
|
|
18
|
-
standard_rate?: number;
|
|
19
|
-
two_day_rate?: number;
|
|
20
|
-
};
|
|
21
|
-
description?: string;
|
|
22
|
-
admesh_link?: string;
|
|
23
|
-
}
|
|
2
|
+
import { AdMeshRecommendation, EcommerceProduct } from '../types/index';
|
|
24
3
|
export interface AdMeshEcommerceCardsProps {
|
|
25
4
|
products?: EcommerceProduct[];
|
|
26
5
|
recommendations?: AdMeshRecommendation[];
|
|
@@ -28,7 +7,7 @@ export interface AdMeshEcommerceCardsProps {
|
|
|
28
7
|
showTitle?: boolean;
|
|
29
8
|
className?: string;
|
|
30
9
|
cardClassName?: string;
|
|
31
|
-
onProductClick?: (product: EcommerceProduct) => void;
|
|
10
|
+
onProductClick?: (product: EcommerceProduct | AdMeshRecommendation) => void;
|
|
32
11
|
showPricing?: boolean;
|
|
33
12
|
showRatings?: boolean;
|
|
34
13
|
showBrand?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdMeshEcommerceCards.d.ts","sourceRoot":"","sources":["../../src/components/AdMeshEcommerceCards.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"AdMeshEcommerceCards.d.ts","sourceRoot":"","sources":["../../src/components/AdMeshEcommerceCards.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,GAAG,oBAAoB,KAAK,IAAI,CAAC;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAwSpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ie;function we(){if(ie)return K;ie=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(t,d,s){var i=null;if(s!==void 0&&(i=""+s),d.key!==void 0&&(i=""+d.key),"key"in d){s={};for(var c in d)c!=="key"&&(s[c]=d[c])}else s=d;return d=s.ref,{$$typeof:e,type:t,key:i,ref:d!==void 0?d:null,props:s}}return K.Fragment=r,K.jsx=o,K.jsxs=o,K}var G={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ce;function ye(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&function(){function e(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===j?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case N:return"Profiler";case T:return"StrictMode";case P:return"Suspense";case A:return"SuspenseList";case l:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case f:return"Portal";case z:return(n.displayName||"Context")+".Provider";case L:return(n._context.displayName||"Context")+".Consumer";case F:var u=n.render;return n=n.displayName,n||(n=u.displayName||u.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case C:return u=n.displayName||null,u!==null?u:e(n.type)||"Memo";case R:u=n._payload,n=n._init;try{return e(n(u))}catch{}}return null}function r(n){return""+n}function o(n){try{r(n);var u=!1}catch{u=!0}if(u){u=console;var _=u.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return _.call(u,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),r(n)}}function t(n){if(n===E)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===R)return"<...>";try{var u=e(n);return u?"<"+u+">":"<...>"}catch{return"<...>"}}function d(){var n=M.A;return n===null?null:n.getOwner()}function s(){return Error("react-stack-top-frame")}function i(n){if(S.call(n,"key")){var u=Object.getOwnPropertyDescriptor(n,"key").get;if(u&&u.isReactWarning)return!1}return n.key!==void 0}function c(n,u){function _(){y||(y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",u))}_.isReactWarning=!0,Object.defineProperty(n,"key",{get:_,configurable:!0})}function g(){var n=e(this.type);return q[n]||(q[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function b(n,u,_,I,W,O,Q,Z){return _=O.ref,n={$$typeof:v,type:n,key:u,props:O,_owner:W},(_!==void 0?_:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:g}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function k(n,u,_,I,W,O,Q,Z){var $=u.children;if($!==void 0)if(I)if(m($)){for(I=0;I<$.length;I++)p($[I]);Object.freeze&&Object.freeze($)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p($);if(S.call(u,"key")){$=e(n);var V=Object.keys(u).filter(function(xe){return xe!=="key"});I=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",de[$+I]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
22
|
+
<%s key={someKey} {...props} />`,I,$,V,$),de[$+I]=!0)}if($=null,_!==void 0&&(o(_),$=""+_),i(u)&&(o(u.key),$=""+u.key),"key"in u){_={};for(var ee in u)ee!=="key"&&(_[ee]=u[ee])}else _=u;return $&&c(_,typeof n=="function"?n.displayName||n.name||"Unknown":n),b(n,$,O,W,d(),_,Q,Z)}function p(n){typeof n=="object"&&n!==null&&n.$$typeof===v&&n._store&&(n._store.validated=1)}var h=w,v=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),z=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),l=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),M=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,m=Array.isArray,x=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(n){return n()}};var y,q={},D=h["react-stack-bottom-frame"].bind(h,s)(),J=x(t(s)),de={};G.Fragment=E,G.jsx=function(n,u,_,I,W){var O=1e4>M.recentlyCreatedOwnerStacks++;return k(n,u,_,!1,I,W,O?Error("react-stack-top-frame"):D,O?x(t(n)):J)},G.jsxs=function(n,u,_,I,W){var O=1e4>M.recentlyCreatedOwnerStacks++;return k(n,u,_,!0,I,W,O?Error("react-stack-top-frame"):D,O?x(t(n)):J)}}()),G}var le;function ke(){return le||(le=1,process.env.NODE_ENV==="production"?X.exports=we():X.exports=ye()),X.exports}var a=ke(),re={exports:{}};/*!
|
|
23
23
|
Copyright (c) 2018 Jed Watson.
|
|
24
24
|
Licensed under the MIT License (MIT), see
|
|
25
25
|
http://jedwatson.github.io/classnames
|
|
26
|
-
*/var me;function ve(){return me||(me=1,function(e){(function(){var
|
|
26
|
+
*/var me;function ve(){return me||(me=1,function(e){(function(){var r={}.hasOwnProperty;function o(){for(var s="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(s=d(s,t(c)))}return s}function t(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return o.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var c in s)r.call(s,c)&&s[c]&&(i=d(i,c));return i}function d(s,i){return i?s?s+" "+i:s+i:s}e.exports?(o.default=o,e.exports=o):window.classNames=o})()}(re)),re.exports}var _e=ve();const U=be(_e),je="https://api.useadmesh.com/track";let ae={apiBaseUrl:je,enabled:!0,debug:!1,retryAttempts:3,retryDelay:1e3};const Se=e=>{ae={...ae,...e}},pe=e=>{const[r,o]=w.useState(!1),[t,d]=w.useState(null),s=w.useMemo(()=>({...ae,...e}),[e]),i=w.useCallback((p,h)=>{s.debug&&console.log(`[AdMesh Tracker] ${p}`,h)},[s.debug]),c=w.useCallback(async(p,h)=>{if(!s.enabled){i("Tracking disabled, skipping event",{eventType:p,data:h});return}if(!h.adId||!h.admeshLink){const T="Missing required tracking data: adId and admeshLink are required";i(T,h),d(T);return}o(!0),d(null);const v={event_type:p,ad_id:h.adId,admesh_link:h.admeshLink,product_id:h.productId,user_id:h.userId,session_id:h.sessionId,revenue:h.revenue,conversion_type:h.conversionType,metadata:h.metadata,timestamp:new Date().toISOString(),user_agent:navigator.userAgent,referrer:document.referrer,page_url:window.location.href};i(`Sending ${p} event`,v);let f=null;for(let T=1;T<=(s.retryAttempts||3);T++)try{const N=await fetch(`${s.apiBaseUrl}/events`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)});if(!N.ok)throw new Error(`HTTP ${N.status}: ${N.statusText}`);const L=await N.json();i(`${p} event tracked successfully`,L),o(!1);return}catch(N){f=N,i(`Attempt ${T} failed for ${p} event`,N),T<(s.retryAttempts||3)&&await new Promise(L=>setTimeout(L,(s.retryDelay||1e3)*T))}const E=`Failed to track ${p} event after ${s.retryAttempts} attempts: ${f==null?void 0:f.message}`;i(E,f),d(E),o(!1)},[s,i]),g=w.useCallback(async p=>c("click",p),[c]),b=w.useCallback(async p=>c("view",p),[c]),k=w.useCallback(async p=>(!p.revenue&&!p.conversionType&&i("Warning: Conversion tracking without revenue or conversion type",p),c("conversion",p)),[c,i]);return{trackClick:g,trackView:b,trackConversion:k,isTracking:r,error:t}},Ne=(e,r,o)=>{try{const t=new URL(e);return t.searchParams.set("ad_id",r),t.searchParams.set("utm_source","admesh"),t.searchParams.set("utm_medium","recommendation"),o&&Object.entries(o).forEach(([d,s])=>{t.searchParams.set(d,s)}),t.toString()}catch(t){return console.warn("[AdMesh] Invalid URL provided to buildAdMeshLink:",e,t),e}},Te=(e,r)=>({adId:e.ad_id,admeshLink:e.admesh_link,productId:e.product_id,...r}),H=({adId:e,admeshLink:r,productId:o,children:t,trackingData:d,className:s,style:i})=>{const{trackClick:c,trackView:g}=pe(),b=w.useRef(null),k=w.useRef(!1);w.useEffect(()=>{if(!b.current||k.current)return;const h=new IntersectionObserver(v=>{v.forEach(f=>{f.isIntersecting&&!k.current&&(k.current=!0,g({adId:e,admeshLink:r,productId:o,...d}).catch(console.error))})},{threshold:.5,rootMargin:"0px"});return h.observe(b.current),()=>{h.disconnect()}},[e,r,o,d,g]);const p=w.useCallback(async h=>{try{await c({adId:e,admeshLink:r,productId:o,...d})}catch(E){console.error("Failed to track click:",E)}h.target.closest("a")||window.open(r,"_blank","noopener,noreferrer")},[e,r,o,d,c]);return a.jsx("div",{ref:b,className:s,onClick:p,style:{cursor:"pointer",...i},children:t})};H.displayName="AdMeshLinkTracker";const Re=`
|
|
27
27
|
/* AdMesh UI SDK - Complete Self-Contained Styles */
|
|
28
28
|
|
|
29
29
|
/* CSS Reset for AdMesh components */
|
|
@@ -691,7 +691,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
691
691
|
.admesh-component .lg\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
692
692
|
.admesh-component .lg\\:col-span-1 { grid-column: span 1 / span 1; }
|
|
693
693
|
}
|
|
694
|
-
`;let re=!1;const he=()=>{w.useEffect(()=>{if(re)return;const e=document.createElement("style");return e.id="admesh-ui-sdk-styles",e.textContent=Re,document.getElementById("admesh-ui-sdk-styles")||(document.head.appendChild(e),re=!0),()=>{const t=document.getElementById("admesh-ui-sdk-styles");t&&document.head.contains(t)&&(document.head.removeChild(t),re=!1)}},[])},Y=(e,t={})=>{const o=e.intent_match_score||0,r=t.customLabels||{};return o>=.8?r.partnerRecommendation||"Partner Recommendation":o>=.6?r.partnerMatch||"Partner Match":o>=.3?r.promotedOption||"Promoted":r.relatedOption||"Related"},oe=(e,t)=>{const o=e.intent_match_score||0;return o>=.8?"This recommendation is from a partner who compensates us when you engage. We've matched it to your needs based on your query.":o>=.6?"Top-rated partner solution matched to your specific requirements. Partner compensates us for qualified referrals.":o>=.3?"This partner solution may be relevant to your needs. The partner compensates us when you take qualifying actions.":"This solution is somewhat related to your query. While not a perfect match, it might still be helpful. This partner compensates us for qualified referrals."},Me=(e=!0,t=!1)=>e?t?"These curated recommendations are from partners who compensate us for referrals.":"Personalized Partner Recommendations: All results are from vetted partners who compensate us for qualified matches. We've ranked them based on relevance to your specific needs.":"Expanded Results: While these don't perfectly match your query, they're related solutions from our partner network. All partners compensate us for referrals.",Ee=(e,t=!1)=>{const o=e.intent_match_score||0;return t?"Promoted":o>=.8?"Smart Recommendation":o>=.6?"Partner Match":"Promoted"},Ce=()=>"We've partnered with trusted providers to bring you relevant solutions. These partners compensate us for qualified referrals, which helps us keep our service free.",Ae=e=>({"Top Match":"Top Match","Partner Recommendation":"Partner Recommendation","Perfect Fit":"Perfect Fit","Great Match":"Great Match",Recommended:"Recommended","Good Fit":"Good Fit",Featured:"Featured","Popular Choice":"Popular Choice","Premium Pick":"Premium Pick","Free Tier":"Free Tier","AI Powered":"AI Powered",Popular:"Popular",New:"New","Trial Available":"Trial Available","Related Option":"Related Option","Alternative Solution":"Alternative Solution","Expanded Match":"Expanded Match"})[e]||e,Pe=(e,t="button")=>{const o=e.recommendation_title||e.title;return t==="link"?o:e.trial_days&&e.trial_days>0?`Try ${o}`:"Learn More"},Ie=e=>e.some(t=>(t.intent_match_score||0)>=.8),$e=(e=!1)=>e?"Powered by AdMesh":"Recommendations powered by AdMesh",ne=({recommendation:e,theme:t,showMatchScore:o=!1,showBadges:r=!0,variation:d="default",expandable:i=!1,className:l,style:c})=>{var f,N,T,R,$,L,O,C,A,M,S,E,F,s;he();const[g,x]=w.useState(!1);w.useMemo(()=>{var z;const b=[];Y(e)==="Partner Recommendation"&&b.push("Top Match"),e.trial_days&&e.trial_days>0&&b.push("Trial Available");const y=["ai","artificial intelligence","machine learning","ml","automation"];return(((z=e.keywords)==null?void 0:z.some(W=>y.some(J=>W.toLowerCase().includes(J))))||e.title.toLowerCase().includes("ai"))&&b.push("AI Powered"),e.badges&&e.badges.length>0&&e.badges.forEach(W=>{["Top Match","Free Tier","AI Powered","Popular","New","Trial Available"].includes(W)&&!b.includes(W)&&b.push(W)}),b},[e]),Math.round(e.intent_match_score*100);const p=d==="simple"?{title:e.recommendation_title||e.title,description:e.recommendation_description||e.description||e.reason,ctaText:e.recommendation_title||e.title,isSimple:!0}:{title:e.recommendation_title||e.title,description:e.recommendation_description||e.description||e.reason,ctaText:e.recommendation_title||e.title},h=D("admesh-component","admesh-card","relative p-4 sm:p-5 rounded-xl bg-gradient-to-br from-white to-gray-50 dark:from-slate-800 dark:to-slate-900 border border-gray-200/50 dark:border-slate-700/50 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1",l),_=t?{"--admesh-primary":t.primaryColor||t.accentColor||"#3b82f6","--admesh-secondary":t.secondaryColor||"#10b981","--admesh-accent":t.accentColor||"#3b82f6","--admesh-background":t.backgroundColor,"--admesh-surface":t.surfaceColor,"--admesh-border":t.borderColor,"--admesh-text":t.textColor,"--admesh-text-secondary":t.textSecondaryColor,"--admesh-radius":t.borderRadius||"12px","--admesh-shadow-sm":(f=t.shadows)==null?void 0:f.small,"--admesh-shadow-md":(N=t.shadows)==null?void 0:N.medium,"--admesh-shadow-lg":(T=t.shadows)==null?void 0:T.large,"--admesh-spacing-sm":(R=t.spacing)==null?void 0:R.small,"--admesh-spacing-md":($=t.spacing)==null?void 0:$.medium,"--admesh-spacing-lg":(L=t.spacing)==null?void 0:L.large,"--admesh-font-size-sm":(O=t.fontSize)==null?void 0:O.small,"--admesh-font-size-base":(C=t.fontSize)==null?void 0:C.base,"--admesh-font-size-lg":(A=t.fontSize)==null?void 0:A.large,"--admesh-font-size-title":(M=t.fontSize)==null?void 0:M.title,fontFamily:t.fontFamily,width:((E=(S=t.components)==null?void 0:S.productCard)==null?void 0:E.width)||"100%"}:{width:"100%"};return d==="simple"?a.jsxs("div",{className:D("admesh-component admesh-simple-ad","inline-block text-sm leading-relaxed",l),style:{fontFamily:(t==null?void 0:t.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',...(F=t==null?void 0:t.components)==null?void 0:F.productCard,...c},"data-admesh-theme":t==null?void 0:t.mode,children:[a.jsx("span",{style:{fontSize:"11px",fontWeight:"600",color:(t==null?void 0:t.accentColor)||"#2563eb",backgroundColor:(t==null?void 0:t.mode)==="dark"?"#374151":"#f3f4f6",padding:"2px 6px",borderRadius:"4px",marginRight:"8px"},title:oe(e,Y(e)),children:Y(e)}),a.jsxs("span",{style:{color:(t==null?void 0:t.mode)==="dark"?"#f3f4f6":"#374151",marginRight:"4px"},children:[p.description," "]}),a.jsx(H,{adId:e.ad_id,admeshLink:e.admesh_link,productId:e.product_id,trackingData:{title:e.title,matchScore:e.intent_match_score,component:"simple_ad_cta"},children:a.jsx("span",{style:{color:(t==null?void 0:t.accentColor)||"#2563eb",textDecoration:"underline",cursor:"pointer",fontSize:"inherit",fontFamily:"inherit"},children:p.ctaText})}),a.jsx("span",{style:{fontSize:"10px",color:(t==null?void 0:t.mode)==="dark"?"#9ca3af":"#6b7280",marginLeft:"8px"},children:"(Sponsored • Powered by AdMesh)"})]}):a.jsx("div",{className:h,style:{fontFamily:(t==null?void 0:t.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',...(s=t==null?void 0:t.components)==null?void 0:s.productCard,...c},"data-admesh-theme":t==null?void 0:t.mode,children:a.jsxs("div",{className:"h-full flex flex-col",style:_,children:[a.jsx("div",{className:"mb-3",children:a.jsx("span",{style:{fontSize:"11px",fontWeight:"600",color:(t==null?void 0:t.accentColor)||"#2563eb",backgroundColor:(t==null?void 0:t.mode)==="dark"?"#374151":"#f3f4f6",padding:"2px 6px",borderRadius:"4px"},title:oe(e,Y(e)),children:Y(e)})}),a.jsxs("div",{className:"flex justify-between items-center gap-3 mb-4",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.product_logo&&a.jsx("img",{src:e.product_logo.url,alt:`${e.title} logo`,className:"w-6 h-6 rounded flex-shrink-0",onError:b=>{b.target.style.display="none"}}),a.jsx("h4",{className:"font-semibold text-gray-800 dark:text-gray-200 text-sm sm:text-base truncate",children:p.title})]}),a.jsx("div",{className:"flex-shrink-0",children:a.jsx(H,{adId:e.ad_id,admeshLink:e.admesh_link,productId:e.product_id,trackingData:{title:e.title,matchScore:e.intent_match_score,component:"product_card_cta"},children:a.jsxs("button",{className:"text-xs px-2 py-1 sm:px-3 sm:py-2 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 flex items-center transition-all duration-200 transform hover:scale-105 shadow-md hover:shadow-lg whitespace-nowrap",children:["Visit",a.jsx("svg",{className:"ml-1 h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})})})]}),a.jsx("div",{className:"mb-6",children:a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed",children:p.description})}),e.features&&e.features.length>0&&a.jsxs("div",{className:"mb-3",children:[a.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-300 mb-2 font-medium",children:"✨ Key Features"}),a.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.features.slice(0,4).map((b,m)=>a.jsxs("span",{className:"text-xs px-2 py-1 rounded-full bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/30 dark:to-purple-900/30 text-indigo-700 dark:text-indigo-300 border border-indigo-200 dark:border-indigo-700",children:[a.jsx("svg",{className:"h-3 w-3 mr-0.5 inline text-indigo-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),b]},m)),e.features.length>4&&a.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400 px-2 py-1",children:["+",e.features.length-4," more"]})]})]}),a.jsx("div",{className:"mt-auto pt-3 border-t border-gray-100 dark:border-slate-700",children:a.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[a.jsx("span",{children:"Sponsored"}),a.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Powered by AdMesh"})]})})]})})};ne.displayName="AdMeshProductCard";const se=({recommendation:e,theme:t,variation:o="default",expandable:r=!1,className:d,style:i})=>{var p,h,_;const[l,c]=w.useState(!1),x=(()=>{const f=e.content_variations;return o==="question"&&(f!=null&&f.question)?{title:f.question.cta||e.recommendation_title||e.title,description:f.question.text,ctaText:f.question.cta||e.recommendation_title||e.title}:o==="statement"&&(f!=null&&f.statement)?{title:e.recommendation_title||e.title,description:f.statement.text,ctaText:f.statement.cta||e.recommendation_title||e.title}:{title:e.recommendation_title||e.title,description:e.recommendation_description||e.reason||"",ctaText:e.recommendation_title||e.title}})(),v=D("rounded-xl shadow-sm border border-gray-200 dark:border-gray-800 p-4 bg-white dark:bg-slate-900","hover:shadow-md transition-shadow duration-200",{"cursor-pointer":r&&(o==="question"||o==="statement")},d);return a.jsx("div",{className:v,style:{fontFamily:(t==null?void 0:t.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',width:((h=(p=t==null?void 0:t.components)==null?void 0:p.inlineRecommendation)==null?void 0:h.width)||"100%",...(_=t==null?void 0:t.components)==null?void 0:_.productCard,...i},"data-admesh-theme":t==null?void 0:t.mode,children:a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsxs("div",{className:"flex justify-between items-center gap-3 mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.product_logo&&a.jsx("img",{src:e.product_logo.url,alt:`${e.title} logo`,className:"w-5 h-5 rounded flex-shrink-0",onError:f=>{f.target.style.display="none"}}),a.jsx("h4",{className:"font-semibold text-gray-800 dark:text-gray-200 text-sm truncate",children:x.title})]}),a.jsx("div",{className:"flex-shrink-0",children:a.jsx(H,{adId:e.ad_id,admeshLink:e.admesh_link,productId:e.product_id,trackingData:{title:e.title,matchScore:e.intent_match_score,component:"inline_card_cta"},children:a.jsxs("button",{className:"text-xs px-2 py-1 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 flex items-center transition-all duration-200 transform hover:scale-105 shadow-sm whitespace-nowrap",children:[o==="question"?"Try":"Visit",a.jsx("svg",{className:"ml-1 h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})})})]}),x.description&&a.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300 mb-2 line-clamp-2",children:x.description}),a.jsx("div",{className:"mt-auto pt-2 border-t border-gray-100 dark:border-slate-700",children:a.jsxs("div",{className:"flex items-center justify-between text-[11px] text-gray-500 dark:text-gray-400",children:[a.jsx("span",{children:"Sponsored"}),a.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Powered by AdMesh"})]})})]})})};se.displayName="AdMeshInlineCard";const Le=(e,t,o)=>{let r=e;if(t.forEach((i,l)=>{const c=`link_${l+1}`,g=`{product${l+1}}`,x=`{recommendation${l+1}}`;o.set(c,i),r.includes(g)?r=r.replace(g,`{{LINK_${c}_${i.title}}}`):r.includes(x)&&(r=r.replace(x,`{{LINK_${c}_${i.title}}}`))}),r.match(/\{product\}/g)&&t.length>0){const i="link_1";o.set(i,t[0]),r=r.replace("{product}",`{{LINK_${i}_${t[0].title}}}`)}return{text:r,linkMap:o}},Fe=(e,t,o,r)=>{let d=e;return o.forEach((i,l)=>{const c=Math.min(i.recommendationIndex,t.length-1),g=t[c];if(g){const x=`link_${l+1}`;r.set(x,g);const v=i.linkText||g.title,p=typeof i.pattern=="string"?new RegExp(i.pattern.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"):i.pattern;d=d.replace(p,h=>`${h} {{LINK_${x}_${v}}}`)}}),{text:d,linkMap:r}},ze=(e,t,o)=>{let r=e;return t.forEach((d,i)=>{const l=`link_${i+1}`;o.set(l,d),i===0?r+=` Check out {{LINK_${l}_${d.title}}}`:i===t.length-1&&t.length>1?r+=` and {{LINK_${l}_${d.title}}}`:r+=`, {{LINK_${l}_${d.title}}}`}),{text:r,linkMap:o}},Oe=(e,t,o,r)=>{let d=e;return r.forEach((i,l)=>{const c=new RegExp(`\\b${l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");c.test(d)&&(d=d.replace(c,g=>`{{EXTERNAL_LINK_${g}_${i}}}`))}),t.forEach((i,l)=>{const c=`link_${l+1}`,g=i.title;o.set(c,i);const x=new RegExp(`\\b${g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");if(x.test(d))d=d.replace(x,v=>`{{LINK_${c}_${v}}}`);else{const v=i.keywords||[];let p=!1;for(const h of v){const _=new RegExp(`\\b${h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");if(_.test(d)&&!p){d=d.replace(_,f=>(p=!0,`${f} {{LINK_${c}_${g}}}`));break}}p||(d+=` {{LINK_${c}_${g}}}`)}}),{text:d,linkMap:o}},ue=({recommendations:e,conversationTextLinks:t,theme:o,citationStyle:r="numbered",onCitationHover:d,className:i,style:l,dynamicTemplate:c,linkInsertionStrategy:g="auto",customLinkPatterns:x,onTextUpdate:v,enableRealTimeUpdates:p=!1})=>{var L,O,C;const[h,_]=w.useState(null),f=w.useMemo(()=>t?t instanceof Map?t:new Map(Object.entries(t)):new Map,[t]),N=w.useMemo(()=>{var E;if(!e.length)return{text:"",linkMap:new Map};const A=new Map,M=[...e].sort((F,s)=>s.intent_match_score-F.intent_match_score),S=((E=M[0])==null?void 0:E.conversationText)||c||"";return S?g==="template"&&c?Le(c,M,A):g==="keywords"&&x?Fe(S,M,x,A):g==="append"?ze(S,M,A):Oe(S,M,A,f):{text:"",linkMap:new Map}},[e,c,g,x,f]);w.useEffect(()=>{if(p&&v){const{text:A}=N,M=A.replace(/\{\{LINK_[^}]+\}\}/g,S=>{const E=S.match(/\{\{LINK_link_\d+_(.+?)\}\}/);return E?E[1]:S});v(M)}},[N,p,v]);const T=()=>{const{text:A,linkMap:M}=N;return A.split(/(\{\{(?:LINK_|EXTERNAL_LINK_)[^}]+\}\})/).map((E,F)=>{const s=E.match(/\{\{LINK_(link_\d+)_(.+?)\}\}/),b=E.match(/\{\{EXTERNAL_LINK_(.+?)_(.+?)\}\}/);if(s){const m=s[1],y=s[2],k=M.get(m);if(k)return a.jsx("span",{className:"admesh-inline-link",onMouseEnter:()=>{_(k),d==null||d(k)},onMouseLeave:()=>_(null),children:a.jsx("a",{href:k.admesh_link||k.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline decoration-blue-600 dark:decoration-blue-400 hover:decoration-blue-800 dark:hover:decoration-blue-300 transition-colors duration-200",style:{textDecorationThickness:"1px",textUnderlineOffset:"2px",color:(o==null?void 0:o.accentColor)||void 0},onClick:z=>{k.ad_id&&console.log("AdMesh link clicked:",{adId:k.ad_id,title:k.title,url:k.admesh_link||k.url})},children:y})},`link-${m}-${F}`)}else if(b){const m=b[1],y=b[2];return a.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 dark:text-purple-400 hover:text-purple-800 dark:hover:text-purple-300 underline decoration-purple-600 dark:decoration-purple-400 hover:decoration-purple-800 dark:hover:decoration-purple-300 transition-colors duration-200",style:{textDecorationThickness:"1px",textUnderlineOffset:"2px"},onClick:()=>{console.log("External link clicked:",{companyName:m,url:y})},children:m},`external-${F}`)}return a.jsx("span",{children:E},F)})},R=D("admesh-citation-unit","rounded-xl shadow-sm border border-gray-200 dark:border-gray-800 p-4 bg-white dark:bg-slate-900",i),$=o!=null&&o.accentColor?{"--admesh-primary":o.accentColor}:void 0;return a.jsxs("div",{className:R,style:{...$,fontFamily:(o==null?void 0:o.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',width:((O=(L=o==null?void 0:o.components)==null?void 0:L.citationUnit)==null?void 0:O.width)||"100%",...(C=o==null?void 0:o.components)==null?void 0:C.citationUnit,...l},"data-admesh-theme":o==null?void 0:o.mode,children:[a.jsx("div",{className:"admesh-citation-text text-gray-800 dark:text-gray-200 leading-relaxed",children:T()}),a.jsxs("div",{className:"flex justify-between items-center mt-3 pt-2 border-t border-gray-200 dark:border-gray-700",children:[a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Sponsored"}),a.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Powered by AdMesh"})]})]})},fe=({products:e=[],recommendations:t=[],title:o="Product Recommendations",showTitle:r=!0,className:d="",cardClassName:i="",onProductClick:l,showPricing:c=!0,showRatings:g=!0,showBrand:x=!0,showSource:v=!1,showShipping:p=!0,maxCards:h=10,cardWidth:_="md",theme:f="auto",borderRadius:N="md",shadow:T="sm"})=>{const R=t.map(s=>({id:s.id||s.ad_id||s.product_id||`product-${Math.random()}`,title:s.title||"Product Title",price:s.price||99.99,original_price:s.original_price||s.price||129.99,image_url:s.image_url||s.logo_url||"https://via.placeholder.com/300x300?text=Product",brand:s.brand||s.company_name||"Brand",rating:s.rating||4.5,review_count:s.review_count||100,url:s.admesh_link||s.url||"#",source:s.source||s.recommendation_source||"admesh",availability:s.availability||"in_stock",shipping_info:s.shipping_info||{free_shipping_over_35:!0,two_day_shipping:!0},discount_percentage:s.discount_percentage||(s.original_price&&s.price?Math.round((s.original_price-s.price)/s.original_price*100):0),description:s.description||s.reason||"Product description",admesh_link:s.admesh_link||s.url||"#",external_id:s.external_id,trust_score:s.trust_score,intent_match_score:s.intent_match_score,features:s.features||[]})),L=(t.length>0?R:e).slice(0,h),O=()=>{switch(_){case"sm":return"w-48 min-w-48";case"md":return"w-64 min-w-64";case"lg":return"w-80 min-w-80";default:return"w-64 min-w-64"}},C=()=>{switch(N){case"none":return"rounded-none";case"sm":return"rounded-sm";case"md":return"rounded-lg";case"lg":return"rounded-xl";default:return"rounded-lg"}},A=()=>{switch(T){case"none":return"";case"sm":return"shadow-sm hover:shadow-md";case"md":return"shadow-md hover:shadow-lg";case"lg":return"shadow-lg hover:shadow-xl";default:return"shadow-sm hover:shadow-md"}},M=()=>f==="dark"?"bg-gray-900 text-white":f==="light"?"bg-white text-gray-900":"bg-white dark:bg-gray-900 text-gray-900 dark:text-white",S=s=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:2}).format(s),E=s=>{const b=[],m=Math.floor(s),y=s%1!==0;for(let z=0;z<m;z++)b.push(a.jsx("span",{className:"text-yellow-400",children:"★"},z));y&&b.push(a.jsx("span",{className:"text-yellow-400",children:"☆"},"half"));const k=5-Math.ceil(s);for(let z=0;z<k;z++)b.push(a.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"☆"},`empty-${z}`));return b},F=s=>{if(l)l(s);else{const b=s.admesh_link||s.url;b&&window.open(b,"_blank","noopener,noreferrer")}};return!e||e.length===0?null:a.jsxs("div",{className:D("w-full",d),children:[r&&a.jsxs("div",{className:"mb-4",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o}),a.jsx("div",{className:"mt-1 h-0.5 w-12 bg-blue-500"})]}),a.jsxs("div",{className:"relative",children:[L.length===0?a.jsx("div",{className:"text-center py-8 text-gray-500",children:"No products to display"}):a.jsx("div",{className:"flex gap-4 overflow-x-auto pb-4 scrollbar-hide",children:L.map(s=>{var b;return a.jsxs("div",{className:D(O(),C(),A(),M(),"flex-shrink-0 border border-gray-200 dark:border-gray-700 transition-all duration-200 cursor-pointer hover:scale-[1.02]",i),onClick:()=>F(s),children:[a.jsxs("div",{className:"relative aspect-square w-full overflow-hidden",children:[s.image_url?a.jsx("img",{src:s.image_url,alt:s.title,className:"h-full w-full object-cover transition-transform duration-200 hover:scale-105",loading:"lazy"}):a.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-gray-800",children:a.jsx("svg",{className:"h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),c&&s.discount_percentage&&s.discount_percentage>0&&a.jsxs("div",{className:"absolute top-2 left-2 bg-red-500 text-white text-xs font-bold px-2 py-1 rounded",children:["-",Math.round(s.discount_percentage),"%"]}),v&&s.source&&a.jsx("div",{className:"absolute top-2 right-2 bg-blue-500 text-white text-xs font-medium px-2 py-1 rounded",children:s.source.toUpperCase()})]}),a.jsxs("div",{className:"p-3",children:[x&&s.brand&&a.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mb-1 uppercase tracking-wide",children:s.brand}),a.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white line-clamp-2 mb-2 leading-tight",children:s.title}),g&&s.rating&&a.jsxs("div",{className:"flex items-center gap-1 mb-2",children:[a.jsx("div",{className:"flex text-sm",children:E(s.rating)}),a.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",s.review_count||0,")"]})]}),c&&s.price&&a.jsx("div",{className:"mb-2",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:S(s.price)}),s.original_price&&s.original_price>s.price&&a.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 line-through",children:S(s.original_price)})]})}),p&&((b=s.shipping_info)==null?void 0:b.free_shipping_over_35)&&a.jsx("div",{className:"text-xs text-green-600 dark:text-green-400 font-medium",children:"Free shipping over $35"}),s.availability&&s.availability!=="unknown"&&a.jsx("div",{className:D("text-xs font-medium mt-1",s.availability==="in_stock"?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:s.availability==="in_stock"?"In Stock":"Out of Stock"})]})]},s.id)})}),L.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute top-1/2 -left-2 transform -translate-y-1/2 bg-white dark:bg-gray-800 rounded-full shadow-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),a.jsx("div",{className:"absolute top-1/2 -right-2 transform -translate-y-1/2 bg-white dark:bg-gray-800 rounded-full shadow-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]})]}),a.jsxs("div",{className:"flex justify-between items-center mt-3 pt-2 border-t border-gray-200 dark:border-gray-700",children:[a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Sponsored"}),a.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Powered by AdMesh"})]}),a.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
694
|
+
`;let te=!1;const he=()=>{w.useEffect(()=>{if(te)return;const e=document.createElement("style");return e.id="admesh-ui-sdk-styles",e.textContent=Re,document.getElementById("admesh-ui-sdk-styles")||(document.head.appendChild(e),te=!0),()=>{const r=document.getElementById("admesh-ui-sdk-styles");r&&document.head.contains(r)&&(document.head.removeChild(r),te=!1)}},[])},Y=(e,r={})=>{const o=e.intent_match_score||0,t=r.customLabels||{};return o>=.8?t.partnerRecommendation||"Partner Recommendation":o>=.6?t.partnerMatch||"Partner Match":o>=.3?t.promotedOption||"Promoted":t.relatedOption||"Related"},oe=(e,r)=>{const o=e.intent_match_score||0;return o>=.8?"This recommendation is from a partner who compensates us when you engage. We've matched it to your needs based on your query.":o>=.6?"Top-rated partner solution matched to your specific requirements. Partner compensates us for qualified referrals.":o>=.3?"This partner solution may be relevant to your needs. The partner compensates us when you take qualifying actions.":"This solution is somewhat related to your query. While not a perfect match, it might still be helpful. This partner compensates us for qualified referrals."},Me=(e=!0,r=!1)=>e?r?"These curated recommendations are from partners who compensate us for referrals.":"Personalized Partner Recommendations: All results are from vetted partners who compensate us for qualified matches. We've ranked them based on relevance to your specific needs.":"Expanded Results: While these don't perfectly match your query, they're related solutions from our partner network. All partners compensate us for referrals.",Ee=(e,r=!1)=>{const o=e.intent_match_score||0;return r?"Promoted":o>=.8?"Smart Recommendation":o>=.6?"Partner Match":"Promoted"},Ae=()=>"We've partnered with trusted providers to bring you relevant solutions. These partners compensate us for qualified referrals, which helps us keep our service free.",Ce=e=>({"Top Match":"Top Match","Partner Recommendation":"Partner Recommendation","Perfect Fit":"Perfect Fit","Great Match":"Great Match",Recommended:"Recommended","Good Fit":"Good Fit",Featured:"Featured","Popular Choice":"Popular Choice","Premium Pick":"Premium Pick","Free Tier":"Free Tier","AI Powered":"AI Powered",Popular:"Popular",New:"New","Trial Available":"Trial Available","Related Option":"Related Option","Alternative Solution":"Alternative Solution","Expanded Match":"Expanded Match"})[e]||e,Pe=(e,r="button")=>{const o=e.recommendation_title||e.title;return r==="link"?o:e.trial_days&&e.trial_days>0?`Try ${o}`:"Learn More"},Ie=e=>e.some(r=>(r.intent_match_score||0)>=.8),$e=(e=!1)=>e?"Powered by AdMesh":"Recommendations powered by AdMesh",ne=({recommendation:e,theme:r,showMatchScore:o=!1,showBadges:t=!0,variation:d="default",expandable:s=!1,className:i,style:c})=>{var f,E,T,N,L,z,F,P,A,C,R,l,j,M;he();const[g,b]=w.useState(!1);w.useMemo(()=>{var q;const S=[];Y(e)==="Partner Recommendation"&&S.push("Top Match"),e.trial_days&&e.trial_days>0&&S.push("Trial Available");const x=["ai","artificial intelligence","machine learning","ml","automation"];return(((q=e.keywords)==null?void 0:q.some(D=>x.some(J=>D.toLowerCase().includes(J))))||e.title.toLowerCase().includes("ai"))&&S.push("AI Powered"),e.badges&&e.badges.length>0&&e.badges.forEach(D=>{["Top Match","Free Tier","AI Powered","Popular","New","Trial Available"].includes(D)&&!S.includes(D)&&S.push(D)}),S},[e]),Math.round(e.intent_match_score*100);const p=d==="simple"?{title:e.recommendation_title||e.title,description:e.recommendation_description||e.description||e.reason,ctaText:e.recommendation_title||e.title,isSimple:!0}:{title:e.recommendation_title||e.title,description:e.recommendation_description||e.description||e.reason,ctaText:e.recommendation_title||e.title},h=U("admesh-component","admesh-card","relative p-4 sm:p-5 rounded-xl bg-gradient-to-br from-white to-gray-50 dark:from-slate-800 dark:to-slate-900 border border-gray-200/50 dark:border-slate-700/50 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1",i),v=r?{"--admesh-primary":r.primaryColor||r.accentColor||"#3b82f6","--admesh-secondary":r.secondaryColor||"#10b981","--admesh-accent":r.accentColor||"#3b82f6","--admesh-background":r.backgroundColor,"--admesh-surface":r.surfaceColor,"--admesh-border":r.borderColor,"--admesh-text":r.textColor,"--admesh-text-secondary":r.textSecondaryColor,"--admesh-radius":r.borderRadius||"12px","--admesh-shadow-sm":(f=r.shadows)==null?void 0:f.small,"--admesh-shadow-md":(E=r.shadows)==null?void 0:E.medium,"--admesh-shadow-lg":(T=r.shadows)==null?void 0:T.large,"--admesh-spacing-sm":(N=r.spacing)==null?void 0:N.small,"--admesh-spacing-md":(L=r.spacing)==null?void 0:L.medium,"--admesh-spacing-lg":(z=r.spacing)==null?void 0:z.large,"--admesh-font-size-sm":(F=r.fontSize)==null?void 0:F.small,"--admesh-font-size-base":(P=r.fontSize)==null?void 0:P.base,"--admesh-font-size-lg":(A=r.fontSize)==null?void 0:A.large,"--admesh-font-size-title":(C=r.fontSize)==null?void 0:C.title,fontFamily:r.fontFamily,width:((l=(R=r.components)==null?void 0:R.productCard)==null?void 0:l.width)||"100%"}:{width:"100%"};return d==="simple"?a.jsxs("div",{className:U("admesh-component admesh-simple-ad","inline-block text-sm leading-relaxed",i),style:{fontFamily:(r==null?void 0:r.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',...(j=r==null?void 0:r.components)==null?void 0:j.productCard,...c},"data-admesh-theme":r==null?void 0:r.mode,children:[a.jsx("span",{style:{fontSize:"11px",fontWeight:"600",color:(r==null?void 0:r.accentColor)||"#2563eb",backgroundColor:(r==null?void 0:r.mode)==="dark"?"#374151":"#f3f4f6",padding:"2px 6px",borderRadius:"4px",marginRight:"8px"},title:oe(e,Y(e)),children:Y(e)}),a.jsxs("span",{style:{color:(r==null?void 0:r.mode)==="dark"?"#f3f4f6":"#374151",marginRight:"4px"},children:[p.description," "]}),a.jsx(H,{adId:e.ad_id,admeshLink:e.admesh_link,productId:e.product_id,trackingData:{title:e.title,matchScore:e.intent_match_score,component:"simple_ad_cta"},children:a.jsx("span",{style:{color:(r==null?void 0:r.accentColor)||"#2563eb",textDecoration:"underline",cursor:"pointer",fontSize:"inherit",fontFamily:"inherit"},children:p.ctaText})}),a.jsx("span",{style:{fontSize:"10px",color:(r==null?void 0:r.mode)==="dark"?"#9ca3af":"#6b7280",marginLeft:"8px"},children:"(Sponsored • Powered by AdMesh)"})]}):a.jsx("div",{className:h,style:{fontFamily:(r==null?void 0:r.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',...(M=r==null?void 0:r.components)==null?void 0:M.productCard,...c},"data-admesh-theme":r==null?void 0:r.mode,children:a.jsxs("div",{className:"h-full flex flex-col",style:v,children:[a.jsx("div",{className:"mb-3",children:a.jsx("span",{style:{fontSize:"11px",fontWeight:"600",color:(r==null?void 0:r.accentColor)||"#2563eb",backgroundColor:(r==null?void 0:r.mode)==="dark"?"#374151":"#f3f4f6",padding:"2px 6px",borderRadius:"4px"},title:oe(e,Y(e)),children:Y(e)})}),a.jsxs("div",{className:"flex justify-between items-center gap-3 mb-4",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.product_logo&&a.jsx("img",{src:e.product_logo.url,alt:`${e.title} logo`,className:"w-6 h-6 rounded flex-shrink-0",onError:S=>{S.target.style.display="none"}}),a.jsx("h4",{className:"font-semibold text-gray-800 dark:text-gray-200 text-sm sm:text-base truncate",children:p.title})]}),a.jsx("div",{className:"flex-shrink-0",children:a.jsx(H,{adId:e.ad_id,admeshLink:e.admesh_link,productId:e.product_id,trackingData:{title:e.title,matchScore:e.intent_match_score,component:"product_card_cta"},children:a.jsxs("button",{className:"text-xs px-2 py-1 sm:px-3 sm:py-2 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 flex items-center transition-all duration-200 transform hover:scale-105 shadow-md hover:shadow-lg whitespace-nowrap",children:["Visit",a.jsx("svg",{className:"ml-1 h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})})})]}),a.jsx("div",{className:"mb-6",children:a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed",children:p.description})}),e.features&&e.features.length>0&&a.jsxs("div",{className:"mb-3",children:[a.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-300 mb-2 font-medium",children:"✨ Key Features"}),a.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.features.slice(0,4).map((S,m)=>a.jsxs("span",{className:"text-xs px-2 py-1 rounded-full bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/30 dark:to-purple-900/30 text-indigo-700 dark:text-indigo-300 border border-indigo-200 dark:border-indigo-700",children:[a.jsx("svg",{className:"h-3 w-3 mr-0.5 inline text-indigo-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),S]},m)),e.features.length>4&&a.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400 px-2 py-1",children:["+",e.features.length-4," more"]})]})]}),a.jsx("div",{className:"mt-auto pt-3 border-t border-gray-100 dark:border-slate-700",children:a.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[a.jsx("span",{children:"Sponsored"}),a.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Powered by AdMesh"})]})})]})})};ne.displayName="AdMeshProductCard";const se=({recommendation:e,theme:r,variation:o="default",expandable:t=!1,className:d,style:s})=>{var p,h,v;const[i,c]=w.useState(!1),b=(()=>{const f=e.content_variations;return o==="question"&&(f!=null&&f.question)?{title:f.question.cta||e.recommendation_title||e.title,description:f.question.text,ctaText:f.question.cta||e.recommendation_title||e.title}:o==="statement"&&(f!=null&&f.statement)?{title:e.recommendation_title||e.title,description:f.statement.text,ctaText:f.statement.cta||e.recommendation_title||e.title}:{title:e.recommendation_title||e.title,description:e.recommendation_description||e.reason||"",ctaText:e.recommendation_title||e.title}})(),k=U("rounded-xl shadow-sm border border-gray-200 dark:border-gray-800 p-4 bg-white dark:bg-slate-900","hover:shadow-md transition-shadow duration-200",{"cursor-pointer":t&&(o==="question"||o==="statement")},d);return a.jsx("div",{className:k,style:{fontFamily:(r==null?void 0:r.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',width:((h=(p=r==null?void 0:r.components)==null?void 0:p.inlineRecommendation)==null?void 0:h.width)||"100%",...(v=r==null?void 0:r.components)==null?void 0:v.productCard,...s},"data-admesh-theme":r==null?void 0:r.mode,children:a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsxs("div",{className:"flex justify-between items-center gap-3 mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.product_logo&&a.jsx("img",{src:e.product_logo.url,alt:`${e.title} logo`,className:"w-5 h-5 rounded flex-shrink-0",onError:f=>{f.target.style.display="none"}}),a.jsx("h4",{className:"font-semibold text-gray-800 dark:text-gray-200 text-sm truncate",children:b.title})]}),a.jsx("div",{className:"flex-shrink-0",children:a.jsx(H,{adId:e.ad_id,admeshLink:e.admesh_link,productId:e.product_id,trackingData:{title:e.title,matchScore:e.intent_match_score,component:"inline_card_cta"},children:a.jsxs("button",{className:"text-xs px-2 py-1 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 flex items-center transition-all duration-200 transform hover:scale-105 shadow-sm whitespace-nowrap",children:[o==="question"?"Try":"Visit",a.jsx("svg",{className:"ml-1 h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})})})]}),b.description&&a.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300 mb-2 line-clamp-2",children:b.description}),a.jsx("div",{className:"mt-auto pt-2 border-t border-gray-100 dark:border-slate-700",children:a.jsxs("div",{className:"flex items-center justify-between text-[11px] text-gray-500 dark:text-gray-400",children:[a.jsx("span",{children:"Sponsored"}),a.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Powered by AdMesh"})]})})]})})};se.displayName="AdMeshInlineCard";const Le=(e,r,o)=>{let t=e;if(r.forEach((s,i)=>{const c=`link_${i+1}`,g=`{product${i+1}}`,b=`{recommendation${i+1}}`;o.set(c,s),t.includes(g)?t=t.replace(g,`{{LINK_${c}_${s.title}}}`):t.includes(b)&&(t=t.replace(b,`{{LINK_${c}_${s.title}}}`))}),t.match(/\{product\}/g)&&r.length>0){const s="link_1";o.set(s,r[0]),t=t.replace("{product}",`{{LINK_${s}_${r[0].title}}}`)}return{text:t,linkMap:o}},Fe=(e,r,o,t)=>{let d=e;return o.forEach((s,i)=>{const c=Math.min(s.recommendationIndex,r.length-1),g=r[c];if(g){const b=`link_${i+1}`;t.set(b,g);const k=s.linkText||g.title,p=typeof s.pattern=="string"?new RegExp(s.pattern.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"):s.pattern;d=d.replace(p,h=>`${h} {{LINK_${b}_${k}}}`)}}),{text:d,linkMap:t}},ze=(e,r,o)=>{let t=e;return r.forEach((d,s)=>{const i=`link_${s+1}`;o.set(i,d),s===0?t+=` Check out {{LINK_${i}_${d.title}}}`:s===r.length-1&&r.length>1?t+=` and {{LINK_${i}_${d.title}}}`:t+=`, {{LINK_${i}_${d.title}}}`}),{text:t,linkMap:o}},Oe=(e,r,o,t)=>{let d=e;return t.forEach((s,i)=>{const c=new RegExp(`\\b${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");c.test(d)&&(d=d.replace(c,g=>`{{EXTERNAL_LINK_${g}_${s}}}`))}),r.forEach((s,i)=>{const c=`link_${i+1}`,g=s.title;o.set(c,s);const b=new RegExp(`\\b${g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");if(b.test(d))d=d.replace(b,k=>`{{LINK_${c}_${k}}}`);else{const k=s.keywords||[];let p=!1;for(const h of k){const v=new RegExp(`\\b${h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");if(v.test(d)&&!p){d=d.replace(v,f=>(p=!0,`${f} {{LINK_${c}_${g}}}`));break}}p||(d+=` {{LINK_${c}_${g}}}`)}}),{text:d,linkMap:o}},ue=({recommendations:e,conversationTextLinks:r,theme:o,citationStyle:t="numbered",onCitationHover:d,className:s,style:i,dynamicTemplate:c,linkInsertionStrategy:g="auto",customLinkPatterns:b,onTextUpdate:k,enableRealTimeUpdates:p=!1})=>{var z,F,P;const[h,v]=w.useState(null),f=w.useMemo(()=>r?r instanceof Map?r:new Map(Object.entries(r)):new Map,[r]),E=w.useMemo(()=>{var l;if(!e.length)return{text:"",linkMap:new Map};const A=new Map,C=[...e].sort((j,M)=>M.intent_match_score-j.intent_match_score),R=((l=C[0])==null?void 0:l.conversationText)||c||"";return R?g==="template"&&c?Le(c,C,A):g==="keywords"&&b?Fe(R,C,b,A):g==="append"?ze(R,C,A):Oe(R,C,A,f):{text:"",linkMap:new Map}},[e,c,g,b,f]);w.useEffect(()=>{if(p&&k){const{text:A}=E,C=A.replace(/\{\{LINK_[^}]+\}\}/g,R=>{const l=R.match(/\{\{LINK_link_\d+_(.+?)\}\}/);return l?l[1]:R});k(C)}},[E,p,k]);const T=()=>{const{text:A,linkMap:C}=E;return A.split(/(\{\{(?:LINK_|EXTERNAL_LINK_)[^}]+\}\})/).map((l,j)=>{const M=l.match(/\{\{LINK_(link_\d+)_(.+?)\}\}/),S=l.match(/\{\{EXTERNAL_LINK_(.+?)_(.+?)\}\}/);if(M){const m=M[1],x=M[2],y=C.get(m);if(y)return a.jsx("span",{className:"admesh-inline-link",onMouseEnter:()=>{v(y),d==null||d(y)},onMouseLeave:()=>v(null),children:a.jsx("a",{href:y.admesh_link||y.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline decoration-blue-600 dark:decoration-blue-400 hover:decoration-blue-800 dark:hover:decoration-blue-300 transition-colors duration-200",style:{textDecorationThickness:"1px",textUnderlineOffset:"2px",color:(o==null?void 0:o.accentColor)||void 0},onClick:q=>{y.ad_id&&console.log("AdMesh link clicked:",{adId:y.ad_id,title:y.title,url:y.admesh_link||y.url})},children:x})},`link-${m}-${j}`)}else if(S){const m=S[1],x=S[2];return a.jsx("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 dark:text-purple-400 hover:text-purple-800 dark:hover:text-purple-300 underline decoration-purple-600 dark:decoration-purple-400 hover:decoration-purple-800 dark:hover:decoration-purple-300 transition-colors duration-200",style:{textDecorationThickness:"1px",textUnderlineOffset:"2px"},onClick:()=>{console.log("External link clicked:",{companyName:m,url:x})},children:m},`external-${j}`)}return a.jsx("span",{children:l},j)})},N=U("admesh-citation-unit","rounded-xl shadow-sm border border-gray-200 dark:border-gray-800 p-4 bg-white dark:bg-slate-900",s),L=o!=null&&o.accentColor?{"--admesh-primary":o.accentColor}:void 0;return a.jsxs("div",{className:N,style:{...L,fontFamily:(o==null?void 0:o.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',width:((F=(z=o==null?void 0:o.components)==null?void 0:z.citationUnit)==null?void 0:F.width)||"100%",...(P=o==null?void 0:o.components)==null?void 0:P.citationUnit,...i},"data-admesh-theme":o==null?void 0:o.mode,children:[a.jsx("div",{className:"admesh-citation-text text-gray-800 dark:text-gray-200 leading-relaxed",children:T()}),a.jsxs("div",{className:"flex justify-between items-center mt-3 pt-2 border-t border-gray-200 dark:border-gray-700",children:[a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Sponsored"}),a.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Powered by AdMesh"})]})]})},fe=({products:e=[],recommendations:r=[],title:o="Product Recommendations",showTitle:t=!0,className:d="",cardClassName:s="",onProductClick:i,showPricing:c=!0,showRatings:g=!0,showBrand:b=!0,showSource:k=!1,showShipping:p=!0,maxCards:h=10,cardWidth:v="md",theme:f="auto",borderRadius:E="md",shadow:T="sm"})=>{const N=r.length>0?r.slice(0,h):e.slice(0,h),L=()=>{switch(v){case"sm":return"w-48 min-w-48";case"md":return"w-64 min-w-64";case"lg":return"w-80 min-w-80";default:return"w-64 min-w-64"}},z=()=>{switch(E){case"none":return"rounded-none";case"sm":return"rounded-sm";case"md":return"rounded-lg";case"lg":return"rounded-xl";default:return"rounded-lg"}},F=()=>{switch(T){case"none":return"";case"sm":return"shadow-sm hover:shadow-md";case"md":return"shadow-md hover:shadow-lg";case"lg":return"shadow-lg hover:shadow-xl";default:return"shadow-sm hover:shadow-md"}},P=()=>f==="dark"?"bg-gray-900 text-white":f==="light"?"bg-white text-gray-900":"bg-white dark:bg-gray-900 text-gray-900 dark:text-white",A=l=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:2}).format(l),C=l=>{const j=[],M=Math.floor(l),S=l%1!==0;for(let x=0;x<M;x++)j.push(a.jsx("span",{className:"text-yellow-400",children:"★"},x));S&&j.push(a.jsx("span",{className:"text-yellow-400",children:"☆"},"half"));const m=5-Math.ceil(l);for(let x=0;x<m;x++)j.push(a.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"☆"},`empty-${x}`));return j},R=l=>{if(i)i(l);else{const j=l.admesh_link||l.url;j&&window.open(j,"_blank","noopener,noreferrer")}};return(!e||e.length===0)&&(!r||r.length===0)?null:a.jsxs("div",{className:U("w-full",d),children:[t&&a.jsxs("div",{className:"mb-4",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o}),a.jsx("div",{className:"mt-1 h-0.5 w-12 bg-blue-500"})]}),a.jsxs("div",{className:"relative",children:[N.length===0?a.jsx("div",{className:"text-center py-8 text-gray-500",children:"No products to display"}):a.jsx("div",{className:"flex gap-4 overflow-x-auto pb-4 scrollbar-hide",children:N.map(l=>{var M;const j=l.product_id||l.id||l.ad_id;return a.jsxs("div",{className:U(L(),z(),F(),P(),"flex-shrink-0 border border-gray-200 dark:border-gray-700 transition-all duration-200 cursor-pointer hover:scale-[1.02]",s),onClick:()=>R(l),children:[a.jsxs("div",{className:"relative aspect-square w-full overflow-hidden",children:[l.image_url?a.jsx("img",{src:l.image_url,alt:l.title,className:"h-full w-full object-cover transition-transform duration-200 hover:scale-105",loading:"lazy"}):a.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-gray-800",children:a.jsx("svg",{className:"h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),c&&l.discount_percentage&&l.discount_percentage>0&&a.jsxs("div",{className:"absolute top-2 left-2 bg-red-500 text-white text-xs font-bold px-2 py-1 rounded",children:["-",Math.round(l.discount_percentage),"%"]}),k&&l.source&&a.jsx("div",{className:"absolute top-2 right-2 bg-blue-500 text-white text-xs font-medium px-2 py-1 rounded",children:l.source.toUpperCase()})]}),a.jsxs("div",{className:"p-3",children:[b&&l.brand&&a.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mb-1 uppercase tracking-wide",children:l.brand}),a.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white line-clamp-2 mb-2 leading-tight",children:l.title}),g&&l.rating&&a.jsxs("div",{className:"flex items-center gap-1 mb-2",children:[a.jsx("div",{className:"flex text-sm",children:C(l.rating)}),a.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",l.review_count||0,")"]})]}),c&&l.price&&a.jsx("div",{className:"mb-2",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:A(l.price)}),l.original_price&&l.original_price>l.price&&a.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 line-through",children:A(l.original_price)})]})}),p&&((M=l.shipping_info)==null?void 0:M.free_shipping_over_35)&&a.jsx("div",{className:"text-xs text-green-600 dark:text-green-400 font-medium",children:"Free shipping over $35"}),l.availability&&l.availability!=="unknown"&&a.jsx("div",{className:U("text-xs font-medium mt-1",l.availability==="in_stock"?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:l.availability==="in_stock"?"In Stock":"Out of Stock"})]})]},j)})}),N.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute top-1/2 -left-2 transform -translate-y-1/2 bg-white dark:bg-gray-800 rounded-full shadow-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),a.jsx("div",{className:"absolute top-1/2 -right-2 transform -translate-y-1/2 bg-white dark:bg-gray-800 rounded-full shadow-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]})]}),a.jsxs("div",{className:"flex justify-between items-center mt-3 pt-2 border-t border-gray-200 dark:border-gray-700",children:[a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Sponsored"}),a.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Powered by AdMesh"})]}),a.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
695
695
|
.scrollbar-hide {
|
|
696
696
|
-ms-overflow-style: none;
|
|
697
697
|
scrollbar-width: none;
|
|
@@ -705,5 +705,5 @@ React keys must be passed directly to JSX without using spread:
|
|
|
705
705
|
-webkit-box-orient: vertical;
|
|
706
706
|
overflow: hidden;
|
|
707
707
|
}
|
|
708
|
-
`}})]})},Ue=e=>{switch(e){case"citation":return"Recommendations";case"inline":return"Recommendations";case"ecommerce":return"Featured Products";case"product":return"Suggested Solutions";default:return"Recommendations"}},De=({recommendations:e=[],conversationTextLinks:
|
|
708
|
+
`}})]})},Ue=e=>{switch(e){case"citation":return"Recommendations";case"inline":return"Recommendations";case"ecommerce":return"Featured Products";case"product":return"Suggested Solutions";default:return"Recommendations"}},De=({recommendations:e=[],conversationTextLinks:r,layout:o,layoutConfig:t,theme:d,className:s,style:i,maxItems:c,columns:g="auto",spacing:b="md",showTitle:k=!0,title:p,productCardProps:h={},citationUnitProps:v={},ecommerceCardsProps:f={},onRecommendationClick:E,onProductClick:T,onCitationHover:N})=>{const{admeshRecommendations:L,walmartRecommendations:z}=w.useMemo(()=>{const m=e.filter(y=>!y.recommendation_source||y.recommendation_source==="admesh"),x=e.filter(y=>y.recommendation_source==="walmart");return{admeshRecommendations:m,walmartRecommendations:x}},[e]),F=w.useMemo(()=>o||(e.some(x=>x.source==="walmart"||x.recommendation_source==="walmart")?"ecommerce":"product"),[o,e]),P=w.useMemo(()=>{if(c!==void 0)return c;switch(F){case"ecommerce":return 3;case"product":case"inline":case"citation":default:return 1}},[c,F]),A=w.useMemo(()=>{if(!t)return{};const m={};return t.backgroundColor&&(m.backgroundColor=t.backgroundColor),t.textColor&&(m.color=t.textColor),t.borderColor&&(m.borderColor=t.borderColor),t.borderRadius&&(m.borderRadius=t.borderRadius),t.fontSize&&(m.fontSize=t.fontSize),t.fontFamily&&(m.fontFamily=t.fontFamily),t.fontWeight&&(m.fontWeight=t.fontWeight),t.lineHeight&&(m.lineHeight=t.lineHeight),t.padding&&(m.padding=t.padding),t.margin&&(m.margin=t.margin),t.shadow&&(m.boxShadow=t.shadow),m},[t]),C=w.useMemo(()=>{if(!t)return{};const m={};return t.primaryColor&&(m["--admesh-primary-color"]=t.primaryColor),t.secondaryColor&&(m["--admesh-secondary-color"]=t.secondaryColor),t.accentColor&&(m["--admesh-accent-color"]=t.accentColor),t.linkColor&&(m["--admesh-link-color"]=t.linkColor),t.hoverColor&&(m["--admesh-hover-color"]=t.hoverColor),t.borderColor&&(m["--admesh-border-color"]=t.borderColor),t.textColor&&(m["--admesh-text-color"]=t.textColor),m},[t]),R=w.useMemo(()=>L.slice(0,P),[L,P]);w.useMemo(()=>z.slice(0,P),[z,P]);const l=w.useMemo(()=>{const m="grid gap-4";let x="";o==="product"?P===1?x="grid-cols-1":g==="auto"?x="grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":typeof g=="number"?x=`grid-cols-1 sm:grid-cols-${Math.min(g,2)} lg:grid-cols-${g}`:x=g:x="grid-cols-1";let y="";switch(b){case"sm":y="gap-2";break;case"md":y="gap-4";break;case"lg":y="gap-6";break;case"xl":y="gap-8";break;default:y=b}return`${m} ${x} ${y}`},[g,b,P,o]),j=()=>{if(!k)return null;const m=p||Ue(o);return a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100 mb-4",style:{color:t==null?void 0:t.textColor,fontSize:t==null?void 0:t.fontSize,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeight},children:m})},M=()=>{switch(F){case"citation":return a.jsx(ue,{recommendations:e,conversationTextLinks:r,theme:d,onCitationHover:N,...v});case"ecommerce":return a.jsx(fe,{recommendations:e.slice(0,P),theme:(d==null?void 0:d.mode)||"auto",onProductClick:T,...f});case"product":return a.jsx("div",{className:l,children:R.map((m,x)=>a.jsx(ne,{recommendation:m,theme:d,...h},m.ad_id||x))});case"inline":return a.jsx("div",{className:"space-y-3",children:R.map((m,x)=>a.jsx(se,{recommendation:m,theme:d},m.ad_id||x))});default:return a.jsx("div",{className:"text-gray-500 dark:text-gray-400 text-center py-8",children:"No content to display"})}},S={fontFamily:(d==null?void 0:d.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',width:o==="ecommerce"?"auto":"100%",...A,...C,...i};return a.jsxs("div",{className:U("admesh-layout",`admesh-layout--${o}`,{"admesh-layout--dark":(d==null?void 0:d.mode)==="dark"||(t==null?void 0:t.darkMode),"admesh-layout--light":(d==null?void 0:d.mode)==="light"||!(t!=null&&t.darkMode)&&(t==null?void 0:t.darkMode)!==void 0},s),style:S,children:[(t==null?void 0:t.customCSS)&&a.jsx("style",{dangerouslySetInnerHTML:{__html:t.customCSS}}),j(),M()]})},We={"Top Match":"primary","Free Tier":"success","AI Powered":"secondary",Popular:"warning",New:"primary","Trial Available":"success"},Be={"Top Match":"★","Free Tier":"◆","AI Powered":"◉",Popular:"▲",New:"●","Trial Available":"◈"},ge=({type:e,variant:r,size:o="md",className:t,style:d})=>{const s=r||We[e]||"secondary",i=Be[e],c=U("admesh-component","admesh-badge",`admesh-badge--${s}`,`admesh-badge--${o}`,t);return a.jsxs("span",{className:c,style:d,children:[i&&a.jsx("span",{className:"admesh-badge__icon",children:i}),a.jsx("span",{className:"admesh-badge__text",children:e})]})};ge.displayName="AdMeshBadge";const B=(e={})=>{const r={mode:"light",primaryColor:"#3b82f6",secondaryColor:"#10b981",accentColor:"#3b82f6",backgroundColor:"#ffffff",surfaceColor:"#f9fafb",borderColor:"#e5e7eb",textColor:"#111827",textSecondaryColor:"#6b7280",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{small:"12px",base:"14px",large:"16px",title:"18px"},borderRadius:"8px",spacing:{small:"4px",medium:"8px",large:"16px"},shadows:{small:"0 1px 3px rgba(0, 0, 0, 0.1)",medium:"0 4px 6px rgba(0, 0, 0, 0.1)",large:"0 10px 15px rgba(0, 0, 0, 0.1)"},icons:{expandIcon:"▼",collapseIcon:"▲",starIcon:"★",checkIcon:"✓",arrowIcon:"→"},gradients:{primary:"linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%)",secondary:"linear-gradient(135deg, #10b981 0%, #059669 100%)",accent:"linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%)"},components:{productCard:{width:"100%"},citationUnit:{width:"100%"},inlineRecommendation:{width:"100%"},expandableUnit:{width:"100%"},compareTable:{width:"100%"},card:{width:"auto"},button:{width:"auto"}}},o={...r,...e,fontSize:{...r.fontSize,...e.fontSize},spacing:{...r.spacing,...e.spacing},shadows:{...r.shadows,...e.shadows},icons:{...r.icons,...e.icons},components:{...r.components,...e.components}};return Ye(o)},qe=(e={})=>B({...{mode:"dark",backgroundColor:"#1f2937",surfaceColor:"#374151",borderColor:"#4b5563",textColor:"#f9fafb",textSecondaryColor:"#9ca3af",shadows:{small:"0 1px 3px rgba(0, 0, 0, 0.3)",medium:"0 4px 6px rgba(0, 0, 0, 0.3)",large:"0 10px 15px rgba(0, 0, 0, 0.3)"}},...e}),Ve={get minimal(){return B({primaryColor:"#000000",secondaryColor:"#666666",borderRadius:"4px",shadows:{small:"none",medium:"0 1px 3px rgba(0, 0, 0, 0.1)",large:"0 2px 6px rgba(0, 0, 0, 0.1)"},components:{productCard:{width:"100%"},citationUnit:{width:"100%"},inlineRecommendation:{width:"100%"},expandableUnit:{width:"100%"},compareTable:{width:"100%"}}})},get vibrant(){return B({primaryColor:"#8b5cf6",secondaryColor:"#06b6d4",accentColor:"#f59e0b",borderRadius:"12px",gradients:{primary:"linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%)",secondary:"linear-gradient(135deg, #06b6d4 0%, #10b981 100%)",accent:"linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)"},components:{productCard:{width:"100%"},citationUnit:{width:"100%"},inlineRecommendation:{width:"100%"},expandableUnit:{width:"100%"},compareTable:{width:"100%"}}})},get corporate(){return B({primaryColor:"#1e40af",secondaryColor:"#059669",backgroundColor:"#f8fafc",surfaceColor:"#ffffff",borderColor:"#cbd5e1",borderRadius:"6px",fontFamily:'"Inter", -apple-system, BlinkMacSystemFont, sans-serif',components:{productCard:{width:"100%"},citationUnit:{width:"100%"},inlineRecommendation:{width:"100%"},expandableUnit:{width:"100%"},compareTable:{width:"100%"}}})},get highContrast(){return B({primaryColor:"#000000",secondaryColor:"#ffffff",backgroundColor:"#ffffff",surfaceColor:"#f5f5f5",borderColor:"#000000",textColor:"#000000",textSecondaryColor:"#333333",borderRadius:"0px",shadows:{small:"none",medium:"0 0 0 2px #000000",large:"0 0 0 3px #000000"},components:{productCard:{width:"100%"},citationUnit:{width:"100%"},inlineRecommendation:{width:"100%"},expandableUnit:{width:"100%"},compareTable:{width:"100%"}}})}},Ye=(e={})=>{const r=e.components||{},o={productCard:{width:"100%",...r.productCard},citationUnit:{width:"100%",...r.citationUnit},inlineRecommendation:{width:"100%",...r.inlineRecommendation},expandableUnit:{width:"100%",...r.expandableUnit},compareTable:{width:"100%",...r.compareTable},card:{width:"auto",...r.card},button:{width:"auto",...r.button}};return{...e,components:{...r,...o}}},Ke=(...e)=>{const r=B();return e.reduce((o,t)=>t?{...o,...t,mode:t.mode||o.mode}:o,r)},Ge=e=>{var o,t,d,s,i,c;const r=getComputedStyle(e);return{primaryColor:((o=r.getPropertyValue("--admesh-primary-color"))==null?void 0:o.trim())||void 0,secondaryColor:((t=r.getPropertyValue("--admesh-secondary-color"))==null?void 0:t.trim())||void 0,backgroundColor:((d=r.getPropertyValue("--admesh-background-color"))==null?void 0:d.trim())||void 0,textColor:((s=r.getPropertyValue("--admesh-text-color"))==null?void 0:s.trim())||void 0,borderRadius:((i=r.getPropertyValue("--admesh-border-radius"))==null?void 0:i.trim())||void 0,fontFamily:((c=r.getPropertyValue("--admesh-font-family"))==null?void 0:c.trim())||void 0}},He="0.2.1",Je={trackingEnabled:!0,debug:!1,theme:{mode:"light",accentColor:"#2563eb"}};exports.AdMeshBadge=ge;exports.AdMeshCitationUnit=ue;exports.AdMeshEcommerceCards=fe;exports.AdMeshInlineCard=se;exports.AdMeshLayout=De;exports.AdMeshLinkTracker=H;exports.AdMeshProductCard=ne;exports.DEFAULT_CONFIG=Je;exports.VERSION=He;exports.buildAdMeshLink=Ne;exports.createAdMeshTheme=B;exports.createDarkTheme=qe;exports.extractTrackingData=Te;exports.getBadgeText=Ce;exports.getCtaText=Pe;exports.getInlineDisclosure=Ee;exports.getInlineTooltip=Ae;exports.getLabelTooltip=oe;exports.getPoweredByText=$e;exports.getRecommendationLabel=Y;exports.getSectionDisclosure=Me;exports.hasHighQualityMatches=Ie;exports.mergeThemes=Ke;exports.setAdMeshTrackerConfig=Se;exports.themeFromCSSProperties=Ge;exports.themePresets=Ve;exports.useAdMeshStyles=he;exports.useAdMeshTracker=pe;
|
|
709
709
|
//# sourceMappingURL=index.js.map
|