@colabcommerce/elements 0.9.3 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/QuoteForm.js +4 -24
- package/dist/QuoteFormButton.js +4 -0
- package/dist/Store.js +1 -1
- package/dist/StoreLocator.js +18 -18
- package/dist/StoreLocatorProvider.js +1 -1
- package/dist/elements.css +1 -1
- package/dist/{index-DvX0QvFh.js → index-Bl_B7cwM.js} +6 -6
- package/dist/index-DIIxVsLf.js +28 -0
- package/dist/{navigation-DpGLbcKb.js → navigation-QgfKnxTJ.js} +1 -1
- package/dist/store-locator-Cu5fUiVm.js +1 -0
- package/dist/{translations-6mspyPRw.js → translations-WfjA8013.js} +1 -1
- package/dist/useGeolocation-BEKRqeV7.js +1 -0
- package/dist/useGeolocation.js +1 -0
- package/dist/useStoreLocator.js +1 -1
- package/dist/useStoreLocatorConfig-CLD8ogGE.js +1 -0
- package/package.json +4 -1
- package/dist/store-locator-Bto20jHS.js +0 -1
- package/dist/useStoreLocatorConfig-r4Y_2t-M.js +0 -1
package/README.md
CHANGED
|
@@ -34,10 +34,11 @@ const MyStoreLocator = () => {
|
|
|
34
34
|
|
|
35
35
|
#### Props
|
|
36
36
|
|
|
37
|
-
| Prop
|
|
37
|
+
| Prop | Type | Default |
|
|
38
38
|
| --------------- | ------- | ------- |
|
|
39
|
-
| organizationId | String
|
|
40
|
-
| locale | String
|
|
39
|
+
| organizationId | String | null
|
|
40
|
+
| locale | String | 'en'
|
|
41
|
+
|
|
41
42
|
|
|
42
43
|
### StoreDetails
|
|
43
44
|
|
package/dist/QuoteForm.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
2
|
-
/* @__PURE__ */e(
|
|
3
|
-
/* @__PURE__ */e(
|
|
4
|
-
/* @__PURE__ */e(
|
|
5
|
-
/* @__PURE__ */t("p",{className:"text-xs text-left text-muted-foreground",children:[r.address?.street_line_one,r.address?.street_line_two?`, ${r.address?.street_line_two}`:""]}),
|
|
6
|
-
/* @__PURE__ */t("p",{className:"text-xs text-left text-muted-foreground mb-2",children:[r.address?.city,", ",r.address?.province," ",r.address?.postal_code]}),
|
|
7
|
-
/* @__PURE__ */e("div",{className:"flex flex-row gap-2 mb-1",children:/* @__PURE__ */e(D,{className:"flex-1 md:flex-row",size:"sm",onClick:_,children:"Select"})})]}),s[12]=_,s[13]=u,s[14]=b,s[15]=r.address?.city,s[16]=r.address?.postal_code,s[17]=r.address?.province,s[18]=r.address?.street_line_one,s[19]=r.address?.street_line_two,s[20]=r.retailer_name,s[21]=L):L=s[21],s[22]!==p||s[23]!==m||s[24]!==r.name||s[25]!==k||s[26]!==C||s[27]!==L?(A=/* @__PURE__ */t(v,{position:k,ref:m,title:r.name,onClick:p,children:[C,L]}),s[22]=p,s[23]=m,s[24]=r.name,s[25]=k,s[26]=C,s[27]=L,s[28]=A):A=s[28],A},K=()=>{const l=a(46),{location:o,stores:s,focusedStoreId:r,setFocusedStoreId:n,setSelectedStoreId:i,setStepIndex:d}=U(),m=y();let u;l[0]!==m?(u=()=>{if(!m)return;const e=m.getZoom();m.setZoom(e+1)},l[0]=m,l[1]=u):u=l[1];const h=u;let p;l[2]!==m?(p=()=>{if(!m)return;const e=m.getZoom();m.setZoom(e-1)},l[2]=m,l[3]=p):p=l[3];const f=p;let x,g,v,N,_;l[4]!==o||l[5]!==m?(x=()=>{m&&o?.latitude&&o?.longitude&&(m.panTo({lat:o.latitude,lng:o.longitude}),m.setZoom(9))},g=[o,m],l[4]=o,l[5]=m,l[6]=x,l[7]=g):(x=l[6],g=l[7]),c(x,g),l[8]!==r||l[9]!==m||l[10]!==s?(v=()=>{if(!m||!r)return;const e=s.find(e=>e.id===r);e&&e.address&&m.panTo({lat:1*e.address.latitude,lng:1*e.address.longitude})},N=[r,s,m],l[8]=r,l[9]=m,l[10]=s,l[11]=v,l[12]=N):(v=l[11],N=l[12]),c(v,N),l[13]!==n?(_=e=>{n(e)},l[13]=n,l[14]=_):_=l[14];const S=_;let w;l[15]!==i||l[16]!==d?(w=e=>{i(e),d(1)},l[15]=i,l[16]=d,l[17]=w):w=l[17];const k=w;let I,C,L,A,j,z,M,D,F,O,P;if(l[18]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(I={width:"100%",height:"300px"},C={lat:22.54992,lng:0},l[18]=I,l[19]=C):(I=l[18],C=l[19]),l[20]!==r||l[21]!==S||l[22]!==k||l[23]!==s){let t;l[25]!==r||l[26]!==S||l[27]!==k?(t=t=>/* @__PURE__ */e(J,{store:t,isSelected:r===t.id,onClick:S,onSelect:k},t.id),l[25]=r,l[26]=S,l[27]=k,l[28]=t):t=l[28],L=s.map(t),l[20]=r,l[21]=S,l[22]=k,l[23]=s,l[24]=L}else L=l[24];return l[29]!==L?(A=/* @__PURE__ */e("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-primary/5 to-muted",children:/* @__PURE__ */e("div",{className:"text-center w-full",children:/* @__PURE__ */e(b,{style:I,defaultCenter:C,defaultZoom:3,gestureHandling:"greedy",disableDefaultUI:!0,mapId:"b1e4f5f5f8c7e2d9",children:L})})}),l[29]=L,l[30]=A):A=l[30],l[31]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(j=/* @__PURE__ */e("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),l[31]=j):j=l[31],l[32]!==h?(z=/* @__PURE__ */e("button",{className:"bg-card border shadow-md rounded-lg p-2 hover:bg-accent transition-colors",onClick:h,children:j}),l[32]=h,l[33]=z):z=l[33],l[34]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(M=/* @__PURE__ */e("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 12H4"})}),l[34]=M):M=l[34],l[35]!==f?(D=/* @__PURE__ */e("button",{className:"bg-card border shadow-md rounded-lg p-2 hover:bg-accent transition-colors",onClick:f,children:M}),l[35]=f,l[36]=D):D=l[36],l[37]!==z||l[38]!==D?(F=/* @__PURE__ */t("div",{className:"absolute top-4 right-4 flex flex-col gap-2",children:[z,D]}),l[37]=z,l[38]=D,l[39]=F):F=l[39],l[40]!==s.length?(O=/* @__PURE__ */t("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 bg-card border shadow-lg rounded-full px-4 py-2 text-sm font-medium",children:[
|
|
8
|
-
/* @__PURE__ */e("span",{className:"text-primary",children:s.length})," stores found"]}),l[40]=s.length,l[41]=O):O=l[41],l[42]!==A||l[43]!==F||l[44]!==O?(P=/* @__PURE__ */e("div",{className:"relative",children:/* @__PURE__ */t("div",{className:"bg-muted rounded-xl overflow-hidden border shadow-md h-[300px]",children:[A,F,O]})}),l[42]=A,l[43]=F,l[44]=O,l[45]=P):P=l[45],P},V=l=>{const o=a(65),{id:s,name:r,addressLineOne:n,city:c,province:i,postalCode:d,hours:m,distance:u,services:h,isFocused:p,handleFocus:f,handleSelect:x,requestedProducts:g,locationProducts:v}=l;let y;o[0]!==h?(y=void 0===h?[]:h,o[0]=h,o[1]=y):y=o[1];const b=y;let S;o[2]!==g?(S=void 0===g?[]:g,o[2]=g,o[3]=S):S=o[3];const w=S;let k;o[4]!==v?(k=void 0===v?[]:v,o[4]=v,o[5]=k):k=o[5];const I=k,{t:C}=A(),{availabilitySummary:L}=((e,t,a=["sku"])=>{const l={};t.map(t=>{const o=e.find(e=>a.some(a=>e[a]===t[a]));l[t.sku]=o?{stocked:o.stocked,available:o.available}:{stocked:!1,available:!1}});const o=Object.values(l).every(e=>e.stocked),s=Object.values(l).every(e=>e.available),r=Object.values(l).every(e=>!e.stocked),n=Object.values(l).every(e=>!e.available);let c="mixed";return o?c="allStocked":s?c="allAvailable":r&&n&&(c="none"),{availability:l,allAvailable:s,allStocked:o,noneStocked:r,noneAvailable:n,availabilitySummary:c}})(I,w);let j;o[6]!==x||o[7]!==s?(j=e=>{e.stopPropagation(),x(s)},o[6]=x,o[7]=s,o[8]=j):j=o[8];const z=j,O="bg-card border rounded-xl p-6 transition-all hover:shadow-lg cursor-pointer "+(p?"ring-2 ring-primary shadow-lg":"");let P,T,q,U,B,H,R,W,Z,J,K,V,Q,Y,X,ee,te,ae,le,oe,se;return o[9]!==f||o[10]!==s?(P=()=>f(s),o[9]=f,o[10]=s,o[11]=P):P=o[11],o[12]!==r?(T=/* @__PURE__ */e("div",{className:"flex items-start justify-between gap-4 mb-3",children:/* @__PURE__ */e("div",{children:/* @__PURE__ */e("h3",{className:"font-bold text-lg text-left mb-1",children:r})})}),o[12]=r,o[13]=T):T=o[13],o[14]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(q=/* @__PURE__ */e(M,{className:"w-4 h-4 text-muted-foreground mt-0.5 shrink-0"}),o[14]=q):q=o[14],o[15]!==n?(U=/* @__PURE__ */e("p",{className:"font-medium text-left",children:n}),o[15]=n,o[16]=U):U=o[16],o[17]!==c||o[18]!==d||o[19]!==i?(B=/* @__PURE__ */t("p",{className:"text-muted-foreground text-left",children:[c,", ",i," ",d]}),o[17]=c,o[18]=d,o[19]=i,o[20]=B):B=o[20],o[21]!==u||o[22]!==C?(H=C("default:distance_away",{distance:N(u).toFixed(1),distanceUnit:"miles"}),o[21]=u,o[22]=C,o[23]=H):H=o[23],o[24]!==H?(R=/* @__PURE__ */e("p",{className:"text-primary font-medium mt-1 text-left",children:H}),o[24]=H,o[25]=R):R=o[25],o[26]!==U||o[27]!==B||o[28]!==R?(W=/* @__PURE__ */t("div",{className:"flex items-start gap-2",children:[q,
|
|
9
|
-
/* @__PURE__ */t("div",{children:[U,B,R]})]}),o[26]=U,o[27]=B,o[28]=R,o[29]=W):W=o[29],o[30]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(Z=/* @__PURE__ */e("div",{className:"mt-2.5",children:/* @__PURE__ */e(F,{className:"w-4 h-4 text-muted-foreground"})}),o[30]=Z):Z=o[30],o[31]!==m?(J=/* @__PURE__ */t("div",{className:"flex items-top gap-2",children:[Z,
|
|
10
|
-
/* @__PURE__ */e("span",{className:"text-muted-foreground",children:/* @__PURE__ */e(_,{hours:m})})]}),o[31]=m,o[32]=J):J=o[32],o[33]!==W||o[34]!==J?(K=/* @__PURE__ */t("div",{className:"space-y-2 text-sm",children:[W,J]}),o[33]=W,o[34]=J,o[35]=K):K=o[35],o[36]!==L?(V="allStocked"===L&&/* @__PURE__ */t("div",{className:"flex items-center shrink mt-3 px-3 py-1 bg-green-50 text-green-600 text-xs font-medium rounded-full",children:[
|
|
11
|
-
/* @__PURE__ */e(E,{className:"w-4 h-4 text-green-600 me-1"}),"All Items Stocked"]}),o[36]=L,o[37]=V):V=o[37],o[38]!==L?(Q="allAvailable"===L&&/* @__PURE__ */t("div",{className:"flex items-center shrink mt-3 px-3 py-1 bg-orange-50 text-orange-600 text-xs font-medium rounded-full",children:[
|
|
12
|
-
/* @__PURE__ */e($,{className:"w-4 me-1 h-4 text-orange-600"}),"Available by Special Order"]}),o[38]=L,o[39]=Q):Q=o[39],o[40]!==L?(Y="mixed"===L&&/* @__PURE__ */t("div",{children:[
|
|
13
|
-
/* @__PURE__ */t("div",{className:"flex items-center gap-2 mt-4 text-sm",children:[
|
|
14
|
-
/* @__PURE__ */e("span",{className:"font-bold w-28 text-wrap",children:"Braxton"}),
|
|
15
|
-
/* @__PURE__ */t("span",{className:"flex items-center px-3 py-1 bg-orange-50 text-orange-600 text-xs font-medium rounded-full",children:[
|
|
16
|
-
/* @__PURE__ */e($,{className:"w-4 me-1 h-4 text-orange-600"}),"Special Order"]})]}),
|
|
17
|
-
/* @__PURE__ */t("div",{className:"flex items-center gap-2 mt-4 text-sm",children:[
|
|
18
|
-
/* @__PURE__ */e("span",{className:"font-bold w-28 text-wrap",children:"Juno"}),
|
|
19
|
-
/* @__PURE__ */t("span",{className:"flex items-center px-3 py-1 bg-green-50 text-green-600 text-xs font-medium rounded-full",children:[
|
|
20
|
-
/* @__PURE__ */e(E,{className:"w-4 me-1 h-4 text-green-600"}),"Stocked"]})]})]}),o[40]=L,o[41]=Y):Y=o[41],o[42]!==b?(X=b.map(G),o[42]=b,o[43]=X):X=o[43],o[44]!==X?(ee=/* @__PURE__ */e("div",{className:"flex flex-wrap gap-2 mt-4",children:X}),o[44]=X,o[45]=ee):ee=o[45],o[46]!==T||o[47]!==K||o[48]!==V||o[49]!==Q||o[50]!==Y||o[51]!==ee?(te=/* @__PURE__ */t("div",{className:"flex-1",children:[T,K,V,Q,Y,ee]}),o[46]=T,o[47]=K,o[48]=V,o[49]=Q,o[50]=Y,o[51]=ee,o[52]=te):te=o[52],o[53]!==C?(ae=C("default:select_store"),o[53]=C,o[54]=ae):ae=o[54],o[55]!==z||o[56]!==ae?(le=/* @__PURE__ */e("div",{className:"flex md:flex-col gap-2",children:/* @__PURE__ */e(D,{onClick:z,variant:"default",className:"whitespace-nowrap",children:ae})}),o[55]=z,o[56]=ae,o[57]=le):le=o[57],o[58]!==te||o[59]!==le?(oe=/* @__PURE__ */t("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[te,le]}),o[58]=te,o[59]=le,o[60]=oe):oe=o[60],o[61]!==oe||o[62]!==O||o[63]!==P?(se=/* @__PURE__ */e("div",{className:O,onClick:P,children:oe}),o[61]=oe,o[62]=O,o[63]=P,o[64]=se):se=o[64],se};function G(t){/* @__PURE__ */
|
|
21
|
-
return e("span",{className:"px-3 py-1 bg-primary/10 text-primary text-xs font-medium rounded-full",children:t},t)}function Q(){const l=a(27),{stores:o,location:s,products:r,setStepIndex:n,setSelectedStoreId:c,searchIsLoading:i,searchError:d,baseUrl:m,focusedStoreId:u,setFocusedStoreId:h}=U();let p;l[0]!==c||l[1]!==n?(p=e=>{c(e),n(1)},l[0]=c,l[1]=n,l[2]=p):p=l[2];const f=p;let x,g,v,y,b;return l[3]!==d||l[4]!==i||l[5]!==o?(x=!i&&!d&&0===o.length&&/* @__PURE__ */e(S,{}),l[3]=d,l[4]=i,l[5]=o,l[6]=x):x=l[6],l[7]!==i?(g=i&&/* @__PURE__ */e("div",{className:"flex items-center justify-center h-48",children:/* @__PURE__ */e(k,{})}),l[7]=i,l[8]=g):g=l[8],l[9]!==m||l[10]!==u||l[11]!==f||l[12]!==s||l[13]!==r||l[14]!==d||l[15]!==i||l[16]!==h||l[17]!==o?(v=!i&&!d&&o.map(t=>/* @__PURE__ */e(V,{id:t.id,name:t.retailer_name,placeId:t.place_id,addressLineOne:t.address?.street_line_one,addressLineTwo:t.address?.street_line_two,city:t.address?.city,province:t.address?.province,postalCode:t.address?.postal_code,country:t.address?.country,distance:w(s.latitude,s.longitude,t.address?.latitude,t.address?.longitude),phone:t.phone_number,hours:t.retailer_location_hours,services:[t.store_type],isFocused:u===t.id,handleFocus:h,href:`${m}/${t.id}`,handleSelect:f,locationProducts:t.retailer_location_products,requestedProducts:r},t.id)),l[9]=m,l[10]=u,l[11]=f,l[12]=s,l[13]=r,l[14]=d,l[15]=i,l[16]=h,l[17]=o,l[18]=v):v=l[18],l[19]!==d||l[20]!==i?(y=!i&&d&&/* @__PURE__ */e("div",{className:"text-red-600 text-center",children:"An error occurred while searching for stores. Please try again."}),l[19]=d,l[20]=i,l[21]=y):y=l[21],l[22]!==x||l[23]!==g||l[24]!==v||l[25]!==y?(b=/* @__PURE__ */t("div",{className:"space-y-4",children:[x,g,v,y]}),l[22]=x,l[23]=g,l[24]=v,l[25]=y,l[26]=b):b=l[26],b}const Y=t=>{const l=a(9),{onClose:o,onSuccess:s}=t,{organizationId:r,location:n,selectedStoreId:c,products:i}=U();let d;l[0]!==s?(d=(e,t)=>{s&&s({formValues:e,lead:t})},l[0]=s,l[1]=d):d=l[1];const m=d;let u;return l[2]!==m||l[3]!==n||l[4]!==o||l[5]!==r||l[6]!==i||l[7]!==c?(u=/* @__PURE__ */e(I,{onClose:o,products:i,activityType:"LeadActivity::QuoteRequest",onSuccess:m,location:n,organizationId:r,selectedLocationId:c}),l[2]=m,l[3]=n,l[4]=o,l[5]=r,l[6]=i,l[7]=c,l[8]=u):u=l[8],u};function X(t){const l=a(8),{active:o,children:s,className:r}=t,n=o?"open":"closed";let c,i,d;return l[0]!==r?(c=O("absolute inset-0","transition duration-300 ease-out will-change-transform","data-[state=closed]:pointer-events-none",r),l[0]=r,l[1]=c):c=l[1],l[2]!==s?(i=/* @__PURE__ */e("div",{className:"w-full h-[100%]",children:s}),l[2]=s,l[3]=i):i=l[3],l[4]!==n||l[5]!==c||l[6]!==i?(d=/* @__PURE__ */e("div",{"data-state":n,className:c,children:i}),l[4]=n,l[5]=c,l[6]=i,l[7]=d):d=l[7],d}const ee=l=>{const o=a(31),{onClose:s,onSuccess:r}=l,{stepIndex:n,setStepIndex:c}=U();let i;o[0]!==s?(i=()=>{s&&s()},o[0]=s,o[1]=i):i=o[1];const d=i;let m;o[2]!==r||o[3]!==c?(m=e=>{c(2),r&&r(e)},o[2]=r,o[3]=c,o[4]=m):m=o[4];const u=m,h=0===n;let p,f,x,g;o[5]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(p=O("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6"),o[5]=p):p=o[5],o[6]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(f=/* @__PURE__ */e(H,{}),o[6]=f):f=o[6],o[7]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(x=/* @__PURE__ */t("div",{className:"relative px-1 h-screen overflow-y-scroll",children:[f,
|
|
22
|
-
/* @__PURE__ */e("div",{className:"pb-8",children:/* @__PURE__ */e(C,{apiKey:"AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M",children:/* @__PURE__ */e(K,{})})}),
|
|
23
|
-
/* @__PURE__ */e(Q,{})]}),o[7]=x):x=o[7],o[8]!==h?(g=/* @__PURE__ */e(X,{active:h,className:p,children:x}),o[8]=h,o[9]=g):g=o[9];const v=1===n;let y,b,N,_;o[10]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(y=O("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6","flex items-center"),o[10]=y):y=o[10],o[11]!==c?(b=()=>c(0),o[11]=c,o[12]=b):b=o[12],o[13]!==u||o[14]!==b?(N=/* @__PURE__ */e("div",{className:"px-1",children:/* @__PURE__ */e(Y,{onClose:b,onSuccess:u})}),o[13]=u,o[14]=b,o[15]=N):N=o[15],o[16]!==N||o[17]!==v?(_=/* @__PURE__ */e(X,{active:v,className:y,children:N}),o[16]=N,o[17]=v,o[18]=_):_=o[18];const S=2===n;let w,k,I,A,j,z;return o[19]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(w=O("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6","flex items-center"),o[19]=w):w=o[19],o[20]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(k=/* @__PURE__ */e("h2",{className:"text-2xl font-semibold mb-4",children:"Thank you!"}),I=/* @__PURE__ */e("p",{className:"mb-8",children:"Your quote request has been submitted successfully. We will get back to you shortly."}),o[20]=k,o[21]=I):(k=o[20],I=o[21]),o[22]!==d?(A=/* @__PURE__ */e("div",{className:"px-1",children:/* @__PURE__ */t("div",{className:"text-center py-20 px-4",children:[k,I,
|
|
24
|
-
/* @__PURE__ */e(L,{onClick:d,children:"Close"})]})}),o[22]=d,o[23]=A):A=o[23],o[24]!==S||o[25]!==A?(j=/* @__PURE__ */e(X,{active:S,className:w,children:A}),o[24]=S,o[25]=A,o[26]=j):j=o[26],o[27]!==_||o[28]!==j||o[29]!==g?(z=/* @__PURE__ */e("div",{className:"relative overflow-hidden h-[100%] py-1",children:/* @__PURE__ */t("div",{className:"h-[100%] relative",children:[g,_,j]})}),o[27]=_,o[28]=j,o[29]=g,o[30]=z):z=o[30],z},te=t=>{const l=a(17),{organizationId:o,products:s,locale:r,onClose:n,onSuccess:c}=t;let i,d,m,u,h;return l[0]!==r?(i={lng:r},l[0]=r,l[1]=i):i=l[1],l[2]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(d={height:"100%"},l[2]=d):d=l[2],l[3]!==r||l[4]!==n||l[5]!==c||l[6]!==o||l[7]!==s?(m=/* @__PURE__ */e("div",{className:"cc",style:d,children:/* @__PURE__ */e(ee,{organizationId:o,products:s,locale:r,onClose:n,onSuccess:c})}),l[3]=r,l[4]=n,l[5]=c,l[6]=o,l[7]=s,l[8]=m):m=l[8],l[9]!==r||l[10]!==o||l[11]!==s||l[12]!==m?(u=/* @__PURE__ */e(q,{organizationId:o,products:s,locale:r,children:m}),l[9]=r,l[10]=o,l[11]=s,l[12]=m,l[13]=u):u=l[13],l[14]!==i||l[15]!==u?(h=/* @__PURE__ */e(P,{options:i,children:u}),l[14]=i,l[15]=u,l[16]=h):h=l[16],h};export{te as default};
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import"react";import{Q as s,u as c,a as o,b as l,c as n,P as r,d as i}from"./index-DIIxVsLf.js";import{L as d,a as m}from"./translations-WfjA8013.js";import{A as h,B as p}from"./index-Bl_B7cwM.js";const y=s=>{const d=t(31),{onClose:y,onSuccess:x}=s,{stepIndex:u,setStepIndex:f}=c();let v;d[0]!==y?(v=()=>{y&&y()},d[0]=y,d[1]=v):v=d[1];const b=v;let _;d[2]!==x||d[3]!==f?(_=e=>{f(2),x&&x(e)},d[2]=x,d[3]=f,d[4]=_):_=d[4];const N=_,S=0===u;let I,g,j,z;d[5]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(I=m("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6"),d[5]=I):I=d[5],d[6]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(g=/* @__PURE__ */e(o,{}),d[6]=g):g=d[6],d[7]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(j=/* @__PURE__ */a("div",{className:"relative px-1 h-screen overflow-y-scroll",children:[g,
|
|
2
|
+
/* @__PURE__ */e("div",{className:"pb-8",children:/* @__PURE__ */e(h,{apiKey:"AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M",children:/* @__PURE__ */e(l,{})})}),
|
|
3
|
+
/* @__PURE__ */e(n,{})]}),d[7]=j):j=d[7],d[8]!==S?(z=/* @__PURE__ */e(r,{active:S,className:I,children:j}),d[8]=S,d[9]=z):z=d[9];const C=1===u;let k,q,w,A;d[10]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(k=m("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6","flex items-center"),d[10]=k):k=d[10],d[11]!==f?(q=()=>f(0),d[11]=f,d[12]=q):q=d[12],d[13]!==N||d[14]!==q?(w=/* @__PURE__ */e("div",{className:"px-1",children:/* @__PURE__ */e(i,{onClose:q,onSuccess:N})}),d[13]=N,d[14]=q,d[15]=w):w=d[15],d[16]!==w||d[17]!==C?(A=/* @__PURE__ */e(r,{active:C,className:k,children:w}),d[16]=w,d[17]=C,d[18]=A):A=d[18];const W=2===u;let E,H,B,D,J,K;return d[19]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(E=m("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6","flex items-center"),d[19]=E):E=d[19],d[20]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(H=/* @__PURE__ */e("h2",{className:"text-2xl font-semibold mb-4",children:"Thank you!"}),B=/* @__PURE__ */e("p",{className:"mb-8",children:"Your quote request has been submitted successfully. We will get back to you shortly."}),d[20]=H,d[21]=B):(H=d[20],B=d[21]),d[22]!==b?(D=/* @__PURE__ */e("div",{className:"px-1",children:/* @__PURE__ */a("div",{className:"text-center py-20 px-4",children:[H,B,
|
|
4
|
+
/* @__PURE__ */e(p,{onClick:b,children:"Close"})]})}),d[22]=b,d[23]=D):D=d[23],d[24]!==W||d[25]!==D?(J=/* @__PURE__ */e(r,{active:W,className:E,children:D}),d[24]=W,d[25]=D,d[26]=J):J=d[26],d[27]!==A||d[28]!==J||d[29]!==z?(K=/* @__PURE__ */e("div",{className:"relative overflow-hidden h-[100%] py-1",children:/* @__PURE__ */a("div",{className:"h-[100%] relative",children:[z,A,J]})}),d[27]=A,d[28]=J,d[29]=z,d[30]=K):K=d[30],K},x=a=>{const c=t(17),{organizationId:o,products:l,locale:n,onClose:r,onSuccess:i}=a;let m,h,p,x,u;return c[0]!==n?(m={lng:n},c[0]=n,c[1]=m):m=c[1],c[2]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(h={height:"100%"},c[2]=h):h=c[2],c[3]!==n||c[4]!==r||c[5]!==i||c[6]!==o||c[7]!==l?(p=/* @__PURE__ */e("div",{className:"cc",style:h,children:/* @__PURE__ */e(y,{organizationId:o,products:l,locale:n,onClose:r,onSuccess:i})}),c[3]=n,c[4]=r,c[5]=i,c[6]=o,c[7]=l,c[8]=p):p=c[8],c[9]!==n||c[10]!==o||c[11]!==l||c[12]!==p?(x=/* @__PURE__ */e(s,{organizationId:o,products:l,locale:n,children:p}),c[9]=n,c[10]=o,c[11]=l,c[12]=p,c[13]=x):x=c[13],c[14]!==m||c[15]!==x?(u=/* @__PURE__ */e(d,{options:m,children:x}),c[14]=m,c[15]=x,c[16]=u):u=c[16],u};export{x as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{c as t}from"react/compiler-runtime";import{useState as r}from"react";import{Q as i,u as o,a as c,b as s,c as l,P as d,d as n}from"./index-DIIxVsLf.js";import{L as m,a as p}from"./translations-WfjA8013.js";import{B as u,A as x}from"./index-Bl_B7cwM.js";import"@radix-ui/react-accessible-icon";import"@radix-ui/react-accordion";import"@radix-ui/react-alert-dialog";import"@radix-ui/react-aspect-ratio";import"@radix-ui/react-avatar";import"@radix-ui/react-checkbox";import"@radix-ui/react-collapsible";import"@radix-ui/react-context-menu";import*as h from"@radix-ui/react-dialog";import"@radix-ui/react-direction";import"@radix-ui/react-dropdown-menu";import"@radix-ui/react-form";import"@radix-ui/react-hover-card";import"@radix-ui/react-label";import"@radix-ui/react-menubar";import"@radix-ui/react-navigation-menu";import"@radix-ui/react-one-time-password-field";import"@radix-ui/react-password-toggle-field";import"@radix-ui/react-popover";import"@radix-ui/react-portal";import"@radix-ui/react-progress";import"@radix-ui/react-radio-group";import"@radix-ui/react-scroll-area";import"@radix-ui/react-select";import"@radix-ui/react-separator";import"@radix-ui/react-slider";import"@radix-ui/react-slot";import"@radix-ui/react-switch";import"@radix-ui/react-tabs";import"@radix-ui/react-toast";import"@radix-ui/react-toggle";import"@radix-ui/react-toggle-group";import"@radix-ui/react-toolbar";import"@radix-ui/react-tooltip";import"@radix-ui/react-visually-hidden";const y=r=>{const i=t(32),{onClose:m,onSuccess:h}=r,{stepIndex:y,setStepIndex:f}=o();let b;i[0]!==m?(b=()=>{m&&m()},i[0]=m,i[1]=b):b=i[1];const g=b;let v;i[2]!==h||i[3]!==f?(v=e=>{f(2),h&&h(e)},i[2]=h,i[3]=f,i[4]=v):v=i[4];const _=v;let N;i[5]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(N={maxHeight:"80vh"},i[5]=N):N=i[5];const S=0===y;let w,C,I,j;i[6]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(w=p("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6"),i[6]=w):w=i[6],i[7]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(C=/* @__PURE__ */e(c,{}),i[7]=C):C=i[7],i[8]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(I=/* @__PURE__ */a("div",{className:"relative px-1 h-[100%] overflow-y-scroll",children:[C,
|
|
2
|
+
/* @__PURE__ */e("div",{className:"pb-8",children:/* @__PURE__ */e(x,{apiKey:"AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M",children:/* @__PURE__ */e(s,{})})}),
|
|
3
|
+
/* @__PURE__ */e(l,{})]}),i[8]=I):I=i[8],i[9]!==S?(j=/* @__PURE__ */e(d,{active:S,className:w,children:I}),i[9]=S,i[10]=j):j=i[10];const k=1===y;let z,K,q,A;i[11]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(z=p("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6","flex items-center"),i[11]=z):z=i[11],i[12]!==f?(K=()=>f(0),i[12]=f,i[13]=K):K=i[13],i[14]!==_||i[15]!==K?(q=/* @__PURE__ */e("div",{className:"px-1",children:/* @__PURE__ */e(n,{onClose:K,onSuccess:_})}),i[14]=_,i[15]=K,i[16]=q):q=i[16],i[17]!==q||i[18]!==k?(A=/* @__PURE__ */e(d,{active:k,className:z,children:q}),i[17]=q,i[18]=k,i[19]=A):A=i[19];const H=2===y;let W,E,O,Q,R,T;return i[20]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(W=p("data-[state=open]:opacity-100 data-[state=open]:translate-x-0","data-[state=closed]:opacity-0 data-[state=closed]:-translate-x-6","flex items-center"),i[20]=W):W=i[20],i[21]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(E=/* @__PURE__ */e("h2",{className:"text-2xl font-semibold mb-4",children:"Thank you!"}),O=/* @__PURE__ */e("p",{className:"mb-8",children:"Your quote request has been submitted successfully. We will get back to you shortly."}),i[21]=E,i[22]=O):(E=i[21],O=i[22]),i[23]!==g?(Q=/* @__PURE__ */e("div",{className:"px-1",children:/* @__PURE__ */a("div",{className:"text-center py-20 px-4",children:[E,O,
|
|
4
|
+
/* @__PURE__ */e(u,{onClick:g,children:"Close"})]})}),i[23]=g,i[24]=Q):Q=i[24],i[25]!==H||i[26]!==Q?(R=/* @__PURE__ */e(d,{active:H,className:W,children:Q}),i[25]=H,i[26]=Q,i[27]=R):R=i[27],i[28]!==A||i[29]!==R||i[30]!==j?(T=/* @__PURE__ */e("div",{className:"relative overflow-hidden h-[100%] py-1",style:N,children:/* @__PURE__ */a("div",{className:"h-[100%] relative",children:[j,A,R]})}),i[28]=A,i[29]=R,i[30]=j,i[31]=T):T=i[31],T},f=o=>{const c=t(26),{organizationId:s,products:l,productKey:d,locale:n,onClose:p,onSuccess:x}=o,[f,b]=r(!1);let g;c[0]!==p?(g=()=>{b(!1),p&&p()},c[0]=p,c[1]=g):g=c[1];const v=g;let _,N,S,w,C,I,j,k;return c[2]!==n?(_={lng:n},c[2]=n,c[3]=_):_=c[3],c[4]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(N={height:"100%"},c[4]=N):N=c[4],c[5]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(S=/* @__PURE__ */e(h.Trigger,{asChild:!0,children:/* @__PURE__ */e(u,{children:"Get a Quote"})}),w=/* @__PURE__ */e(h.Overlay,{className:"fixed inset-0 bg-black/50"}),c[5]=S,c[6]=w):(S=c[5],w=c[6]),c[7]!==v||c[8]!==n||c[9]!==x||c[10]!==s||c[11]!==d||c[12]!==l?(C=/* @__PURE__ */e(h.Content,{className:"fixed top-1/2 left-1/2 max-h-[85vh] w-[90vw] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6 shadow-lg focus:outline-none",children:/* @__PURE__ */e("div",{className:"h-screen",children:/* @__PURE__ */e(y,{organizationId:s,products:l,productKey:d,locale:n,onClose:v,onSuccess:x})})}),c[7]=v,c[8]=n,c[9]=x,c[10]=s,c[11]=d,c[12]=l,c[13]=C):C=c[13],c[14]!==f||c[15]!==C?(I=/* @__PURE__ */e("div",{className:"cc",style:N,children:/* @__PURE__ */a(h.Root,{open:f,onOpenChange:b,children:[S,w,C]})}),c[14]=f,c[15]=C,c[16]=I):I=c[16],c[17]!==n||c[18]!==s||c[19]!==d||c[20]!==l||c[21]!==I?(j=/* @__PURE__ */e(i,{organizationId:s,products:l,locale:n,productKey:d,children:I}),c[17]=n,c[18]=s,c[19]=d,c[20]=l,c[21]=I,c[22]=j):j=c[22],c[23]!==_||c[24]!==j?(k=/* @__PURE__ */e(m,{options:_,children:j}),c[23]=_,c[24]=j,c[25]=k):k=c[25],k};export{f as default};
|
package/dist/Store.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{c as r}from"react/compiler-runtime";import{Slot as n}from"@radix-ui/react-slot";import{c as o,a as l,b as s,M as i,C as c,P as d,B as m,S as u,I as p,L as f}from"./translations-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{c as r}from"react/compiler-runtime";import{Slot as n}from"@radix-ui/react-slot";import{c as o,a as l,b as s,M as i,C as c,P as d,B as m,S as u,I as p,L as f}from"./translations-WfjA8013.js";import{useTranslation as h}from"react-i18next";import*as g from"react";import{createContext as b,useState as y,useEffect as x,useContext as v}from"react";import"@radix-ui/react-collapsible";import{N as _}from"./navigation-QgfKnxTJ.js";const N=o("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),w=o("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),S=o("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]),M=o("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]),D=s("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90"}},defaultVariants:{variant:"default"}});function T(t){const a=r(12);let o,s,i,c;a[0]!==t?(({className:o,variant:c,asChild:i,...s}=t),a[0]=t,a[1]=o,a[2]=s,a[3]=i,a[4]=c):(o=a[1],s=a[2],i=a[3],c=a[4]);const d=void 0!==i&&i?n:"span";let m,u;return a[5]!==o||a[6]!==c?(m=l(D({variant:c}),o),a[5]=o,a[6]=c,a[7]=m):m=a[7],a[8]!==d||a[9]!==s||a[10]!==m?(u=/* @__PURE__ */e(d,{"data-slot":"badge",className:m,...s}),a[8]=d,a[9]=s,a[10]=m,a[11]=u):u=a[11],u}const k=b(),z=({organizationId:t,id:a,locale:r,baseUrl:n="/retailers",initialData:o=null,children:l})=>{const[s,i]=y(o?.company_retailer_location||null);x(()=>{!async function(){if(a)try{const e=await fetch(`https://api.colabcommerce.com/widget_api/company_retailer_locations/${a}`);if(!e.ok)throw new Error(`Error fetching retailer: ${e.statusText}`);const t=await e.json();i(t?.company_retailer_location||null)}catch(e){i(null)}else i(null)}()},[t,a,n]);const c={organizationId:t,id:a,locale:r,baseUrl:n,store:s};/* @__PURE__ */
|
|
2
2
|
return e(k.Provider,{value:c,children:l})},$=()=>{const e=v(k);if(void 0===e)throw new Error("useStore must be used within a StoreProvider");return e},I=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function L(e){return[e.day,e]}function A(e){return e?.timezone}function C(e){if(!e)return null;if(e.open_at){const t=new Date(e.open_at);return U(t)?t:null}return"number"==typeof e.open_at_hour&&"number"==typeof e.open_at_minute?F({storeHour:e.open_at_hour,storeMinute:e.open_at_minute,utcOffsetMinute:e.utc_offset_minute}):null}function j(e,t){if(!e)return null;if("number"!=typeof e.close_at_hour||"number"!=typeof e.close_at_minute)return null;let a=F({storeHour:e.close_at_hour,storeMinute:e.close_at_minute,utcOffsetMinute:e.utc_offset_minute,anchorDate:t||void 0});return a&&t?(a.getTime()<=t.getTime()&&(a=new Date(a.getTime()+864e5)),a):a}function F({storeHour:e,storeMinute:t,utcOffsetMinute:a,anchorDate:r}){const n=r?new Date(r):/* @__PURE__ */new Date,o=n.getFullYear(),l=n.getMonth(),s=n.getDate(),i=Date.UTC(o,l,s,e,t,0)-60*a*1e3,c=new Date(i);return U(c)?c:null}function U(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function O(e){return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit"}).format(e).replace(":00","").replace(" AM","am").replace(" PM","pm")}function H(){const a=r(33),{t:n}=h(),{store:o}=$(),l=o?.retailer_location_hours;let s;a[0]!==n||a[1]!==l?(s={hours:l,t:n},a[0]=n,a[1]=l,a[2]=s):s=a[2];const{computed:d}=function(e){const t=r(17),{hours:a,openingSoonMinutes:n,closingSoonMinutes:o,t:l}=e,s=void 0===n?60:n,i=void 0===o?60:o;let c,d,m,u;if(t[0]!==i||t[1]!==a||t[2]!==s||t[3]!==l){const e=Array.isArray(a)?a:[],r=e.find(A)?.timezone||Intl.DateTimeFormat().resolvedOptions().timeZone,n=/* @__PURE__ */new Date,o=function(e,t){switch(new Intl.DateTimeFormat("en-US",{weekday:"short",timeZone:t}).format(e)){case"Sun":return 0;case"Mon":return 1;case"Tue":return 2;case"Wed":return 3;case"Thu":return 4;case"Fri":return 5;case"Sat":return 6;default:return new Date(e).getDay()}}(n,r);d=function({now:e,today:t,openingSoonMinutes:a,closingSoonMinutes:r,t:n}){if(!t||!t.open)return{label:n("default:closed"),detail:""};const o=C(t),l=j(t,o);if(!o||!l)return{label:n("default:open"),detail:""};const s=e.getTime(),i=o.getTime(),c=l.getTime(),d=i-60*a*1e3,m=c-60*r*1e3,u=n("default:opens_at",{time:O(o)}),p=n("default:closes_at",{time:O(l)});return s<i?s>=d?{label:n("default:opening_soon"),detail:u}:{label:n("default:closed"),detail:u}:s>=i&&s<c?s>=m?{label:n("default:closing_soon"),detail:p}:{label:n("default:open"),detail:p}:{label:n("default:closed"),detail:u}}({now:n,today:e.find(e=>e?.day===o),openingSoonMinutes:s,closingSoonMinutes:i,t:l});const p=[1,2,3,4,5,6,0],f=new Map(e.map(L));c=p.map(e=>{const t=f.get(e),a=l(`default:${I[e].toLowerCase()}`),r=e===o;let n=l("default:closed");if(t?.open){const e=C(t),a=j(t,e);n=e&&a?`${O(e)} - ${O(a)}`:l("default:open")}return{dayIdx:e,label:a,text:n,isToday:r}}),u=l,m=d.label.toLowerCase().replace(" ","_"),t[0]=i,t[1]=a,t[2]=s,t[3]=l,t[4]=c,t[5]=d,t[6]=m,t[7]=u}else c=t[4],d=t[5],m=t[6],u=t[7];const p=`default:${m}`;let f,h;t[8]!==u||t[9]!==p?(f=u(p),t[8]=u,t[9]=p,t[10]=f):f=t[10],t[11]!==c||t[12]!==d.detail||t[13]!==f?(h={statusLabel:f,statusDetail:d.detail,rows:c},t[11]=c,t[12]=d.detail,t[13]=f,t[14]=h):h=t[14];const g=h;let b;return t[15]!==g?(b={computed:g},t[15]=g,t[16]=b):b=t[16],b}(s);let m;a[3]!==o?.store_type?(m=o?.store_type?.toLowerCase(),a[3]=o?.store_type,a[4]=m):m=a[4];const u=`default:store.types.${m}`;let p,f;a[5]!==n||a[6]!==u?(p=n(u),a[5]=n,a[6]=u,a[7]=p):p=a[7],a[8]!==p?(f=/* @__PURE__ */e("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:/* @__PURE__ */e(T,{variant:"secondary",className:"text-sm",children:p})}),a[8]=p,a[9]=f):f=a[9];const g=o?.retailer_name;let b,y;a[10]!==g?(b=/* @__PURE__ */e("h1",{className:"text-4xl lg:text-5xl font-bold mb-4 text-balance",children:g}),a[10]=g,a[11]=b):b=a[11],a[12]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(y=/* @__PURE__ */e(i,{className:"w-4 h-4"}),a[12]=y):y=a[12];const x=o?.address?.city,v=o?.address?.province;let _,N;a[13]!==v||a[14]!==x?(_=/* @__PURE__ */t("div",{className:"flex items-center gap-2 text-muted-foreground",children:[y,
|
|
3
3
|
/* @__PURE__ */t("span",{className:"text-sm",children:[x,", ",v]})]}),a[13]=v,a[14]=x,a[15]=_):_=a[15],a[16]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(N=/* @__PURE__ */e(c,{className:"w-4 h-4"}),a[16]=N):N=a[16];const w="text-sm font-medium "+(d.statusLabel===n("default:open")?"text-green-600":"text-red-600");let S,M;a[17]!==d.statusLabel||a[18]!==w?(S=/* @__PURE__ */t("div",{className:"flex items-center gap-2 text-muted-foreground",children:[N,
|
|
4
4
|
/* @__PURE__ */e("span",{className:w,children:d.statusLabel})]}),a[17]=d.statusLabel,a[18]=w,a[19]=S):S=a[19],a[20]!==_||a[21]!==S?(M=/* @__PURE__ */t("div",{className:"flex flex-wrap items-center gap-4 mb-6",children:[_,S]}),a[20]=_,a[21]=S,a[22]=M):M=a[22];const D=o?.retailer_name||"our store";let k,z,F;return a[23]!==n||a[24]!==D?(k=n("default:store_romance",{name:D}),a[23]=n,a[24]=D,a[25]=k):k=a[25],a[26]!==k?(z=/* @__PURE__ */e("p",{className:"text-lg text-muted-foreground leading-relaxed mb-6",children:k}),a[26]=k,a[27]=z):z=a[27],a[28]!==M||a[29]!==z||a[30]!==f||a[31]!==b?(F=/* @__PURE__ */e("section",{className:"bg-gradient-to-b from-primary/5 to-background py-12 lg:py-16",children:/* @__PURE__ */e("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:/* @__PURE__ */t("div",{className:"max-w-4xl",children:[f,b,M,z]})})}),a[28]=M,a[29]=z,a[30]=f,a[31]=b,a[32]=F):F=a[32],F}function P(t){const a=r(8);let n,o,s,i;return a[0]!==t?(({className:n,...o}=t),a[0]=t,a[1]=n,a[2]=o):(n=a[1],o=a[2]),a[3]!==n?(s=l("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),a[3]=n,a[4]=s):s=a[4],a[5]!==o||a[6]!==s?(i=/* @__PURE__ */e("div",{"data-slot":"card",className:s,...o}),a[5]=o,a[6]=s,a[7]=i):i=a[7],i}const W=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function E({hours:r,openingSoonMinutes:n=60,closingSoonMinutes:o=60,className:l=""}){const{t:s}=h(),[i,c]=g.useState(!1),d=g.useMemo(()=>{const e=Array.isArray(r)?r:[],t=e.find(e=>e?.timezone)?.timezone||Intl.DateTimeFormat().resolvedOptions().timeZone,a=/* @__PURE__ */new Date,l=function(e,t){switch(new Intl.DateTimeFormat("en-US",{weekday:"short",timeZone:t}).format(e)){case"Sun":return 0;case"Mon":return 1;case"Tue":return 2;case"Wed":return 3;case"Thu":return 4;case"Fri":return 5;case"Sat":return 6;default:return new Date(e).getDay()}}(a,t),i=function({now:e,today:t,openingSoonMinutes:a,closingSoonMinutes:r,t:n}){if(!t||!t.open)return{label:n("default:closed"),detail:""};const o=V(t),l=Z(t,o);if(!o||!l)return{label:n("default:open"),detail:""};const s=e.getTime(),i=o.getTime(),c=l.getTime(),d=i-60*a*1e3,m=c-60*r*1e3,u=n("default:opens_at",{time:G(o)}),p=n("default:closes_at",{time:G(l)});return s<i?s>=d?{label:n("default:opening_soon"),detail:u}:{label:n("default:closed"),detail:u}:s>=i&&s<c?s>=m?{label:n("default:closing_soon"),detail:p}:{label:n("default:open"),detail:p}:{label:n("default:closed"),detail:u}}({now:a,today:e.find(e=>e?.day===l),openingSoonMinutes:n,closingSoonMinutes:o,t:s}),c=new Map(e.map(e=>[e.day,e])),d=[1,2,3,4,5,6,0].map(e=>{const t=c.get(e),a=s(`default:${W[e].toLowerCase()}`),r=e===l;let n=s("default:closed");if(t?.open){const e=V(t),a=Z(t,e);n=e&&a?`${G(e)} - ${G(a)}`:s("default:open")}return{dayIdx:e,label:a,text:n,isToday:r}});return{statusLabel:s(`default:${i.label.toLowerCase().replace(" ","_")}`),statusDetail:i.detail,rows:d}},[r,n,o]);/* @__PURE__ */
|
package/dist/StoreLocator.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{c as
|
|
2
|
-
/* @__PURE__ */e("p",{className:"text-sm text-left text-muted-foreground",children:[
|
|
3
|
-
/* @__PURE__ */e("p",{className:"text-sm text-left text-muted-foreground mb-4",children:[
|
|
4
|
-
/* @__PURE__ */e("div",{className:"flex flex-
|
|
5
|
-
/* @__PURE__ */e(
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{c as a}from"react/compiler-runtime";import{u as l,S as i}from"./store-locator-Cu5fUiVm.js";import{a as n,b as o,c as s,d,M as c,u as m,I as u,B as h,h as p,i as g,j as f,k as x,C as b,U as v,l as y,n as N,m as _,S as w,e as S,f as k,L as C,A as M}from"./index-Bl_B7cwM.js";import{useState as B,useEffect as I,useRef as z,useId as j}from"react";import{c as D,B as A,M as L,S as q,I as P,a as O,P as $,C as T,L as U}from"./translations-WfjA8013.js";import{N as W}from"./navigation-QgfKnxTJ.js";import*as E from"@radix-ui/react-popover";import*as R from"@radix-ui/react-scroll-area";import{useTranslation as F}from"react-i18next";import"@radix-ui/react-accessible-icon";import"@radix-ui/react-accordion";import"@radix-ui/react-alert-dialog";import"@radix-ui/react-aspect-ratio";import"@radix-ui/react-avatar";import"@radix-ui/react-checkbox";import"@radix-ui/react-collapsible";import"@radix-ui/react-context-menu";import*as H from"@radix-ui/react-dialog";import"@radix-ui/react-direction";import"@radix-ui/react-dropdown-menu";import"@radix-ui/react-form";import"@radix-ui/react-hover-card";import"@radix-ui/react-label";import"@radix-ui/react-menubar";import"@radix-ui/react-navigation-menu";import"@radix-ui/react-one-time-password-field";import"@radix-ui/react-password-toggle-field";import"@radix-ui/react-portal";import"@radix-ui/react-progress";import"@radix-ui/react-radio-group";import"@radix-ui/react-select";import"@radix-ui/react-separator";import"@radix-ui/react-slider";import"@radix-ui/react-slot";import"@radix-ui/react-switch";import"@radix-ui/react-tabs";import"@radix-ui/react-toast";import"@radix-ui/react-toggle";import"@radix-ui/react-toggle-group";import"@radix-ui/react-toolbar";import"@radix-ui/react-tooltip";import"@radix-ui/react-visually-hidden";const V=D("message-square-text",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]),Z=D("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]]),K=r=>{const l=a(25),{store:i,isSelected:d,onClick:c}=r,[,m]=B(!1),[u,h]=n();let p;l[0]!==c||l[1]!==i.id?(p=()=>{c&&c(i.id)},l[0]=c,l[1]=i.id,l[2]=p):p=l[2];const g=p;let f;l[3]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(f=()=>m(!1),l[3]=f):f=l[3];const x=f,b=d,v=1*i.address?.latitude,y=1*i.address?.longitude;let N;l[4]!==v||l[5]!==y?(N={lat:v,lng:y},l[4]=v,l[5]=y,l[6]=N):N=l[6];const _="w-8 h-8 hover:cursor-pointer "+(d?"text-primary fill-white z-10":"z-1 fill-white text-muted-foreground");let w,S,k;return l[7]!==_?(w=/* @__PURE__ */t(L,{className:_,size:32}),l[7]=_,l[8]=w):w=l[8],l[9]!==h||l[10]!==b||l[11]!==i.address?.city||l[12]!==i.address?.postal_code||l[13]!==i.address?.province||l[14]!==i.address?.street_line_one||l[15]!==i.address?.street_line_two||l[16]!==i.retailer_name?(S=b&&/* @__PURE__ */e(o,{anchor:h,headerContent:/* @__PURE__ */t("h3",{className:"cc-iw-title font-bold text-sm align-center text-left mb-2",style:{color:"#111827"},children:i.retailer_name}),onClose:x,children:[
|
|
2
|
+
/* @__PURE__ */e("p",{className:"text-sm text-left text-muted-foreground",children:[i.address?.street_line_one,i.address?.street_line_two?`, ${i.address?.street_line_two}`:""]}),
|
|
3
|
+
/* @__PURE__ */e("p",{className:"text-sm text-left text-muted-foreground mb-4",children:[i.address?.city,", ",i.address?.province," ",i.address?.postal_code]}),
|
|
4
|
+
/* @__PURE__ */e("div",{className:"flex md:flex-col gap-2",children:[
|
|
5
|
+
/* @__PURE__ */e(A,{className:"flex-1 md:flex-none inline-flex items-center justify-center gap-2 rounded-md bg-primary text-primary-foreground text-sm font-medium h-8 px-4 hover:bg-primary/90 transition-colors",size:"sm",children:[
|
|
6
6
|
/* @__PURE__ */t(W,{className:"w-4 h-4"}),"Directions"]}),
|
|
7
|
-
/* @__PURE__ */t(
|
|
8
|
-
/* @__PURE__ */t("span",{className:"text-primary",children:
|
|
9
|
-
/* @__PURE__ */t(
|
|
10
|
-
/* @__PURE__ */t("div",{className:"text-sm text-left font-medium leading-tight",children:
|
|
7
|
+
/* @__PURE__ */t(A,{variant:"outline",className:"flex-1 md:flex-none bg-transparent",size:"sm",children:"View Details"})]})]}),l[9]=h,l[10]=b,l[11]=i.address?.city,l[12]=i.address?.postal_code,l[13]=i.address?.province,l[14]=i.address?.street_line_one,l[15]=i.address?.street_line_two,l[16]=i.retailer_name,l[17]=S):S=l[17],l[18]!==g||l[19]!==u||l[20]!==i.name||l[21]!==N||l[22]!==w||l[23]!==S?(k=/* @__PURE__ */e(s,{position:N,ref:u,title:i.name,onClick:g,children:[w,S]}),l[18]=g,l[19]=u,l[20]=i.name,l[21]=N,l[22]=w,l[23]=S,l[24]=k):k=l[24],k},Y=()=>{const r=a(41),{location:i,stores:n,selectedStoreId:o,setSelectedStoreId:s}=l(),m=d();let u;r[0]!==m?(u=()=>{if(!m)return;const e=m.getZoom();m.setZoom(e+1)},r[0]=m,r[1]=u):u=r[1];const h=u;let p;r[2]!==m?(p=()=>{if(!m)return;const e=m.getZoom();m.setZoom(e-1)},r[2]=m,r[3]=p):p=r[3];const g=p;let f,x,b,v,y;r[4]!==i||r[5]!==m?(f=()=>{m&&i?.latitude&&i?.longitude&&(m.panTo({lat:i.latitude,lng:i.longitude}),m.setZoom(9))},x=[i,m],r[4]=i,r[5]=m,r[6]=f,r[7]=x):(f=r[6],x=r[7]),I(f,x),r[8]!==m||r[9]!==o||r[10]!==n?(b=()=>{if(!m||!o)return;const e=n.find(e=>e.id===o);e&&e.address&&m.panTo({lat:1*e.address.latitude,lng:1*e.address.longitude})},v=[o,n,m],r[8]=m,r[9]=o,r[10]=n,r[11]=b,r[12]=v):(b=r[11],v=r[12]),I(b,v),r[13]!==s?(y=e=>{s(e)},r[13]=s,r[14]=y):y=r[14];const N=y;let _,w,S,k,C,M,B,z,j,D,A;if(r[15]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(_={width:"100%",height:"600px"},w={lat:22.54992,lng:0},r[15]=_,r[16]=w):(_=r[15],w=r[16]),r[17]!==N||r[18]!==o||r[19]!==n){let e;r[21]!==N||r[22]!==o?(e=e=>/* @__PURE__ */t(K,{store:e,isSelected:o===e.id,onClick:N},e.id),r[21]=N,r[22]=o,r[23]=e):e=r[23],S=n.map(e),r[17]=N,r[18]=o,r[19]=n,r[20]=S}else S=r[20];return r[24]!==S?(k=/* @__PURE__ */t("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-primary/5 to-muted",children:/* @__PURE__ */t("div",{className:"text-center w-full",children:/* @__PURE__ */t(c,{style:_,defaultCenter:w,defaultZoom:3,gestureHandling:"greedy",disableDefaultUI:!0,mapId:"b1e4f5f5f8c7e2d9",children:S})})}),r[24]=S,r[25]=k):k=r[25],r[26]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(C=/* @__PURE__ */t("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),r[26]=C):C=r[26],r[27]!==h?(M=/* @__PURE__ */t("button",{className:"bg-card border shadow-md rounded-lg p-2 hover:bg-accent transition-colors",onClick:h,children:C}),r[27]=h,r[28]=M):M=r[28],r[29]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(B=/* @__PURE__ */t("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 12H4"})}),r[29]=B):B=r[29],r[30]!==g?(z=/* @__PURE__ */t("button",{className:"bg-card border shadow-md rounded-lg p-2 hover:bg-accent transition-colors",onClick:g,children:B}),r[30]=g,r[31]=z):z=r[31],r[32]!==M||r[33]!==z?(j=/* @__PURE__ */e("div",{className:"absolute top-4 right-4 flex flex-col gap-2",children:[M,z]}),r[32]=M,r[33]=z,r[34]=j):j=r[34],r[35]!==n.length?(D=/* @__PURE__ */e("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 bg-card border shadow-lg rounded-full px-4 py-2 text-sm font-medium",children:[
|
|
8
|
+
/* @__PURE__ */t("span",{className:"text-primary",children:n.length})," stores found"]}),r[35]=n.length,r[36]=D):D=r[36],r[37]!==k||r[38]!==j||r[39]!==D?(A=/* @__PURE__ */t("div",{className:"relative",children:/* @__PURE__ */e("div",{className:"bg-muted rounded-xl overflow-hidden border shadow-md h-[600px] lg:sticky lg:top-24",children:[k,j,D]})}),r[37]=k,r[38]=j,r[39]=D,r[40]=A):A=r[40],A};function J(e){return e?.label??e?.description??e?.text??e?.placePrediction?.text?.text??e?.placePrediction?.structuredFormat?.mainText?.text??""}function G(){const r=a(93),{t:i}=F(),[n,o]=B(""),[s,d]=B(!1),[c,p]=B(!1),[g,f]=B(-1),{location:x,searchRadius:b,setSearchRadius:v,setSearchLocation:y,setUseLocationType:N,Locate:_}=l();let w,S,k;r[0]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(w={lat:37.7937,lng:-122.3965},r[0]=w):w=r[0],r[1]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(S=["locality","postal_code"],r[1]=S):S=r[1],r[2]!==n?(k={query:n,apiKey:"AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M",center:w,radiusMeters:1e4,types:S},r[2]=n,r[3]=k):k=r[3];const{results:C,isLoading:M,error:D}=m(k);let A;r[4]!==C?(A=Array.isArray(C)?C:[],r[4]=C,r[5]=A):A=r[5];const P=A,O=z(null),$=j(),T=g>=0?`${$}-opt-${g}`:void 0;let U,W,H;r[6]!==M||r[7]!==P.length||r[8]!==c?(U=()=>{c&&(M||f(P.length?0:-1))},W=[c,M,P.length],r[6]=M,r[7]=P.length,r[8]=c,r[9]=U,r[10]=W):(U=r[9],W=r[10]),I(U,W),r[11]!==y||r[12]!==N?(H=e=>{const t=J(e);if(!t)return;o(t),p(!1),requestAnimationFrame(()=>O.current?.focus());const r={latitude:e.location?.lat??null,longitude:e.location?.lng??null,accuracy:null,altitude:0,altitudeAccuracy:null,heading:null,speed:null,city:e.city??null,region:e.region??null,country:e.country??null,postal:e.postalCode??null,timezone:null,ip:null,type:"search",raw:e};y(r),N("search")},r[11]=y,r[12]=N,r[13]=H):H=r[13];const V=H;let K;r[14]!==g||r[15]!==V||r[16]!==P||r[17]!==c?(K=e=>{if(c||"ArrowDown"!==e.key&&"ArrowUp"!==e.key){if(c)e:switch(e.key){case"ArrowDown":e.preventDefault(),f(e=>Math.min(e+1,P.length-1));break e;case"ArrowUp":e.preventDefault(),f(ee);break e;case"Enter":g>=0&&P[g]&&(e.preventDefault(),V(P[g]));break e;case"Escape":e.preventDefault(),p(!1)}}else p(!0)},r[14]=g,r[15]=V,r[16]=P,r[17]=c,r[18]=K):K=r[18];const Y=K;let G;r[19]!==_||r[20]!==N?(G=()=>{_(),N("geolocation"),p(!1),o("")},r[19]=_,r[20]=N,r[21]=G):G=r[21];const te=G;let re;r[22]!==D||r[23]!==M||r[24]!==P.length||r[25]!==c||r[26]!==n?(re=c&&!M&&!D&&n.trim().length>0&&0===P.length,r[22]=D,r[23]=M,r[24]=P.length,r[25]=c,r[26]=n,r[27]=re):re=r[27];const ae=re;let le,ie,ne,oe,se,de,ce,me,ue,he,pe,ge,fe,xe,be,ve,ye,Ne,_e,we,Se,ke,Ce;return r[28]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(le=/* @__PURE__ */t(q,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),r[28]=le):le=r[28],r[29]!==x||r[30]!==i?(ie=x?.city?i("default:location_search_placeholder_w_location",{location:x.city}):i("default:location_search_placeholder"),r[29]=x,r[30]=i,r[31]=ie):ie=r[31],r[32]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(ne=e=>{o(e.target.value),p(!0)},oe=()=>p(!0),r[32]=ne,r[33]=oe):(ne=r[32],oe=r[33]),r[34]!==T||r[35]!==$||r[36]!==Y||r[37]!==c||r[38]!==n||r[39]!==ie?(se=/* @__PURE__ */t(E.Anchor,{asChild:!0,children:/* @__PURE__ */e("div",{className:"flex-1 relative",children:[le,
|
|
9
|
+
/* @__PURE__ */t(u,{ref:O,type:"text",placeholder:ie,value:n,onChange:ne,onFocus:oe,onKeyDown:Y,className:"pl-10 h-12",role:"combobox","aria-autocomplete":"list","aria-expanded":c,"aria-controls":$,"aria-activedescendant":T})]})}),r[34]=T,r[35]=$,r[36]=Y,r[37]=c,r[38]=n,r[39]=ie,r[40]=se):se=r[40],r[41]!==D?(de=D?/* @__PURE__ */t("div",{className:"px-3 py-2 text-sm rounded-md border border-destructive/30 bg-destructive/10 text-destructive",children:String(D)}):null,r[41]=D,r[42]=de):de=r[42],r[43]!==M||r[44]!==i?(ce=M?/* @__PURE__ */t("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:i("default:loading")}):null,r[43]=M,r[44]=i,r[45]=ce):ce=r[45],r[46]!==ae||r[47]!==i?(me=ae?/* @__PURE__ */t("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:i("default:no_results")}):null,r[46]=ae,r[47]=i,r[48]=me):me=r[48],r[49]!==g||r[50]!==V||r[51]!==D||r[52]!==M||r[53]!==P||r[54]!==$?(ue=!M&&!D&&P.map((r,a)=>{const l=a===g,i=J(r),n=(o=r,o?.secondary??o?.secondary_text??o?.placePrediction?.structuredFormat?.secondaryText?.text??o?.placePrediction?.structuredFormat?.secondaryText??"");var o;const s=function(e,t){return e?.id??e?.place_id??e?.placePrediction?.placeId??t}(r,`${a}`);return i?/* @__PURE__ */e("div",{id:`${$}-opt-${a}`,role:"option","aria-selected":l,onMouseEnter:()=>f(a),onMouseDown:Q,onClick:()=>V(r),className:["cursor-pointer rounded-lg px-3 py-2",l?"bg-muted":"hover:bg-muted/60"].join(" "),children:[
|
|
10
|
+
/* @__PURE__ */t("div",{className:"text-sm text-left font-medium leading-tight",children:i}),n?/* @__PURE__ */t("div",{className:"text-xs text-left text-muted-foreground mt-1 leading-tight",children:n}):null]},s):null}),r[49]=g,r[50]=V,r[51]=D,r[52]=M,r[53]=P,r[54]=$,r[55]=ue):ue=r[55],r[56]!==$||r[57]!==de||r[58]!==ce||r[59]!==me||r[60]!==ue?(he=/* @__PURE__ */t(R.Viewport,{children:/* @__PURE__ */e("div",{id:$,role:"listbox",className:"p-2",children:[de,ce,me,ue]})}),r[56]=$,r[57]=de,r[58]=ce,r[59]=me,r[60]=ue,r[61]=he):he=r[61],r[62]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(pe=/* @__PURE__ */t(R.Scrollbar,{orientation:"vertical",className:"flex select-none touch-none p-0.5 bg-transparent",children:/* @__PURE__ */t(R.Thumb,{className:"flex-1 bg-border rounded-full"})}),r[62]=pe):pe=r[62],r[63]!==he?(ge=/* @__PURE__ */t(E.Content,{sideOffset:6,align:"start",onOpenAutoFocus:X,className:"w-[var(--radix-popover-trigger-width)] max-w-[560px] rounded-xl border rounded bg-background shadow-lg overflow-hidden",children:/* @__PURE__ */e(R.Root,{className:"max-h-80",children:[he,pe]})}),r[63]=he,r[64]=ge):ge=r[64],r[65]!==c||r[66]!==se||r[67]!==ge?(fe=/* @__PURE__ */e(E.Root,{open:c,onOpenChange:p,children:[se,ge]}),r[65]=c,r[66]=se,r[67]=ge,r[68]=fe):fe=r[68],r[69]!==s?(xe=()=>d(!s),r[69]=s,r[70]=xe):xe=r[70],r[71]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(be=/* @__PURE__ */t(Z,{className:"w-5 h-5"}),r[71]=be):be=r[71],r[72]!==xe?(ve=/* @__PURE__ */t(h,{variant:"outline",size:"lg",onClick:xe,className:"w-auto h-12",type:"button",children:be}),r[72]=xe,r[73]=ve):ve=r[73],r[74]!==fe||r[75]!==ve?(ye=/* @__PURE__ */e("div",{className:"flex flex-row gap-4",children:[fe,ve]}),r[74]=fe,r[75]=ve,r[76]=ye):ye=r[76],r[77]!==b||r[78]!==v||r[79]!==s?(Ne=s&&/* @__PURE__ */e("div",{className:"mt-6 pt-6 border-t grid md:grid-cols-2 gap-4",children:[
|
|
11
11
|
/* @__PURE__ */e("div",{children:[
|
|
12
12
|
/* @__PURE__ */t("label",{className:"text-sm font-medium mb-2 block",children:"Distance"}),
|
|
13
13
|
/* @__PURE__ */e("select",{value:b,onChange:e=>v(e.target.value),className:"w-full h-10 rounded-md border border-input bg-background px-3 text-sm",children:[
|
|
@@ -23,12 +23,12 @@ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{c as r}from"react/compi
|
|
|
23
23
|
/* @__PURE__ */t("option",{children:"Specialty Stores"}),
|
|
24
24
|
/* @__PURE__ */t("option",{children:"Big Box Retailers"}),
|
|
25
25
|
/* @__PURE__ */t("option",{children:"Independent Dealers"}),
|
|
26
|
-
/* @__PURE__ */t("option",{children:"Authorized Distributors"})]})]})]}),
|
|
27
|
-
/* @__PURE__ */t("button",{className:"text-primary hover:underline font-medium",type:"button",onClick:ee,children:we})]}),l[86]=ee,l[87]=we,l[88]=Se):Se=l[88],l[89]!==Ne||l[90]!==Se?(ke=/* @__PURE__ */e("div",{className:"max-w-3xl mx-auto",children:[Ne,Se]}),l[89]=Ne,l[90]=Se,l[91]=ke):ke=l[91],ke}function G(e){return e.preventDefault()}function Q(e){return e.preventDefault()}function X(e){return Math.max(e-1,0)}const ee=a=>{const l=r(114),{storeName:n,isOpen:i,onClose:s}=a;let o;l[0]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(o={name:"",email:"",phoneNumber:"",message:"",consent:!1},l[0]=o):o=l[0];const d=o;let c;if(l[1]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")){const e=/^\+?[1-9]\d{1,14}$/;c=h({name:g().required("Name is required"),email:g().email("Invalid email address").required("Email is required"),phoneNumber:g().matches(e,"Invalid phone number").required("Phone number is required"),message:g().required("Message is required"),consent:p().oneOf([!0],"You must agree to the terms").required("You must agree to the terms")}),l[1]=c}else c=l[1];const m=c,u=te;let N;l[2]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(N={initialValues:d,validationSchema:m,onSubmit:u,enableReinitialize:!0,validateOnBlur:!1},l[2]=N):N=l[2];const _=f(N);let w,S;l[3]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(w={zIndex:1e3,position:"relative"},l[3]=w):w=l[3],l[4]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(S=/* @__PURE__ */t(F.Overlay,{className:"fixed inset-0 bg-black/50"}),l[4]=S):S=l[4];const k=n||"the store";let C;l[5]!==k?(C=/* @__PURE__ */e(F.Title,{className:"text-lg text-left font-medium mb-4",children:["Send a Message to ",k]}),l[5]=k,l[6]=C):C=l[6];const M=_.handleSubmit;let B;l[7]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(B=/* @__PURE__ */t(b,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l[7]=B):B=l[7];const I=_.touched.name&&_.errors.name?"true":"false";let z,j,A,q,T,U;l[8]!==_.handleBlur||l[9]!==_.handleChange||l[10]!==_.values.name||l[11]!==I?(z=/* @__PURE__ */t(O,{type:"text",id:"name",name:"name",placeholder:"Name","aria-invalid":I,value:_.values.name,onChange:_.handleChange,onBlur:_.handleBlur,className:"pl-10 h-12"}),l[8]=_.handleBlur,l[9]=_.handleChange,l[10]=_.values.name,l[11]=I,l[12]=z):z=l[12],l[13]!==_.errors||l[14]!==_.touched.name?(j=_.touched.name&&_.errors.name?/* @__PURE__ */t(x,{className:"absolute text-red-600 right-3 top-1/2 -translate-y-1/2 w-5 h-5"}):null,l[13]=_.errors,l[14]=_.touched.name,l[15]=j):j=l[15],l[16]!==z||l[17]!==j?(A=/* @__PURE__ */e("div",{className:"flex-1 relative",children:[B,z,j]}),l[16]=z,l[17]=j,l[18]=A):A=l[18],l[19]!==_.errors||l[20]!==_.touched.name?(q=_.touched.name&&_.errors.name?/* @__PURE__ */t("div",{className:"text-sm text-left text-red-600 mt-1",children:_.errors.name}):null,l[19]=_.errors,l[20]=_.touched.name,l[21]=q):q=l[21],l[22]!==A||l[23]!==q?(T=/* @__PURE__ */e("div",{children:[A,q]}),l[22]=A,l[23]=q,l[24]=T):T=l[24],l[25]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(U=/* @__PURE__ */t(v,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l[25]=U):U=l[25];const W=_.touched.email&&_.errors.email?"true":"false";let E,P,R,H,V,Z;l[26]!==_.handleBlur||l[27]!==_.handleChange||l[28]!==_.values.email||l[29]!==W?(E=/* @__PURE__ */t(O,{type:"email",id:"email",name:"email",placeholder:"Email Address",value:_.values.email,"aria-invalid":W,onChange:_.handleChange,onBlur:_.handleBlur,className:"pl-10 h-12"}),l[26]=_.handleBlur,l[27]=_.handleChange,l[28]=_.values.email,l[29]=W,l[30]=E):E=l[30],l[31]!==_.errors||l[32]!==_.touched.email?(P=_.touched.email&&_.errors.email?/* @__PURE__ */t(x,{className:"absolute text-red-600 right-3 top-1/2 -translate-y-1/2 w-5 h-5"}):null,l[31]=_.errors,l[32]=_.touched.email,l[33]=P):P=l[33],l[34]!==E||l[35]!==P?(R=/* @__PURE__ */e("div",{className:"flex-1 relative",children:[U,E,P]}),l[34]=E,l[35]=P,l[36]=R):R=l[36],l[37]!==_.errors||l[38]!==_.touched.email?(H=_.touched.email&&_.errors.email?/* @__PURE__ */t("div",{className:"text-sm text-left text-red-600 mt-1",children:_.errors.email}):null,l[37]=_.errors,l[38]=_.touched.email,l[39]=H):H=l[39],l[40]!==R||l[41]!==H?(V=/* @__PURE__ */e("div",{children:[R,H]}),l[40]=R,l[41]=H,l[42]=V):V=l[42],l[43]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(Z=/* @__PURE__ */t($,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l[43]=Z):Z=l[43];const K=_.touched.phoneNumber&&_.errors.phoneNumber?"true":"false";let Y,J,G,Q,X,ee;l[44]!==_.handleBlur||l[45]!==_.handleChange||l[46]!==_.values.phoneNumber||l[47]!==K?(Y=/* @__PURE__ */t(O,{type:"text",id:"phoneNumber",name:"phoneNumber",placeholder:"Phone Number",value:_.values.phoneNumber,onChange:_.handleChange,onBlur:_.handleBlur,"aria-invalid":K,className:"pl-10 h-12"}),l[44]=_.handleBlur,l[45]=_.handleChange,l[46]=_.values.phoneNumber,l[47]=K,l[48]=Y):Y=l[48],l[49]!==_.errors||l[50]!==_.touched.phoneNumber?(J=_.touched.phoneNumber&&_.errors.phoneNumber?/* @__PURE__ */t(x,{className:"absolute text-red-600 right-3 top-1/2 -translate-y-1/2 w-5 h-5"}):null,l[49]=_.errors,l[50]=_.touched.phoneNumber,l[51]=J):J=l[51],l[52]!==Y||l[53]!==J?(G=/* @__PURE__ */e("div",{className:"flex-1 relative",children:[Z,Y,J]}),l[52]=Y,l[53]=J,l[54]=G):G=l[54],l[55]!==_.errors||l[56]!==_.touched.phoneNumber?(Q=_.touched.phoneNumber&&_.errors.phoneNumber?/* @__PURE__ */t("div",{className:"text-sm text-left text-red-600 mt-1",children:_.errors.phoneNumber}):null,l[55]=_.errors,l[56]=_.touched.phoneNumber,l[57]=Q):Q=l[57],l[58]!==G||l[59]!==Q?(X=/* @__PURE__ */e("div",{children:[G,Q]}),l[58]=G,l[59]=Q,l[60]=X):X=l[60],l[61]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(ee=/* @__PURE__ */t(y,{className:"absolute left-3 top-5 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l[61]=ee):ee=l[61];const re=_.touched.message&&_.errors.message?"true":"false",ae=_.values.message,le=_.handleChange,ne=_.handleBlur;let ie,se,oe,de,ce,me;l[62]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(ie=L("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","h-36 pt-2.5 pl-10"),l[62]=ie):ie=l[62],l[63]!==_.handleBlur||l[64]!==_.handleChange||l[65]!==_.values.message||l[66]!==re?(se=/* @__PURE__ */t("textarea",{id:"message",name:"message",placeholder:"Your Message","aria-invalid":re,value:ae,onChange:le,onBlur:ne,className:ie}),l[63]=_.handleBlur,l[64]=_.handleChange,l[65]=_.values.message,l[66]=re,l[67]=se):se=l[67],l[68]!==_.errors||l[69]!==_.touched.message?(oe=_.touched.message&&_.errors.message?/* @__PURE__ */t(x,{className:"absolute text-red-600 right-3 top-5 -translate-y-1/2 w-5 h-5"}):null,l[68]=_.errors,l[69]=_.touched.message,l[70]=oe):oe=l[70],l[71]!==se||l[72]!==oe?(de=/* @__PURE__ */e("div",{className:"flex-1 relative",children:[ee,se,oe]}),l[71]=se,l[72]=oe,l[73]=de):de=l[73],l[74]!==_.errors||l[75]!==_.touched.message?(ce=_.touched.message&&_.errors.message?/* @__PURE__ */t("div",{className:"text-sm text-left text-red-600 mt-1",children:_.errors.message}):null,l[74]=_.errors,l[75]=_.touched.message,l[76]=ce):ce=l[76],l[77]!==de||l[78]!==ce?(me=/* @__PURE__ */e("div",{children:[de,ce]}),l[77]=de,l[78]=ce,l[79]=me):me=l[79];const ue=_.touched.consent&&_.errors.consent?"true":"false";let he;l[80]!==_.handleBlur||l[81]!==_.handleChange||l[82]!==_.values.consent||l[83]!==ue?(he=/* @__PURE__ */t("input",{type:"checkbox",id:"consent",name:"consent",checked:_.values.consent,onChange:_.handleChange,onBlur:_.handleBlur,"aria-invalid":ue,className:"mt-0.5 h-4 w-4 rounded border-gray-300 text-purple-600 focus:ring-purple-600 cursor-pointer aria-invalid:text-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"}),l[80]=_.handleBlur,l[81]=_.handleChange,l[82]=_.values.consent,l[83]=ue,l[84]=he):he=l[84];const pe="ml-2 block text-left text-sm text-gray-700 cursor-pointer "+(_.touched.consent&&_.errors.consent?"text-red-600":""),ge=n||"the store";let fe,xe,be;l[85]!==pe||l[86]!==ge?(fe=/* @__PURE__ */e("label",{htmlFor:"consent",className:pe,children:["I would like to receive communications from ",ge,"."]}),l[85]=pe,l[86]=ge,l[87]=fe):fe=l[87],l[88]!==he||l[89]!==fe?(xe=/* @__PURE__ */e("div",{className:"flex items-start",children:[he,fe]}),l[88]=he,l[89]=fe,l[90]=xe):xe=l[90],l[91]!==s?(be=/* @__PURE__ */t(D,{variant:"outline",onClick:s,type:"button",children:"Cancel"}),l[91]=s,l[92]=be):be=l[92];const ve=_.isSubmitting?"Sending...":"Send Message";let ye,Ne,_e,we,Se;return l[93]!==_.isSubmitting||l[94]!==ve?(ye=/* @__PURE__ */t(D,{type:"submit",disabled:_.isSubmitting,children:ve}),l[93]=_.isSubmitting,l[94]=ve,l[95]=ye):ye=l[95],l[96]!==be||l[97]!==ye?(Ne=/* @__PURE__ */e("div",{className:"flex justify-end gap-2",children:[be,ye]}),l[96]=be,l[97]=ye,l[98]=Ne):Ne=l[98],l[99]!==_.handleSubmit||l[100]!==T||l[101]!==V||l[102]!==X||l[103]!==me||l[104]!==xe||l[105]!==Ne?(_e=/* @__PURE__ */e("form",{onSubmit:M,className:"space-y-4",children:[T,V,X,me,xe,Ne]}),l[99]=_.handleSubmit,l[100]=T,l[101]=V,l[102]=X,l[103]=me,l[104]=xe,l[105]=Ne,l[106]=_e):_e=l[106],l[107]!==_e||l[108]!==C?(we=/* @__PURE__ */e(F.Content,{className:"fixed top-1/2 left-1/2 max-h-[85vh] w-[90vw] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6 shadow-lg focus:outline-none",children:[C,_e]}),l[107]=_e,l[108]=C,l[109]=we):we=l[109],l[110]!==i||l[111]!==s||l[112]!==we?(Se=/* @__PURE__ */t("div",{className:"cc",style:w,children:/* @__PURE__ */e(F.Root,{open:i,onOpenChange:s,children:[S,we]})}),l[110]=i,l[111]=s,l[112]=we,l[113]=Se):Se=l[113],Se};async function te(e,t){}const re=()=>{const e=r(12),{messageDialogOpen:l,setMessageDialogOpen:n,messageStoreId:i,setMessageStoreId:s,stores:o}=a();let d;if(e[0]!==i||e[1]!==o){let t;e[3]!==i?(t=e=>e.id===i,e[3]=i,e[4]=t):t=e[4],d=o.find(t),e[0]=i,e[1]=o,e[2]=d}else d=e[2];const c=d?d.retailer_name:null;let m;e[5]!==n||e[6]!==s?(m=()=>{n(!1),s(null)},e[5]=n,e[6]=s,e[7]=m):m=e[7];const u=m;let h;return e[8]!==u||e[9]!==l||e[10]!==c?(h=/* @__PURE__ */t(ee,{isOpen:l,onClose:u,storeName:c}),e[8]=u,e[9]=l,e[10]=c,e[11]=h):h=e[11],h},ae=a=>{const l=r(73),{id:n,name:i,placeId:s,addressLineOne:o,city:d,province:c,postalCode:m,phone:u,hours:h,distance:p,services:g,isSelected:f,handleSelect:x,onMessageClick:b,href:v}=a;let y;l[0]!==g?(y=void 0===g?[]:g,l[0]=g,l[1]=y):y=l[1];const w=y,{t:S}=R(),k=`https://www.google.com/maps/dir/?api=1&destination=${i}&destination_place_id=${s}`,C="bg-card border rounded-xl p-6 transition-all hover:shadow-lg cursor-pointer "+(f?"ring-2 ring-primary shadow-lg":"");let M,B,I,z,j,q,O,L,U;l[2]!==x||l[3]!==n?(M=()=>x(n),l[2]=x,l[3]=n,l[4]=M):M=l[4],l[5]!==i?(B=/* @__PURE__ */t("div",{className:"flex items-start justify-between gap-4 mb-3",children:/* @__PURE__ */t("div",{children:/* @__PURE__ */t("h3",{className:"font-bold text-lg text-left mb-1",children:i})})}),l[5]=i,l[6]=B):B=l[6],l[7]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(I=/* @__PURE__ */t(A,{className:"w-4 h-4 text-muted-foreground mt-0.5 shrink-0"}),l[7]=I):I=l[7],l[8]!==o?(z=/* @__PURE__ */t("p",{className:"font-medium text-left",children:o}),l[8]=o,l[9]=z):z=l[9],l[10]!==d||l[11]!==m||l[12]!==c?(j=/* @__PURE__ */e("p",{className:"text-muted-foreground text-left",children:[d,", ",c," ",m]}),l[10]=d,l[11]=m,l[12]=c,l[13]=j):j=l[13],l[14]!==p||l[15]!==S?(q=S("default:distance_away",{distance:N(p).toFixed(1),distanceUnit:"miles"}),l[14]=p,l[15]=S,l[16]=q):q=l[16],l[17]!==q?(O=/* @__PURE__ */t("p",{className:"text-primary font-medium mt-1 text-left",children:q}),l[17]=q,l[18]=O):O=l[18],l[19]!==O||l[20]!==z||l[21]!==j?(L=/* @__PURE__ */e("div",{className:"flex items-start gap-2",children:[I,
|
|
28
|
-
/* @__PURE__ */e("div",{children:[
|
|
29
|
-
/* @__PURE__ */t(
|
|
30
|
-
/* @__PURE__ */t("
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */t(
|
|
26
|
+
/* @__PURE__ */t("option",{children:"Authorized Distributors"})]})]})]}),r[77]=b,r[78]=v,r[79]=s,r[80]=Ne):Ne=r[80],r[81]!==ye||r[82]!==Ne?(_e=/* @__PURE__ */e("div",{className:"bg-card rounded-xl shadow-lg p-6 border",children:[ye,Ne]}),r[81]=ye,r[82]=Ne,r[83]=_e):_e=r[83],r[84]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(we=/* @__PURE__ */t(L,{className:"w-4 h-4"}),r[84]=we):we=r[84],r[85]!==i?(Se=i("default:use_my_location"),r[85]=i,r[86]=Se):Se=r[86],r[87]!==te||r[88]!==Se?(ke=/* @__PURE__ */e("div",{className:"mt-6 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[we,
|
|
27
|
+
/* @__PURE__ */t("button",{className:"text-primary hover:underline font-medium",type:"button",onClick:te,children:Se})]}),r[87]=te,r[88]=Se,r[89]=ke):ke=r[89],r[90]!==_e||r[91]!==ke?(Ce=/* @__PURE__ */e("div",{className:"max-w-3xl mx-auto",children:[_e,ke]}),r[90]=_e,r[91]=ke,r[92]=Ce):Ce=r[92],Ce}function Q(e){return e.preventDefault()}function X(e){return e.preventDefault()}function ee(e){return Math.max(e-1,0)}const te=r=>{const l=a(114),{storeName:i,isOpen:n,onClose:o}=r;let s;l[0]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(s={name:"",email:"",phoneNumber:"",message:"",consent:!1},l[0]=s):s=l[0];const d=s;let c;if(l[1]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")){const e=/^\+?[1-9]\d{1,14}$/;c=p({name:f().required("Name is required"),email:f().email("Invalid email address").required("Email is required"),phoneNumber:f().matches(e,"Invalid phone number").required("Phone number is required"),message:f().required("Message is required"),consent:g().oneOf([!0],"You must agree to the terms").required("You must agree to the terms")}),l[1]=c}else c=l[1];const m=c,u=re;let h;l[2]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(h={initialValues:d,validationSchema:m,onSubmit:u,enableReinitialize:!0,validateOnBlur:!1},l[2]=h):h=l[2];const _=x(h);let w,S;l[3]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(w={zIndex:1e3,position:"relative"},l[3]=w):w=l[3],l[4]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(S=/* @__PURE__ */t(H.Overlay,{className:"fixed inset-0 bg-black/50"}),l[4]=S):S=l[4];const k=i||"the store";let C;l[5]!==k?(C=/* @__PURE__ */e(H.Title,{className:"text-lg text-left font-medium mb-4",children:["Send a Message to ",k]}),l[5]=k,l[6]=C):C=l[6];const M=_.handleSubmit;let B;l[7]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(B=/* @__PURE__ */t(v,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l[7]=B):B=l[7];const I=_.touched.name&&_.errors.name?"true":"false";let z,j,D,L,q,T;l[8]!==_.handleBlur||l[9]!==_.handleChange||l[10]!==_.values.name||l[11]!==I?(z=/* @__PURE__ */t(P,{type:"text",id:"name",name:"name",placeholder:"Name","aria-invalid":I,value:_.values.name,onChange:_.handleChange,onBlur:_.handleBlur,className:"pl-10 h-12"}),l[8]=_.handleBlur,l[9]=_.handleChange,l[10]=_.values.name,l[11]=I,l[12]=z):z=l[12],l[13]!==_.errors||l[14]!==_.touched.name?(j=_.touched.name&&_.errors.name?/* @__PURE__ */t(b,{className:"absolute text-red-600 right-3 top-1/2 -translate-y-1/2 w-5 h-5"}):null,l[13]=_.errors,l[14]=_.touched.name,l[15]=j):j=l[15],l[16]!==z||l[17]!==j?(D=/* @__PURE__ */e("div",{className:"flex-1 relative",children:[B,z,j]}),l[16]=z,l[17]=j,l[18]=D):D=l[18],l[19]!==_.errors||l[20]!==_.touched.name?(L=_.touched.name&&_.errors.name?/* @__PURE__ */t("div",{className:"text-sm text-left text-red-600 mt-1",children:_.errors.name}):null,l[19]=_.errors,l[20]=_.touched.name,l[21]=L):L=l[21],l[22]!==D||l[23]!==L?(q=/* @__PURE__ */e("div",{children:[D,L]}),l[22]=D,l[23]=L,l[24]=q):q=l[24],l[25]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(T=/* @__PURE__ */t(y,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l[25]=T):T=l[25];const U=_.touched.email&&_.errors.email?"true":"false";let W,E,R,F,V,Z;l[26]!==_.handleBlur||l[27]!==_.handleChange||l[28]!==_.values.email||l[29]!==U?(W=/* @__PURE__ */t(P,{type:"email",id:"email",name:"email",placeholder:"Email Address",value:_.values.email,"aria-invalid":U,onChange:_.handleChange,onBlur:_.handleBlur,className:"pl-10 h-12"}),l[26]=_.handleBlur,l[27]=_.handleChange,l[28]=_.values.email,l[29]=U,l[30]=W):W=l[30],l[31]!==_.errors||l[32]!==_.touched.email?(E=_.touched.email&&_.errors.email?/* @__PURE__ */t(b,{className:"absolute text-red-600 right-3 top-1/2 -translate-y-1/2 w-5 h-5"}):null,l[31]=_.errors,l[32]=_.touched.email,l[33]=E):E=l[33],l[34]!==W||l[35]!==E?(R=/* @__PURE__ */e("div",{className:"flex-1 relative",children:[T,W,E]}),l[34]=W,l[35]=E,l[36]=R):R=l[36],l[37]!==_.errors||l[38]!==_.touched.email?(F=_.touched.email&&_.errors.email?/* @__PURE__ */t("div",{className:"text-sm text-left text-red-600 mt-1",children:_.errors.email}):null,l[37]=_.errors,l[38]=_.touched.email,l[39]=F):F=l[39],l[40]!==R||l[41]!==F?(V=/* @__PURE__ */e("div",{children:[R,F]}),l[40]=R,l[41]=F,l[42]=V):V=l[42],l[43]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(Z=/* @__PURE__ */t($,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l[43]=Z):Z=l[43];const K=_.touched.phoneNumber&&_.errors.phoneNumber?"true":"false";let Y,J,G,Q,X,ee;l[44]!==_.handleBlur||l[45]!==_.handleChange||l[46]!==_.values.phoneNumber||l[47]!==K?(Y=/* @__PURE__ */t(P,{type:"text",id:"phoneNumber",name:"phoneNumber",placeholder:"Phone Number",value:_.values.phoneNumber,onChange:_.handleChange,onBlur:_.handleBlur,"aria-invalid":K,className:"pl-10 h-12"}),l[44]=_.handleBlur,l[45]=_.handleChange,l[46]=_.values.phoneNumber,l[47]=K,l[48]=Y):Y=l[48],l[49]!==_.errors||l[50]!==_.touched.phoneNumber?(J=_.touched.phoneNumber&&_.errors.phoneNumber?/* @__PURE__ */t(b,{className:"absolute text-red-600 right-3 top-1/2 -translate-y-1/2 w-5 h-5"}):null,l[49]=_.errors,l[50]=_.touched.phoneNumber,l[51]=J):J=l[51],l[52]!==Y||l[53]!==J?(G=/* @__PURE__ */e("div",{className:"flex-1 relative",children:[Z,Y,J]}),l[52]=Y,l[53]=J,l[54]=G):G=l[54],l[55]!==_.errors||l[56]!==_.touched.phoneNumber?(Q=_.touched.phoneNumber&&_.errors.phoneNumber?/* @__PURE__ */t("div",{className:"text-sm text-left text-red-600 mt-1",children:_.errors.phoneNumber}):null,l[55]=_.errors,l[56]=_.touched.phoneNumber,l[57]=Q):Q=l[57],l[58]!==G||l[59]!==Q?(X=/* @__PURE__ */e("div",{children:[G,Q]}),l[58]=G,l[59]=Q,l[60]=X):X=l[60],l[61]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(ee=/* @__PURE__ */t(N,{className:"absolute left-3 top-5 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),l[61]=ee):ee=l[61];const te=_.touched.message&&_.errors.message?"true":"false",ae=_.values.message,le=_.handleChange,ie=_.handleBlur;let ne,oe,se,de,ce,me;l[62]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(ne=O("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","h-36 pt-2.5 pl-10"),l[62]=ne):ne=l[62],l[63]!==_.handleBlur||l[64]!==_.handleChange||l[65]!==_.values.message||l[66]!==te?(oe=/* @__PURE__ */t("textarea",{id:"message",name:"message",placeholder:"Your Message","aria-invalid":te,value:ae,onChange:le,onBlur:ie,className:ne}),l[63]=_.handleBlur,l[64]=_.handleChange,l[65]=_.values.message,l[66]=te,l[67]=oe):oe=l[67],l[68]!==_.errors||l[69]!==_.touched.message?(se=_.touched.message&&_.errors.message?/* @__PURE__ */t(b,{className:"absolute text-red-600 right-3 top-5 -translate-y-1/2 w-5 h-5"}):null,l[68]=_.errors,l[69]=_.touched.message,l[70]=se):se=l[70],l[71]!==oe||l[72]!==se?(de=/* @__PURE__ */e("div",{className:"flex-1 relative",children:[ee,oe,se]}),l[71]=oe,l[72]=se,l[73]=de):de=l[73],l[74]!==_.errors||l[75]!==_.touched.message?(ce=_.touched.message&&_.errors.message?/* @__PURE__ */t("div",{className:"text-sm text-left text-red-600 mt-1",children:_.errors.message}):null,l[74]=_.errors,l[75]=_.touched.message,l[76]=ce):ce=l[76],l[77]!==de||l[78]!==ce?(me=/* @__PURE__ */e("div",{children:[de,ce]}),l[77]=de,l[78]=ce,l[79]=me):me=l[79];const ue=_.touched.consent&&_.errors.consent?"true":"false";let he;l[80]!==_.handleBlur||l[81]!==_.handleChange||l[82]!==_.values.consent||l[83]!==ue?(he=/* @__PURE__ */t("input",{type:"checkbox",id:"consent",name:"consent",checked:_.values.consent,onChange:_.handleChange,onBlur:_.handleBlur,"aria-invalid":ue,className:"mt-0.5 h-4 w-4 rounded border-gray-300 text-purple-600 focus:ring-purple-600 cursor-pointer aria-invalid:text-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"}),l[80]=_.handleBlur,l[81]=_.handleChange,l[82]=_.values.consent,l[83]=ue,l[84]=he):he=l[84];const pe="ml-2 block text-left text-sm text-gray-700 cursor-pointer "+(_.touched.consent&&_.errors.consent?"text-red-600":""),ge=i||"the store";let fe,xe,be;l[85]!==pe||l[86]!==ge?(fe=/* @__PURE__ */e("label",{htmlFor:"consent",className:pe,children:["I would like to receive communications from ",ge,"."]}),l[85]=pe,l[86]=ge,l[87]=fe):fe=l[87],l[88]!==he||l[89]!==fe?(xe=/* @__PURE__ */e("div",{className:"flex items-start",children:[he,fe]}),l[88]=he,l[89]=fe,l[90]=xe):xe=l[90],l[91]!==o?(be=/* @__PURE__ */t(A,{variant:"outline",onClick:o,type:"button",children:"Cancel"}),l[91]=o,l[92]=be):be=l[92];const ve=_.isSubmitting?"Sending...":"Send Message";let ye,Ne,_e,we,Se;return l[93]!==_.isSubmitting||l[94]!==ve?(ye=/* @__PURE__ */t(A,{type:"submit",disabled:_.isSubmitting,children:ve}),l[93]=_.isSubmitting,l[94]=ve,l[95]=ye):ye=l[95],l[96]!==be||l[97]!==ye?(Ne=/* @__PURE__ */e("div",{className:"flex justify-end gap-2",children:[be,ye]}),l[96]=be,l[97]=ye,l[98]=Ne):Ne=l[98],l[99]!==_.handleSubmit||l[100]!==q||l[101]!==V||l[102]!==X||l[103]!==me||l[104]!==xe||l[105]!==Ne?(_e=/* @__PURE__ */e("form",{onSubmit:M,className:"space-y-4",children:[q,V,X,me,xe,Ne]}),l[99]=_.handleSubmit,l[100]=q,l[101]=V,l[102]=X,l[103]=me,l[104]=xe,l[105]=Ne,l[106]=_e):_e=l[106],l[107]!==_e||l[108]!==C?(we=/* @__PURE__ */e(H.Content,{className:"fixed top-1/2 left-1/2 max-h-[85vh] w-[90vw] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6 shadow-lg focus:outline-none",children:[C,_e]}),l[107]=_e,l[108]=C,l[109]=we):we=l[109],l[110]!==n||l[111]!==o||l[112]!==we?(Se=/* @__PURE__ */t("div",{className:"cc",style:w,children:/* @__PURE__ */e(H.Root,{open:n,onOpenChange:o,children:[S,we]})}),l[110]=n,l[111]=o,l[112]=we,l[113]=Se):Se=l[113],Se};async function re(e,t){}const ae=()=>{const e=a(12),{messageDialogOpen:r,setMessageDialogOpen:i,messageStoreId:n,setMessageStoreId:o,stores:s}=l();let d;if(e[0]!==n||e[1]!==s){let t;e[3]!==n?(t=e=>e.id===n,e[3]=n,e[4]=t):t=e[4],d=s.find(t),e[0]=n,e[1]=s,e[2]=d}else d=e[2];const c=d?d.retailer_name:null;let m;e[5]!==i||e[6]!==o?(m=()=>{i(!1),o(null)},e[5]=i,e[6]=o,e[7]=m):m=e[7];const u=m;let h;return e[8]!==u||e[9]!==r||e[10]!==c?(h=/* @__PURE__ */t(te,{isOpen:r,onClose:u,storeName:c}),e[8]=u,e[9]=r,e[10]=c,e[11]=h):h=e[11],h},le=l=>{const i=a(72),{id:n,name:o,placeId:s,addressLineOne:d,city:c,province:m,postalCode:u,phone:h,hours:p,distance:g,services:f,products:x,showProducts:b,productLimit:v,isSelected:y,handleSelect:N,onMessageClick:S,href:k}=l,C=void 0===f?[]:f,M=void 0===x?[]:x,B=void 0===v?10:v,{t:I}=F(),z=`https://www.google.com/maps/dir/?api=1&destination=${o}&destination_place_id=${s}`,j="bg-card border rounded-xl p-6 transition-all hover:shadow-lg cursor-pointer "+(y?"ring-2 ring-primary shadow-lg":"");let D,q,P,O,U,E,R,H,Z,K,Y,J;i[0]!==N||i[1]!==n?(D=()=>N(n),i[0]=N,i[1]=n,i[2]=D):D=i[2],i[3]!==o?(q=/* @__PURE__ */t("div",{className:"flex items-start justify-between gap-4 mb-3",children:/* @__PURE__ */t("div",{children:/* @__PURE__ */t("h3",{className:"font-bold text-lg text-left mb-1",children:o})})}),i[3]=o,i[4]=q):q=i[4],i[5]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(P=/* @__PURE__ */t(L,{className:"w-4 h-4 text-muted-foreground mt-0.5 shrink-0"}),i[5]=P):P=i[5],i[6]!==d?(O=/* @__PURE__ */t("p",{className:"font-medium text-left",children:d}),i[6]=d,i[7]=O):O=i[7],i[8]!==c||i[9]!==u||i[10]!==m?(U=/* @__PURE__ */e("p",{className:"text-muted-foreground text-left",children:[c,", ",m," ",u]}),i[8]=c,i[9]=u,i[10]=m,i[11]=U):U=i[11],i[12]!==g||i[13]!==I?(E=I("default:distance_away",{distance:_(g).toFixed(1),distanceUnit:"miles"}),i[12]=g,i[13]=I,i[14]=E):E=i[14],i[15]!==E?(R=/* @__PURE__ */t("p",{className:"text-primary font-medium mt-1 text-left",children:E}),i[15]=E,i[16]=R):R=i[16],i[17]!==O||i[18]!==U||i[19]!==R?(H=/* @__PURE__ */e("div",{className:"flex items-start gap-2",children:[P,
|
|
28
|
+
/* @__PURE__ */e("div",{children:[O,U,R]})]}),i[17]=O,i[18]=U,i[19]=R,i[20]=H):H=i[20],i[21]!==h?(Z=h&&/* @__PURE__ */e("div",{className:"flex items-center gap-2",children:[
|
|
29
|
+
/* @__PURE__ */t($,{className:"w-4 h-4 text-muted-foreground"}),
|
|
30
|
+
/* @__PURE__ */t("a",{href:`tel:${h?.phone_number}`,className:"hover:text-primary transition-colors",children:h?.formatted})]}),i[21]=h,i[22]=Z):Z=i[22],i[23]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(K=/* @__PURE__ */t("div",{className:"mt-2.5",children:/* @__PURE__ */t(T,{className:"w-4 h-4 text-muted-foreground"})}),i[23]=K):K=i[23],i[24]!==p?(Y=/* @__PURE__ */e("div",{className:"flex items-top gap-2",children:[K,
|
|
31
|
+
/* @__PURE__ */t("span",{className:"text-muted-foreground",children:/* @__PURE__ */t(w,{hours:p})})]}),i[24]=p,i[25]=Y):Y=i[25],i[26]!==H||i[27]!==Z||i[28]!==Y?(J=/* @__PURE__ */e("div",{className:"space-y-2 text-sm",children:[H,Z,Y]}),i[26]=H,i[27]=Z,i[28]=Y,i[29]=J):J=i[29];const G=C.filter(ie).map(ne);let Q,X;i[30]!==G?(Q=/* @__PURE__ */t("div",{className:"flex flex-wrap gap-2 mt-4",children:G}),i[30]=G,i[31]=Q):Q=i[31],i[32]!==I?(X=a=>/* @__PURE__ */t(r,{children:/* @__PURE__ */e("span",{className:"px-3 py-1 bg-primary/10 text-primary text-xs font-medium rounded-full",children:[a?.name,!a.stocked&&a.available&&/* @__PURE__ */t("span",{className:"ml-2 rounded-full bg-secondary px-2 py-0.5 text-secondary-foreground",children:I("default:special_order")})]},a.id)}),i[32]=I,i[33]=X):X=i[33];const ee=M.filter(oe).slice(0,B).map(X);let te,re,ae,le,se,de,ce,me,ue,he,pe,ge,fe,xe;return i[34]!==ee?(te=/* @__PURE__ */t("div",{className:"flex flex-wrap gap-2 mt-4",children:ee}),i[34]=ee,i[35]=te):te=i[35],i[36]!==J||i[37]!==Q||i[38]!==te||i[39]!==q?(re=/* @__PURE__ */e("div",{className:"flex-1",children:[q,J,Q,te]}),i[36]=J,i[37]=Q,i[38]=te,i[39]=q,i[40]=re):re=i[40],i[41]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(ae=/* @__PURE__ */t(W,{className:"w-4 h-4"}),i[41]=ae):ae=i[41],i[42]!==I?(le=I("default:get_directions"),i[42]=I,i[43]=le):le=i[43],i[44]!==z||i[45]!==le?(se=/* @__PURE__ */e("a",{href:z,target:"_blank",rel:"noopener noreferrer",className:"flex-1 md:flex-none inline-flex items-center justify-center gap-2 rounded-md bg-primary text-primary-foreground text-sm font-medium h-8 px-4 hover:bg-primary/90 transition-colors",children:[ae,le]}),i[44]=z,i[45]=le,i[46]=se):se=i[46],i[47]!==n||i[48]!==S?(de=e=>{e.stopPropagation(),S(n)},i[47]=n,i[48]=S,i[49]=de):de=i[49],i[50]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(ce=/* @__PURE__ */t(V,{className:"w-4 h-4"}),i[50]=ce):ce=i[50],i[51]!==I?(me=I("default:message"),i[51]=I,i[52]=me):me=i[52],i[53]!==de||i[54]!==me?(ue=/* @__PURE__ */e(A,{variant:"outline",className:"flex-1 md:flex-none bg-transparent",size:"sm",onClick:de,children:[ce,me]}),i[53]=de,i[54]=me,i[55]=ue):ue=i[55],i[56]!==I?(he=I("default:view_details"),i[56]=I,i[57]=he):he=i[57],i[58]!==k||i[59]!==he?(pe=/* @__PURE__ */t("a",{href:k,target:"_blank",className:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive bg-secondary text-secondary-foreground hover:bg-secondary/80 flex-1 md:flex-none bg-transparent",size:"sm",children:he}),i[58]=k,i[59]=he,i[60]=pe):pe=i[60],i[61]!==se||i[62]!==ue||i[63]!==pe?(ge=/* @__PURE__ */e("div",{className:"flex md:flex-col gap-2",children:[se,ue,pe]}),i[61]=se,i[62]=ue,i[63]=pe,i[64]=ge):ge=i[64],i[65]!==re||i[66]!==ge?(fe=/* @__PURE__ */e("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[re,ge]}),i[65]=re,i[66]=ge,i[67]=fe):fe=i[67],i[68]!==fe||i[69]!==j||i[70]!==D?(xe=/* @__PURE__ */t("div",{className:j,onClick:D,children:fe}),i[68]=fe,i[69]=j,i[70]=D,i[71]=xe):xe=i[71],xe};function ie(e){return e}function ne(e){/* @__PURE__ */
|
|
32
|
+
return t("span",{className:"px-3 py-1 bg-primary/10 text-primary text-xs font-medium rounded-full",children:e},e)}function oe(e){return e.available||e.stocked}function se(){const r=a(28),{stores:i,location:n,selectedStoreId:o,setSelectedStoreId:s,setMessageDialogOpen:d,setMessageStoreId:c,searchIsLoading:m,searchError:u,baseUrl:h,showProducts:p,productLimit:g}=l();let f;r[0]!==d||r[1]!==c?(f=e=>{c(e),d(!0)},r[0]=d,r[1]=c,r[2]=f):f=r[2];const x=f;let b,v,y,N,_;return r[3]!==u||r[4]!==m||r[5]!==i?(b=!m&&!u&&0===i.length&&/* @__PURE__ */t(S,{}),r[3]=u,r[4]=m,r[5]=i,r[6]=b):b=r[6],r[7]!==m?(v=m&&/* @__PURE__ */t("div",{className:"flex items-center justify-center h-48",children:/* @__PURE__ */t(C,{})}),r[7]=m,r[8]=v):v=r[8],r[9]!==h||r[10]!==x||r[11]!==n||r[12]!==g||r[13]!==u||r[14]!==m||r[15]!==o||r[16]!==s||r[17]!==p||r[18]!==i?(y=!m&&!u&&i.map(e=>/* @__PURE__ */t(le,{id:e.id,name:e.retailer_name,placeId:e.place_id,addressLineOne:e.address?.street_line_one,addressLineTwo:e.address?.street_line_two,city:e.address?.city,province:e.address?.province,postalCode:e.address?.postal_code,country:e.address?.country,distance:k(n.latitude,n.longitude,e.address?.latitude,e.address?.longitude),phone:e.phone_number,hours:e.retailer_location_hours,services:[e.store_type],isSelected:o===e.id,handleSelect:s,href:`${h}/${e.id}`,onMessageClick:x,showProducts:p,productLimit:g,products:e.retailer_location_products},e.id)),r[9]=h,r[10]=x,r[11]=n,r[12]=g,r[13]=u,r[14]=m,r[15]=o,r[16]=s,r[17]=p,r[18]=i,r[19]=y):y=r[19],r[20]!==u||r[21]!==m?(N=!m&&u&&/* @__PURE__ */t("div",{className:"text-red-600 text-center",children:"An error occurred while searching for stores. Please try again."}),r[20]=u,r[21]=m,r[22]=N):N=r[22],r[23]!==b||r[24]!==v||r[25]!==y||r[26]!==N?(_=/* @__PURE__ */e("div",{className:"space-y-4",children:[b,v,y,N]}),r[23]=b,r[24]=v,r[25]=y,r[26]=N,r[27]=_):_=r[27],_}const de=r=>{const l=a(16),{organizationId:n,locale:o,showProducts:s,productLimit:d,baseUrl:c}=r,m=void 0!==s&&s,u=void 0===d?10:d,h=void 0===c?"/retailers":c;let p,g,f,x,b,v,y;return l[0]!==o?(p={lng:o},l[0]=o,l[1]=p):p=l[1],l[2]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(g=/* @__PURE__ */t(M,{apiKey:"AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M",children:/* @__PURE__ */t(Y,{})}),l[2]=g):g=l[2],l[3]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(f=/* @__PURE__ */t("div",{className:"mb-8",children:/* @__PURE__ */t(G,{})}),l[3]=f):f=l[3],l[4]!==u||l[5]!==m?(x=/* @__PURE__ */t("div",{className:"cc",children:/* @__PURE__ */t("section",{className:"py-12 lg:py-16",children:/* @__PURE__ */e("div",{className:"grid lg:grid-cols-2 gap-8",children:[g,
|
|
33
|
+
/* @__PURE__ */e("div",{className:"lg:order-first",children:[f,
|
|
34
|
+
/* @__PURE__ */t(se,{showProducts:m,productLimit:u})]})]})})}),l[4]=u,l[5]=m,l[6]=x):x=l[6],l[7]===/* @__PURE__ */Symbol.for("react.memo_cache_sentinel")?(b=/* @__PURE__ */t(ae,{}),l[7]=b):b=l[7],l[8]!==h||l[9]!==o||l[10]!==n||l[11]!==x?(v=/* @__PURE__ */e(i,{organizationId:n,locale:o,baseUrl:h,children:[x,b]}),l[8]=h,l[9]=o,l[10]=n,l[11]=x,l[12]=v):v=l[12],l[13]!==p||l[14]!==v?(y=/* @__PURE__ */t(U,{options:p,children:v}),l[13]=p,l[14]=v,l[15]=y):y=l[15],y};export{de as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,S as r}from"./store-locator-
|
|
1
|
+
import{S as o,S as r}from"./store-locator-Cu5fUiVm.js";export{o as StoreLocatorProvider,r as default};
|