PageSourceSearch

https://app.paa.ge/static/js/708.3e88e4c1.chunk.js

js paa.ge collected 2026-09-24 17:10:42 UTC 109,024 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunklamaco=self.webpackChunklamaco||[]).push([[708,8126,8988],{5986:(e,n,t)=>{t.d(n,{B7:()=>c,Kq:()=>v,Pn:()=>s,V:()=>u,dI:()=>m,xh:()=>p});var i=t(203),l=t(59781),o=t(12836),a=t(96444),d=t(65043);const r=["onboarding-todo"];function s(e){var n;return(0,i.I)({queryKey:r,queryFn:async()=>{try{return await(0,a.default)("/admin/onboarding-todo",{method:"GET"})}catch(n){var e;if(404===(null===n||void 0===n||null===(e=n.response)||void 0===e?void 0:e.status))return null;throw n}},enabled:null===(n=null===e||void 0===e?void 0:e.enabled)||void 0===n||n,staleTime:0,refetchOnMount:"always"})}function c(){const e=(0,l.jE)();return(0,o.n)({mutationFn:async e=>{let{state_id:n,source:t}=e;return(0,a.default)("/admin/onboarding-todo/item-states/".concat(n,"/start"),{method:"POST",data:t?{source:t}:void 0})},onSuccess:()=>e.invalidateQueries({queryKey:r})})}function u(){const{data:e}=s(),{mutateAsync:n}=c();return(0,d.useCallback)(async(t,i)=>{const l=null===e||void 0===e?void 0:e.items.find(e=>e.key===t);null!==l&&void 0!==l&&l.state&&!l.state.completed_at&&await n({state_id:l.state.id,source:i})},[e,n])}function v(){const e=(0,l.jE)();return(0,o.n)({mutationFn:async e=>(0,a.default)("/admin/onboarding-todo/item-states/".concat(e,"/complete"),{method:"POST"}),onSuccess:()=>e.invalidateQueries({queryKey:r})})}function p(){const e=(0,l.jE)();return(0,o.n)({mutationFn:async()=>(0,a.default)("/admin/onboarding-todo/share-in-bio/share",{method:"POST"}),onSuccess:()=>e.invalidateQueries({queryKey:r})})}function m(){const e=(0,l.jE)();return(0,o.n)({mutationFn:async e=>(0,a.default)("/admin/onboarding-todo/share-in-bio/verify-social",{method:"POST",data:e}),onSuccess:()=>{e.invalidateQueries({queryKey:r}),e.invalidateQueries(["bio-socials"])}})}},11136:(e,n,t)=>{t.d(n,{L$:()=>o,cP:()=>l,iF:()=>i});let i=function(e){return e.ONLINE="online",e.IN_PERSON="in_person",e.PHONE="phone",e.CUSTOM="custom",e}({}),l=function(e){return e.CANCELLED="cancelled",e.ACCEPTED="accepted",e.REJECTED="rejected",e.PENDING="pending",e.AWAITING_HOST="awaiting_host",e}({}),o=function(e){return e.OUTLOOK="office365-calendar",e.GOOGLE="google-calendar",e}({})},15020:(e,n,t)=>{t.d(n,{$0:()=>C,$u:()=>h,Bs:()=>k,I1:()=>T,JJ:()=>N,Ky:()=>I,M4:()=>S,ON:()=>w,PK:()=>j,PQ:()=>v,TI:()=>b,WI:()=>f,ZN:()=>s,ZY:()=>c,cH:()=>_,hN:()=>A,jY:()=>x,jg:()=>D,k0:()=>m,mA:()=>E,n2:()=>y,vd:()=>g,yE:()=>u});var i=t(89379),l=t(203),o=t(59781),a=t(12836),d=t(96444),r=t(68262);let s=function(e){return e.LAMA="lama",e.PHYSICAL="physical",e.DIGITAL="digital",e.EVENT="event",e.APPOINTMENT="appointment",e.VOUCHER="voucher",e.DONATION="donation",e}({});const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"eshop",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,l.I)(["admin-order-types",e,n],async()=>await(0,d.default)({url:"/admin/orders/types",method:"get",params:(0,i.A)({origin_type:e},n?{is_test:"true"}:{})}))},u=e=>{const n=(0,o.jE)();return(0,a.n)(n=>(0,d.default)("/admin/orders/".concat(e,"/cancel-refund"),{method:"POST",data:n}),{onSuccess:()=>{n.invalidateQueries(r.AnB.lists()),n.invalidateQueries(r.AnB.detail(e))}})},v=e=>{const n=(0,o.jE)();return(0,a.n)(()=>(0,d.default)("/admin/orders/".concat(e,"/covermanager/refresh-status"),{method:"POST"}),{onSuccess:t=>{var i;null!==t&&void 0!==t&&null!==(i=t.data)&&void 0!==i&&i.refreshed&&n.invalidateQueries(r.AnB.detail(e))}})},p=e=>["admin-order-product-form",e],m=(e,n)=>{var t;return(0,l.I)(p(e),async()=>await(0,d.default)({url:"/admin/orders/".concat(e,"/product-form"),method:"get"}),{enabled:null!==(t=null===n||void 0===n?void 0:n.enabled)&&void 0!==t?t:!!e})},h=e=>{const n=(0,o.jE)();return(0,a.n)(n=>{let{lineItemId:t,answers:i}=n;return(0,d.default)("/admin/orders/".concat(e,"/items/").concat(t,"/product-form"),{method:"POST",data:{answers:i}})},{onSuccess:()=>{n.invalidateQueries(p(e)),n.invalidateQueries(r.AnB.detail(e))}})},x=e=>{const n=(0,o.jE)();return(0,a.n)(()=>(0,d.default)("/admin/draft-orders/".concat(e,"/cancel"),{method:"POST"}),{onSuccess:()=>{n.invalidateQueries(r.nfC.all),n.invalidateQueries(r.AnB.lists())}})},g=e=>{const n=(0,o.jE)();return(0,a.n)(()=>(0,d.default)("/admin/orders/".concat(e,"/hive/cancel"),{method:"POST"}),{onSuccess:()=>{n.invalidateQueries(r.AnB.lists()),n.invalidateQueries(r.AnB.detail(e))}})},f=e=>{const n=(0,o.jE)();return(0,a.n)({mutationFn:async n=>{let{fulfillmentId:t,body:i}=n;return(0,d.default)("/admin/orders/".concat(e,"/fulfillment/").concat(t),{method:"POST",data:i})},onSuccess(){n.invalidateQueries(r.AnB.lists()),n.invalidateQueries(r.AnB.detail(e))}})},y=e=>{const n=(0,o.jE)();return(0,a.n)({mutationFn:async n=>{let{fulfillmentId:t,body:i}=n;return(0,d.default)("/admin/orders/".concat(e,"/fulfillment/").concat(t,"/tracking"),{method:"POST",data:i})},onSuccess(){n.invalidateQueries(r.AnB.lists()),n.invalidateQueries(r.AnB.detail(e))}})};function _(e,n){return(0,l.I)({queryKey:["product-revenue",e],queryFn:async()=>(0,d.default)("/admin/products/".concat(e,"/revenue"),{method:"GET"}),enabled:!(null===n||void 0===n||!n.enabled)&&!!e})}const j=()=>(0,a.n)({mutationFn:async e=>(0,d.default)("/admin/orders/export",{method:"POST",data:e}),onSuccess(){}}),C=()=>(0,a.n)({mutationFn:async e=>
1(0,d.default)("/admin/gift-cards/export",{method:"POST",data:e}),onSuccess(){}}),w=()=>(0,a.n)({mutationFn:async e=>(0,d.default)("/admin/orders/invoices/export",{method:"POST",data:e}),onSuccess(){}}),A=e=>{const n=(0,o.jE)();return(0,a.n)({mutationFn:async n=>(0,d.default)("/admin/draft-orders/".concat(e,"/pay"),{method:"POST",data:n}),onSuccess(){n.invalidateQueries(r.AnB.all),n.invalidateQueries(r.nfC.all),n.invalidateQueries(["studio-payment-method"]),n.invalidateQueries(r.fdI.all)}})},b=e=>{const n=(0,o.jE)();return(0,a.n)({mutationFn:async n=>(0,d.default)("/admin/draft-orders/".concat(e,"/pay-confirm"),{method:"POST",data:n}),onSuccess(){n.invalidateQueries(r.AnB.all),n.invalidateQueries(r.nfC.all),n.invalidateQueries(["studio-payment-method"]),n.invalidateQueries(r.fdI.all)}})},k=()=>{const e=(0,o.jE)();return(0,a.n)({mutationFn:async e=>(0,d.default)("/admin/orders/".concat(e,"/test-order"),{method:"DELETE"}),onSuccess(){e.invalidateQueries(r.AnB.all)}})},D=e=>{const n=(0,o.jE)();return(0,a.n)({mutationFn:async n=>(0,d.default)("/admin/orders/".concat(e,"/hive/generate"),{method:"POST",data:n}),onSuccess(){n.invalidateQueries(r.AnB.all),n.invalidateQueries(r.AnB.detail(e))}})},T=e=>(0,a.n)({mutationFn:async()=>(0,d.default)("/admin/orders/".concat(e,"/email/resend"),{method:"POST"})}),I=e=>(0,a.n)({mutationFn:async()=>(0,d.default)("/admin/orders/".concat(e,"/gift-card/resend"),{method:"POST"})}),E=e=>(0,a.n)({mutationFn:async n=>(0,d.default)("/admin/orders/".concat(e,"/invoice/send"),{method:"POST",data:n})}),S=(e,n)=>{var t;return(0,l.I)(["admin-order-sent-emails",e],async()=>await(0,d.default)("/admin/orders/".concat(e,"/emails"),{method:"GET"}),{enabled:!!e&&(null===(t=null===n||void 0===n?void 0:n.enabled)||void 0===t||t)})},N=(e,n,t)=>{var i;return(0,l.I)(["admin-order-sent-email-preview",e,n],async()=>await(0,d.default)("/admin/orders/".concat(e,"/emails/").concat(n,"/preview"),{method:"GET"}),{enabled:!!e&&!!n&&(null===(i=null===t||void 0===t?void 0:t.enabled)||void 0===i||i)})}},16391:(e,n,t)=>{t.d(n,{A:()=>j,C:()=>_});var i,l=t(57528),o=t(16569),a=t(57645),d=t(54473),r=t(68262),s=t(65043),c=t(74117),u=t(2826),v=t(91646),p=t(76925),m=t(26449),h=t(4686),x=t(87790),g=t(26399),f=t(22602),y=t(70579);const _=(0,u.Ay)(x.A)(i||(i=(0,l.A)(["\n  input {\n    cursor: text !important;\n    font-size: 14px !important;\n  }\n  .ant-input-prefix {\n    button {\n      background-color: white;\n      border-right: 1px solid #e6ebf1;\n      border-radius: 4px 0px 0px 4px !important;\n\n      &:hover {\n        border-radius: 4px 0px 0px 4px !important;\n      }\n    }\n  }\n  border-radius: 4px !important;\n\n  .ant-input-suffix {\n    button {\n      background-color: white;\n      border-left: 1px solid #e6ebf1;\n      border-radius: 0px 4px 4px 0px !important;\n\n      &:hover {\n        border-radius: 0px 4px 4px 0px !important;\n      }\n    }\n  }\n"]))),j=e=>{let{product:n,collection:t,size:i,style:l,popover:u,copyButtonPosition:_="suffix",copiedText:j,link:C,isReferralLink:w=!1,fullWidth:A=!1}=e;const{store:b}=(0,r.gbT)(),{t:k}=(0,c.Bd)("store/products/products/table"),{mutateAsync:D}=(0,d.Gg)(),T=(0,g.al)(),I=(0,s.useRef)(null),E=(0,s.useMemo)(()=>null!==C&&void 0!==C?C:null!==n&&void 0!==n&&n.title?"".concat(a.I6,"/").concat(null===b||void 0===b?void 0:b.eshop_handle,"/").concat((0,p.gU)((0,p.YW)(n))).concat((0,v.e9)(n.title,n.handle||"")):t?"".concat(a.I6,"/").concat(null===b||void 0===b?void 0:b.eshop_handle,"/").concat(t.handle):"".concat(a.I6,"/").concat(null===b||void 0===b?void 0:b.eshop_handle),[b,n,C,t]),S=e=>{e.preventDefault(),e.stopPropagation(),navigator.clipboard.writeText(E),o.Ay.success(j||k("link.copied")),w&&(I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{D()},300))},N=(0,s.useMemo)(()=>(0,y.jsx)(f.A,{placement:"bottom",title:u||(0,y.jsx)("div",{children:(0,y.jsxs)(c.x6,{i18nKey:"link.popover",t:k,components:{b:(0,y.jsx)("b",{})},children:["Copy ",(0,y.jsx)("b",{children:"product link"})," to clipboard."]})}),children:(0,y.jsx)(h.Ay,{onClick:S,type:"ghost",size:"small",icon:m.Link02Icon})}),[u,S,i,k]);return(0,y.jsx)("div",{onClick:S,className:"d-flex ".concat(A?"w-100":""),children:(0,y.jsx)(x.A,{readOnly:!0,onClick:S,style:{paddingLeft:"prefix"===_?T?4:2:void 0,paddingRight:"suffix"===_?T?4:2:void 0},value:E.replace("https://","").replace("http://",""),suffix:"suffix"===_?N:void 0,prefix:"prefix"===_?N:void 0})})}},26847:(e,n,t)=>{t.d(n,{A:()=>d});var i=t(89379),l=t(77720),o=t(70579);const a=()=>(0,o.jsxs)("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsxs)("g",{"clip-path":"url(#clip0_10301_51201)",children:[(0,o.jsx)("rect",{width:"60",height:"60",rx:"13.28",fill:"url(#paint0_linear_10301_51201)"}),(0,o.jsx)("path",{d:"M19.7658 47.9336L19.0674 47.5243L18.2809 47.7159L10.934 49.5063L12.8238 42.4277L13.0437 41.604L12.6017 40.875C10.4115 37.2621 9.37859 33.0378 9.68482 28.7778C10.0593 23.5684 12.408 18.6984 16.2515 15.1619C20.0949 11.6255 25.1432 9.68947 30.3658 9.749C35.5883 9.80854 40.5911 11.8592 44.353 15.4823C48.1148 19.1054 50.3519 24.0278 50.6075 29.2444C50.8631 34.461 49.118 39.5784 45.7284 43.552C42.3388 47.5255 37.5604 50.0554 32.3687 50.6253C27.9672 51.1084 23.55 50.1518 19.7658 47.9336Z",stroke:"white",strokeWidth:"4"}),(0,o.jsx)("path",{d:"M26.2878 24.7153L25.0718 21.0675C24.8091 20.2792 24.0714 19.7476 23.2405 19.7476C22.1963 19.7476 21.1317 20.043 20.443 20.8279C19.4217 21.9917 19.1318 23.2247 19.1318 24.7476C19.1319 30.2476 28.6318 40.2476 35.6318 40.7476C38.3134 40.9391 40.5954 39.9893 41.4068 36.5718C41.5943 35.7819 41.1663 34.9936 40.4536 34.6049L37.5539 33.0232C36.7248 32.571 35.6923 32.7604 35.0777 33.4774L33.5614 35.2464C33.3008 35.5504 32.8823 35.6724 32.5054 35.5374C29.2613 34.3751 27.5411 32.5386 25.041 28.8559C24.7964 28.4956 24.8166 28.0166 25.0887 27.6765L25.9521 26.5972C26.3759 26.0674 26.5023 25.3589 26.2878 24.7153Z",fill:"white"})]}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"paint0_linear_10301_51201",x1:"30",y1:"0",x2:"30",y2:"60",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{"stop-color":"#00FF68"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#00D624"})]}),(0,o.jsx)("clipPath",{id:"clip0_10301_51201",children:(0,o.jsx)("rect",{width:"60",height:"60",rx:"13.28",fill:"white"})})]})]}),d=e=>(0,o.jsx)(l.A,(0,i.A)({component:a},e))},30119:(e,n,t)=>{t.d(n,{A:()=>r});var i=t(58168),l=t(65043);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var a=t(6127),d=function(e,n){return l.createElement(a.A,(0,i.A)({},e,{ref:n,icon:o}))};const r=l.forwardRef(d)},30596:(e,n,t)=>{t.d(n,{_X:()=>p,gH:()=>m,iX:()=>v});var i=t(60446),l=t.n(i),o=t(65043),a=t(13549),d=t(8259),r=t.n(d),s=t(65030),c=t.n(s),u=t(74117);function v(e,n){const t=e?l().utc(e).tz(n||"Europe/Paris",!1):(0,a.uK)(l()((new Date).toUTCString()).tz("Europe/Paris",!0)),[i,d]=(0,o.useState)(t),[r,s]=(0,o.useState)(t),[c,u]=(0,o.useState)(!1),[v,p]=(0,o.useState)(n||"Europe/Paris");return{tempDate:i,tempTime:r,addTime:c,timeZone:v,setTempDate:d,setTempTime:s,setAddTime:u,setTimeZone:p}}
1function p(e){const[n,t]=(0,o.useState)(e||1);return{tempDuration:n,setTempDuration:t}}function m(){const{t:e}=(0,u.Bd)("my-page/event-product");return{twentyFourHoursOptions:(0,o.useMemo)(()=>Array.from({length:24},(e,n)=>n+1).map(n=>({value:n,label:1===n?e("hour"):e("hours",{hours:n})})),[e]),twentyFourHoursOptionsAndMinutes:(0,o.useMemo)(()=>Array.from({length:48},(n,t)=>{const i=.5*(t+1),l=Math.floor(i),o=i%1*60;let a;return a=0===o?1===l?e("hour"):e("hours",{hours:l}):0===l?e("minutes",{minutes:o}):e(1===l?"hour.minutes":"hours.minutes",{hours:l,minutes:o}),{value:i,label:a}}),[e]),durationOptions:(0,o.useMemo)(()=>[{value:.75,label:e("duration_min",{minutes:45})},{value:1,label:e("duration_hour",{hours:1})},{value:1.5,label:e("duration_hour_min",{hours:1,minutes:30})},{value:2,label:e("duration_hours",{hours:2})},{value:2.5,label:e("duration_hours_min",{hours:2,minutes:30})},{value:3,label:e("duration_hours",{hours:3})},{value:4,label:e("duration_hours",{hours:4})},{value:-1,label:e("duration_custom")}],[e])}}l().extend(r()),l().extend(c())},38822:(e,n,t)=>{t.d(n,{A:()=>o});var i=t(47522),l=t(70579);const o=e=>{let{children:n,className:t,size:o="default"}=e;return(0,l.jsx)(i.A,{type:"success",size:o,className:t,children:n})}},40584:(e,n,t)=>{t.d(n,{A:()=>o});var i=t(47522),l=t(70579);const o=e=>{let{children:n,className:t,size:o="default"}=e;return(0,l.jsx)(i.A,{type:"error",size:o,className:t,children:n})}},43387:(e,n,t)=>{var i=t(24994).default,l=t(6305).default;n.A=void 0;var o=i(t(94634)),a=i(t(12897)),d=i(t(43693)),r=i(t(91847)),s=l(t(65043)),c=i(t(98139)),u=t(71147),v=i(t(56511)),p=t(33774),m=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],h=s.forwardRef(function(e,n){var t=e.className,i=e.component,l=e.viewBox,h=e.spin,x=e.rotate,g=e.tabIndex,f=e.onClick,y=e.children,_=(0,r.default)(e,m),j=s.useRef(),C=(0,u.useComposeRef)(j,n);(0,p.warning)(Boolean(i||y),"Should have `component` prop or `children`."),(0,p.useInsertStyles)(j);var w=s.useContext(v.default),A=w.prefixCls,b=void 0===A?"anticon":A,k=w.rootClassName,D=(0,c.default)(k,b,(0,d.default)({},"".concat(b,"-spin"),!!h&&!!i),t),T=(0,c.default)((0,d.default)({},"".concat(b,"-spin"),!!h)),I=x?{msTransform:"rotate(".concat(x,"deg)"),transform:"rotate(".concat(x,"deg)")}:void 0,E=(0,a.default)((0,a.default)({},p.svgBaseProps),{},{className:T,style:I,viewBox:l});l||delete E.viewBox;var S=g;return void 0===S&&f&&(S=-1),s.createElement("span",(0,o.default)({role:"img"},_,{ref:C,tabIndex:S,onClick:f,className:D}),i?s.createElement(i,E,y):y?((0,p.warning)(Boolean(l)||1===s.Children.count(y)&&s.isValidElement(y)&&"use"===s.Children.only(y).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),s.createElement("svg",(0,o.default)({},E,{viewBox:l}),y)):null)});h.displayName="AntdIcon";n.A=h},46564:(e,n,t)=>{t.d(n,{$O:()=>w,Ay:()=>A});var i,l,o=t(57528),a=t(98734),d=t(65043),r=t(60446),s=t.n(r),c=(t(3782),t(33513),t(82139),t(77534),t(60182),t(2826)),u=t(74117),v=t(63935),p=t(30119),m=t(13549),h=t(26399),x=t(51348),g=t(76910),f=t(16145),y=t(22832),_=t(70579);const{Option:j}=y.A,C=(0,c.Ay)(y.A)(i||(i=(0,o.A)(["\n  height: 20px !important;\n  .ant-select-arrow {\n    display: ",";\n    color: "," !important;\n  }\n\n  .ant-select-selection-item {\n    padding: ",";\n  }\n"])),e=>e.disabled?"none !important":"",v.jd,e=>e.disabled?"0px !important":""),w=c.Ay.div(l||(l=(0,o.A)(["\n  width: 100%;\n  display: flex;\n  justify-content: center;\n\n  /* Hide the default input */\n  .ant-picker {\n    display: none !important;\n  }\n\n  /* Force the calendar panel to show and fill the width */\n  .ant-picker-dropdown {\n    position: static !important;\n    display: block !important;\n    width: 100% !important;\n    box-shadow: none;\n    padding: 0;\n  }\n\n  .ant-picker-cell-selected {\n    padding: 0 !important;\n  }\n\n  .ant-picker-cell-selected .ant-picker-cell-inner {\n    min-width: 36px !important;\n    height: 36px !important;\n    border-radius: 18px !important;\n    line-height: 36px !important;\n  }\n\n  .ant-picker-cell-today .ant-picker-cell-inner::before {\n    border-radius: 1000px !important;\n  }\n\n  .ant-picker-panel-container {\n    width: 100% !important;\n    box-shadow: none !important;\n  }\n\n  .ant-picker-panel {\n    width: 100% !important;\n  }\n\n  .ant-picker-year-panel {\n    width: 100% !important;\n  }\n\n  .ant-picker-date-panel {\n    width: 100% !important;\n  }\n\n  .ant-picker-month-panel {\n    width: 100% !important;\n  }\n\n  .ant-picker-decade-panel {\n    width: 100% !important;\n  }\n\n  .ant-picker-content {\n    width: 100% !important;\n  }\n\n  .ant-picker-content table {\n    width: 100% !important;\n    table-layout: fixed !important;\n  }\n\n  /* Center day headers & day numbers */\n  .ant-picker-content th,\n  .ant-picker-content td {\n    text-align: center;\n    vertical-align: middle;\n  }\n\n  .ant-picker-cell-inner {\n    display: flex;
1\n    align-items: center;\n    justify-content: center;\n  }\n"]))),A=e=>{let{date:n,add_time:t,timezone:i,show:l,setUpdateTrigger:o,hideAddTimeSwitch:r,timeTitle:c,disableTimezone:y,controls:w}=e;const{t:A}=(0,u.Bd)("my-page/event"),b=(0,h.al)(),{tempDate:k,tempTime:D,addTime:T,timeZone:I,setTempDate:E,setTempTime:S,setAddTime:N,setTimeZone:P}=w,M=(e,n)=>s().utc(null===e||void 0===e?void 0:e.format("YYYY-MM-DD HH:mm:ss")).tz(n,!0);(0,d.useEffect)(()=>{E((0,m.uK)(s().utc(n||new Date).tz(i,!1))),S((0,m.uK)(s().utc(n||new Date).tz(i,!1))),N(t),i&&P(i)},[n]);(0,d.useEffect)(()=>{o&&o(String(T))},[T]);const L=(0,d.useRef)(!1),B=(0,d.useRef)(null),O=e=>{L.current=!1;const n=e.querySelectorAll(".ant-picker-time-panel-cell"),t=e.getBoundingClientRect(),i=t.top+t.height/2;let l=null,o=1/0;if(n.forEach(e=>{const n=e.getBoundingClientRect(),t=n.top+n.height/2,a=Math.abs(t-i);a<o&&(o=a,l=e)}),l){const n=l.querySelector(".ant-picker-time-panel-cell-inner");n&&(n.click(),setTimeout(()=>{F(e)},50))}},z=e=>{L.current=!0,B.current&&clearTimeout(B.current),B.current=window.setTimeout(()=>{O(e.target)},250)},F=e=>{if(L.current)return;const n=e.querySelector(".ant-picker-time-panel-cell-selected");if(n){const t=e.getBoundingClientRect(),i=t.top+t.height/2,l=n.getBoundingClientRect(),o=l.top+l.height/2;if(Math.abs(o-i)>5){const n=o-i;e.scrollBy({top:n,behavior:"smooth"})}}};return(0,d.useEffect)(()=>{T&&setTimeout(()=>{const e=document.querySelector(".ant-picker-time-panel");if(!e)return;const n=Element.prototype.scrollIntoView;function t(){if(L.current)return;return this.closest(".ant-picker-time-panel-column")?void 0:n.apply(this,arguments)}const i=e.querySelectorAll("*");return i.forEach(e=>{e.scrollIntoView=t}),document.querySelectorAll(".ant-picker-time-panel-column").forEach(e=>{e.removeEventListener("scroll",z),e.addEventListener("scroll",z),e.addEventListener("touchstart",()=>{L.current=!0}),e.addEventListener("touchend",()=>{O(e)}),e.addEventListener("wheel",()=>{L.current=!0,B.current&&clearTimeout(B.current),B.current=window.setTimeout(()=>{O(e)},250)},{passive:!0})}),()=>{i.forEach(e=>{e.scrollIntoView=n})}},300)},[T]),(0,d.useEffect)(()=>{T&&setTimeout(()=>{document.querySelectorAll(".ant-picker-time-panel-column").forEach(e=>F(e))},350)},[T,D]),(0,_.jsxs)(a.A,{flexDirection:"column",children:[l&&(0,_.jsx)(x.A,{wrapperStyle:{maxWidth:"100%"},className:"w-100",value:k,onChange:e=>E(s()(e)),placement:"bottomRight",open:!0,getPopupContainer:e=>e.parentNode,allowClear:!1,showToday:!1,disabledDate:e=>e&&e<s()().tz(I).startOf("day"),bordered:!1,style:{width:"100%"},format:"YYYY-MM-DD"}),(0,_.jsxs)("div",{className:"pr-3 pl-3 pb-3",children:[(0,_.jsxs)(a.A,{alignItems:"center",gap:"sm",justifyContent:"between",className:"w-100",children:[(0,_.jsxs)(a.A,{alignItems:"center",gap:"sm",children:[(0,_.jsx)(g.A,{checked:T,onChange:e=>N(e),defaultChecked:T}),(0,_.jsx)("div",{className:b?"text-base-medium":"text-sm-medium",children:c||A("add_time")})]}),T&&(0,_.jsx)(a.A,{children:(0,_.jsx)(C,{bordered:!1,optionLabelProp:"label",style:{width:"100%"},value:I,disabled:y,onChange:e=>{P(e),E(M(k,e)),S(M(D,e))},children:Object.values(m.jW).sort((e,n)=>e.UTC-n.UTC).map(e=>(0,_.jsxs)(j,{value:e.tz,label:(0,_.jsxs)(a.A,{alignItems:"center",justifyContent:"end",gap:"xs",className:"mr-1",children:[(0,_.jsx)(p.A,{})," ",(0,_.jsxs)("div",{children:["UTC ",e.display]})]}),children:[(0,_.jsxs)("div",{style:{lineHeight:"1rem",marginTop:"6px"},children:["UTC ",e.display]}),(0,_.jsx)("p",{style:{fontSize:"11px",color:I===e.tz?v.Qi:""},className:"mb-0",children:e.mainCities.join(", ")})]},e.UTC))})})]}),T&&(0,_.jsx)(f.Ay,{className:"pt-3 pb-3 pr-0 pl-0",date:D,onChange:e=>{S(s()(e).tz(I))}})]})]})}},46746:(e,n,t)=>{t.d(n,{A:()=>l});t(65043);var i=t(70579);const l=e=>{let{className:n}=e;return(0,i.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:null!==n&&void 0!==n?n:"",children:(0,i.jsx)("path",{d:"M8.33333 14.9974C8.55435 14.9974 8.76631 14.9096 8.92259 14.7533C9.07887 14.597 9.16667 14.3851 9.16667 14.1641V9.16406C9.16667 8.94305 9.07887 8.73109 8.92259 8.57481C8.76631 8.41853 8.55435 8.33073 8.33333 8.33073C8.11232 8.33073 7.90036 8.41853 7.74408 8.57481C7.5878 8.73109 7.5 8.94305 7.5 9.16406V14.1641C7.5 14.3851 7.5878 14.597 7.74408 14.7533C7.90036 14.9096 8.11232 
114.9974 8.33333 14.9974ZM16.6667 4.9974H13.3333V4.16406C13.3333 3.50102 13.0699 2.86514 12.6011 2.3963C12.1323 1.92745 11.4964 1.66406 10.8333 1.66406H9.16667C8.50363 1.66406 7.86774 1.92745 7.3989 2.3963C6.93006 2.86514 6.66667 3.50102 6.66667 4.16406V4.9974H3.33333C3.11232 4.9974 2.90036 5.08519 2.74408 5.24147C2.5878 5.39775 2.5 5.60972 2.5 5.83073C2.5 6.05174 2.5878 6.2637 2.74408 6.41998C2.90036 6.57627 3.11232 6.66406 3.33333 6.66406H4.16667V15.8307C4.16667 16.4938 4.43006 17.1297 4.8989 17.5985C5.36774 18.0673 6.00363 18.3307 6.66667 18.3307H13.3333C13.9964 18.3307 14.6323 18.0673 15.1011 17.5985C15.5699 17.1297 15.8333 16.4938 15.8333 15.8307V6.66406H16.6667C16.8877 6.66406 17.0996 6.57627 17.2559 6.41998C17.4122 6.2637 17.5 6.05174 17.5 5.83073C17.5 5.60972 17.4122 5.39775 17.2559 5.24147C17.0996 5.08519 16.8877 4.9974 16.6667 4.9974ZM8.33333 4.16406C8.33333 3.94305 8.42113 3.73109 8.57741 3.57481C8.73369 3.41853 8.94565 3.33073 9.16667 3.33073H10.8333C11.0543 3.33073 11.2663 3.41853 11.4226 3.57481C11.5789 3.73109 11.6667 3.94305 11.6667 4.16406V4.9974H8.33333V4.16406ZM14.1667 15.8307C14.1667 16.0517 14.0789 16.2637 13.9226 16.42C13.7663 16.5763 13.5543 16.6641 13.3333 16.6641H6.66667C6.44565 16.6641 6.23369 16.5763 6.07741 16.42C5.92113 16.2637 5.83333 16.0517 5.83333 15.8307V6.66406H14.1667V15.8307ZM11.6667 14.9974C11.8877 14.9974 12.0996 14.9096 12.2559 14.7533C12.4122 14.597 12.5 14.3851 12.5 14.1641V9.16406C12.5 8.94305 12.4122 8.73109 12.2559 8.57481C12.0996 8.41853 11.8877 8.33073 11.6667 8.33073C11.4457 8.33073 11.2337 8.41853 11.0774 8.57481C10.9211 8.73109 10.8333 8.94305 10.8333 9.16406V14.1641C10.8333 14.3851 10.9211 14.597 11.0774 14.7533C11.2337 14.9096 11.4457 14.9974 11.6667 14.9974Z",fill:"currentColor"})})}},49096:(e,n,t)=>{t.d(n,{A:()=>y});var i=t(43801),l=t(16569),o=t(98734),a=t(49822),d=t(65043),r=t(74117),s=t(88991),c=t(4686),u=t(87790),v=t(26449),p=t(40973),m=t(62704),h=t(13549),x=t(89352),g=t(22832),f=t(70579);const y=e=>{var n,t,y,_,j;let{open:C,onCancel:w,eventType:A,availability:b,seatsLeft:k,totalTicketsLeftForVariant:D}=e;const{t:T}=(0,r.Bd)("store/products/products/drawer"),[I]=i.A.useForm(),E=i.A.useWatch("email",I),S=i.A.useWatch("name",I),[N,P]=(0,d.useState)(""),[M,L]=(0,d.useState)(1),B=i.A.useWatch("variant_id",I),{mutateAsync:O,isLoading:z}=(0,a.PE)((null===A||void 0===A?void 0:A.id)||""),F=()=>{I.resetFields(),P(""),L(1)};(0,d.useEffect)(()=>{C||F()},[C]);const R=(0,d.useMemo)(()=>{var e,n,t;return(null===D||void 0===D?void 0:D[B||(null===A||void 0===A||null===(e=A.product)||void 0===e||null===(n=e.variants)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.id)])||0},[null===A||void 0===A||null===(n=A.product)||void 0===n?void 0:n.variants,B,k]);return(0,f.jsx)(s.oZ,{open:C,onCancel:w,width:600,title:T("add_attendee"),footer:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.Ay,{type:"secondary",onClick:w,children:T("cancel")}),(0,f.jsx)(c.Ay,{htmlType:"submit",loading:z,disabled:!E||!S,onClick:()=>I.submit(),children:T("save")})]}),children:(0,f.jsx)(i.A,{form:I,onFinish:async e=>{try{var n,t,i,o;const l=(0,h.E4)((null===b||void 0===b?void 0:b.start_time)||"",(null===b||void 0===b?void 0:b.end_time)||"");await O({first_name:e.name.split(" ")[0],last_name:(null===(n=e.name.split(" "))||void 0===n?void 0:n[1])||"",email:e.email,phone:N,origin:"manual",items:[{variant_id:B||(null===A||void 0===A||null===(t=A.product)||void 0===t||null===(i=t.variants)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id),quantity:M}],start_time:(null===b||void 0===b?void 0:b.date)||new Date,end_time:null!==b&&void 0!==b&&b.end_date?null===b||void 0===b?void 0:b.end_date:null!==b&&void 0!==b&&b.date?new Date(new Date(null===b||void 0===b?void 0:b.date).getTime()+l):new Date,full_day:!(null===b||void 0===b||!b.end_date),number_of_seats:M}),F(),w()}catch(a){console.log("Error creating contact",a),l.Ay.error(T("add_attendee.error"))}},layout:"vertical",requiredMark:!1,children:(0,f.jsxs)(o.A,{gap:"md",flexDirection:"column",children:[(0,f.jsx)(x.A,{type:"info",content:T("add_attendee.info")}),((null===A||void 0===A||null===(t=A.product)||void 0===t||null===(y=t.variants)||void 0===y?void 0:y.length)||0)>1&&(0,f.jsx)(m.A,{required:!0,className:"w-100",label:T("ticket"),name:"variant_id",rules:[{required:!0,message:T("add_attendee.ticket.required")}],children:(0,f.jsx)(g.A,{options:null===A||void 0===A||null===(_=A.product)||void 0===_||null===(j=_.variants)||void 0===j?void 0:j.map(e=>({label:e.title,value:e.id,disabled:null!=(null===D||void 0===D?void 0:D[e.id])&&(null===D||void 0===D?void 0:D[e.id])<=0})),placeholder:T("add_attendee.ticket.placeholder")})}
1),(0,f.jsx)(o.A,{alignItems:"start",gap:"md",children:(0,f.jsx)(m.A,{required:!0,className:"w-100",label:T("add_attendee.name"),name:"name",rules:[{required:!0,message:T("add_attendee.name.required")}],children:(0,f.jsx)(u.A,{placeholder:"John Doe"})})}),(0,f.jsx)(m.A,{label:T("add_attendee.email"),name:"email",required:!0,rules:[{required:!0,message:T("add_attendee.email.required")},{type:"email",message:T("add_attendee.email.invalid")}],children:(0,f.jsx)(u.A,{placeholder:"[email protected]",type:"email"})}),(0,f.jsx)(m.A,{label:T("add_attendee.phone"),name:"phone",rules:[{required:!0,type:"regexp",validator:(e,n)=>n?n.length<10?Promise.reject(T("add_attendee.phone_number_must_be_at_least_10_digits")):/^[0-9+]*$/.test(n)?Promise.resolve():Promise.reject(T("add_attendee.phone_number_must_contain_only_digits")):Promise.resolve()}],children:(0,f.jsx)(p.A,{specialLabel:"",placeholder:"+33623456789",enableSearch:!0,disableSearchIcon:!0,value:N,onChange:e=>P(e)})}),(0,f.jsxs)(o.A,{flexDirection:"column",gap:"xs",children:[(0,f.jsx)("div",{className:"font-weight-normal",children:T("add_attendee.persons")}),(0,f.jsxs)(o.A,{alignItems:"center",gap:"sm",children:[(0,f.jsx)(c.Ay,{style:{borderRadius:100},type:"secondary",onClick:()=>L(e=>e-1),disabled:M<=1,icon:v.Remove01Icon}),(0,f.jsx)("div",{style:{fontSize:16},className:"font-weight-semibold",children:M}),(0,f.jsx)(c.Ay,{style:{borderRadius:"100%"},type:"secondary",onClick:()=>L(e=>e+1),disabled:null!=k&&M>=k||null!=R&&M>=R,icon:v.Add01Icon})]})]})]})})})}},54473:(e,n,t)=>{t.d(n,{Gg:()=>g,K$:()=>v,OB:()=>h,a$:()=>m,kx:()=>u,qC:()=>x,zw:()=>p});var i=t(89379),l=t(80045),o=t(203),a=t(12836),d=t(96444),r=t(95406);const s=["data"],c=["data"];let u=function(e){return e.PENDING="pending",e.PAID="paid",e.TRIALING="trialing",e}({});function v(e,n){const t=(0,o.I)(["referrals",e],{queryFn:async()=>(0,d.default)("/admin/referrals".concat((0,r.cX)(e||{})),{method:"GET"}),enabled:void 0===(null===n||void 0===n?void 0:n.enabled)||n.enabled,keepPreviousData:void 0===(null===n||void 0===n?void 0:n.keepPreviousData)||n.keepPreviousData}),{data:a}=t,c=(0,l.A)(t,s);return(0,i.A)((0,i.A)({},a),c)}function p(){return(0,a.n)({mutationFn:async e=>(0,d.default)("/admin/user/verify-email",{method:"GET"}),onSuccess:()=>{console.log("onSuccess")}})}function m(){return(0,a.n)({mutationFn:async e=>{let{code:n}=e;return(0,d.default)("/admin/user/verify-email/confirm",{method:"POST",data:{code:n}})}})}function h(){return(0,a.n)({mutationFn:async e=>(0,d.default)("/admin/user/check-email-code",{method:"POST",headers:{"public-request":"true"},data:{code:e}}),onSuccess:()=>{console.log("onSuccess")}})}function x(e,n){const t=(0,o.I)(["referral-payouts",e],{queryFn:async()=>(0,d.default)("/admin/referral-payouts".concat((0,r.cX)(e||{})),{method:"GET"}),enabled:void 0===(null===n||void 0===n?void 0:n.enabled)||n.enabled,keepPreviousData:void 0===(null===n||void 0===n?void 0:n.keepPreviousData)||n.keepPreviousData}),{data:a}=t,s=(0,l.A)(t,c);return(0,i.A)((0,i.A)({},a),s)}function g(){return(0,a.n)({mutationFn:async()=>(0,d.default)("/admin/referral-link-copy-count",{method:"POST"}),onSuccess:()=>{console.log("onSuccess")}})}},56126:(e,n,t)=>{t.r(n),t.d(n,{default:()=>lt});var i=t(57528),l=t(75337),o=t(13382),a=t(92477),d=t(9492),r=t(98734),s=t(74117),c=t(65043),u=t(26399),v=t(95406),p=t(68654),m=t(2826),h=t(89379),x=t(67351),g=t(72528),f=t(70579);const y=e=>{let{filters:n,setFilters:t,eventTypeOptions:i}=e;const l=(0,u.al)(),{t:o}=(0,s.Bd)(["calendar/index"]),{integrationCalendars:a}=(0,g.rZ)(),d=(0,c.useMemo)(()=>[{label:o("paage.events"),image:"/128x128.png",value:"paage"},...a.map(e=>({label:e.name,image:"google_calendar"===e.integration?"https://lamaco-strapi.s3.eu-west-3.amazonaws.com/icons8_calendrier_google_480_f2937f4222.png":"https://lamaco-strapi.s3.eu-west-3.amazonaws.com/icons8_calendrier_perspectives_480_d9ce4f9ab4.png",value:e.externalId}))],[a]),v=e=>{if(n.online===e){const e=(0,h.A)({},n);delete e.online,t(e)}else t((0,h.A)((0,h.A)({},n),{},{online:e}))};return(0,f.jsxs)(r.A,{style:{paddingBottom:l?20:0},gap:"xs",alignItems:"center",children:[!(null===d||void 0===d||!d.length)&&(null===d||void 0===d?void 0:d.length)>1&&(0,f.jsx)("div",{style:{minWidth:l?"":200},children:(0,f.jsx)(x.Ay,{type:"select",value:n.calendarId,onChange:e=>{if(e)t((0,h.A)((0,h.A)({},n),{},{calendarId:e}));else{const e=(0,h.A)({},n);delete e.calendarId,t(e)}},label:o("calendar"),options:d})}),(0,f.jsx)("div",{style:{minWidth:l?"":140},children:(0,f.jsx)(x.Ay,{type:"select",value:n.eventTypeId,onChange:e=>{if(e)t((0,h.A)((0,h.A)({},n),{},{eventTypeId:e}));else{const e=(0,h.A)({},n);delete e.eventTypeId,t(e)}},label:o("event_type"),options:i,disabled:!(null!==i&&void 0!==i&&i.length)||1===(null===i||void 0===i?void 0:i.length)})}),(0,f.jsx)(x.Ay,{type:"binary",selected:!0===n.online,onChange:()=>v(!0),label:o("online")}),(0,f.jsx)(x.Ay,{type:"binary",selected:!1===n.online,onChange:()=>v(!1),label:o("offline")})]})};var _,j,C,w,A,b,k,D,T,I,E,S,N,P,M,L=t(60446),B=t.n(L),O=t(8259),z=t.n(O),F=t(65030),R=t.n(F),q=t(52194),H=t(682),Z=t(99905),U=t(63935),Q=t(92756);const W=m.Ay.div(_||(_=(0,i.A)(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  width: 100%;\n"]))),V=(0,m.Ay)(q.A).attrs(e=>(0,h.A)({},e))(j||(j=(0,i.A)(["\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n\n  @media (min-width: 992px) {\n    border: 1px solid #e8e8e8;\n    border-radius: 10px;\n    overflow: hidden;\n  }\n\n  @media (max-width: 991px) {\n    border: none;\n  }\n\n  // Make the calendar body take all available space\n  .ant-picker-panel {\n    display: flex;\n    flex-direction: column;\n    flex: 1;\n    height: 100%;\n  }\n\n  .ant-picker-date-panel {\n    height: 100%;\n  }\n\n  .ant-picker-body {\n    flex: 1;\n    display: flex;\n    flex-direction: column;\n    padding: 0px !important;\n    overflow: hidden; /* Prevent scrolling */\n  }\n\n  /* Control table layout to ensure equal row heights */\n  table {\n    height: 100%;\n    table-layout: fixed; /* Enforce equal cell widths */\n  }\n\n  thead {\n    height: 28px !important;\n    /* @media (max-width: 991px) {\n      background: white;\n      z-index: 2000;\n      position: relative;\n    } */\n  }\n\n  /* Style week rows to be equal height */\n  tbody tr {\n    height: calc(\n      (100svh - ","px) / 6\n    ); /* Distribute height evenly for 6 weeks, minus header row height */\n    max-height: calc(\n      (100svh - ","px) / 6\n    ); /* Distribute height evenly for 6 weeks, minus header row height */\n    overflow: hidden;\n  }\n\n  /* Ensure table cells maintain equal heights */\n  td {\n    vertical-align: top;\n    height: 100% !important;\n  }\n\n  /* Style the calendar date cells */\n  .ant-picker-calendar-date {\n    height: 100% !important;\n    padding: 4px 8px !important; /* Adjust padding to improve space usage */\n    display: flex;\n    flex-direction: column;\n  }\n\n  /* Style the date content area to take remaining space */\n  .ant-picker-calendar-date-content {\n    overflow: hidden;\n    @media (min-width: 992px) {\n      height: calc(\n        ((100svh - ","px) / 6) - 33px\n      ) !important;\n    }\n\n    @media (max-width: 991px) {\n      height: calc(\n        ((100svh - ","px) / 6) - 23px\n      ) !important;\n    }\n  }\n\n  .ant-picker-cell-today .ant-picker-cell-inner::before {\n    border: ",";\n  }\n\n  .ant-picker-cell {\n    &:hover {\n      transition: background 0.3s ease;\n      background: ",";\n    }\n  }\n"])),e=>e.offset||0,e=>e.offset||0,e=>e.offset||0,e=>e.offset||0,e=>e.isTodaySelected?"":"none !important",U.Qi),Y=m.Ay.div(C||(C=(0,i.A)(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 16px;\n"]))),G=m.Ay.span(w||(w=(0,i.A)(["\n  @media (min-width: 992px) {\n    font-size: 24px;\n  }\n\n  @media (max-width: 991px) {\n    font-size: 18px;\n  }\n\n  margin: 0;\n  font-weight: 600;\n"]))),K=m.Ay.span(A||(A=(0,i.A)(["\n  @media (min-width: 992px) {\n    font-size: 24px;\n  }\n\n  @media (max-width: 991px) {\n    font-size: 18px;\n  }\n  font-weight: 400;\n"]))),X=m.Ay.button(b||(b=(0,i.A)(["\n  background: none;\n  border: none;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 14px;\n  padding: 4px 9px;\n  height: 32px;\n  border-radius: 5px;\n  background: #fff;\n  box-shadow: 0px 0px 1.844px 0px rgba(0, 0, 0, 0.2);\n\n  /* Only apply hover effects on devices that support hover */\n  @media (hover: hover) {\n    &:hover {\n      background-color: #f0f0f0;\n      border-radius: 4px;\n    }\n  }\n\n  /* For touch devices, use active state instead */\n  &:active {\n    background-color: #f0f0f0;\n    border-radius: 4px;\n  }\n"]))),$=m.Ay.div(k||(k=(0,i.A)(["\n  height: 100% !important;\n  ",";\n"])),e=>{let{isSelected:n}=e;return n&&(0,m.AH)(D||(D=(0,i.A)(["\n      &::before {\n        position: absolute;\n        top: 0;\n        inset-inline-end: 0;\n        bottom: 0;\n        inset-inline-start: 0;\n        z-index: 1;\n        border: 1px solid ",' !important;\n        border-radius: 6px;\n        content: "";\n      }\n    '])),U.jd)}),J=m.Ay.div(T||(T=(0,i.A)(["\n  display: flex;\n  flex-direction: column;\n  gap: 0px;\n  margin-top: 4px;\n  overflow: hidden;\n  flex: 1; /* Take up remaining space */\n"]))),ee=m.Ay.div(I||(I=(0,i.A)(["\n  display: flex;\n  align-items: center;\n  font-size: 11px;\n\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding: 1px 0;\n\n  @media (max-width: 991px) {\n    font-size: 10px;\n  }\n"]))),ne=m.Ay.div(E||(E=(0,i.A)(["\n  width: 6px;\n  height: 6px;\n  border-radius: 50%;\n  background-color: ",";\n  margin-right: 4px;\n  flex-shrink: 0;\n"])),e=>e.color),te=m.Ay.span(S||(S=(0,i.A)(["\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  flex-grow: 1;\n  ","\n"])),e=>{let{offline:n}=e;return n&&(0,m.AH)(N||(N=(0,i.A)(["\n      color: ",";\n    "])),U.hm)}),ie=m.Ay.span(P||(P=(0,i.A)(["\n  margin-left: 4px;\n  color: ",";\n  flex-shrink: 0;\n"])),U.hm),le=m.Ay.div(M||(M=(0,i.A)(["\n  font-size: 10px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n"]))),oe=e=>{let{mode:n="month",onSelectDate:t,selectedDate:i,setSelectedDate:l,displayDate:o,setDisplayDate:a,items:d,filters:v,setFilters:p,eventTypeOptions:m,offset:x}=e;const{t:g}=(0,s.Bd)("calendar/index"),_=(0,u.al)(),j=B()(),C=(null===i||void 0===i?void 0:i.isSame(j,"day"))||!1,w=(0,c.useRef)(null),A=(0,c.useRef)(null),[b,k]=(0,c.useState)(null),[D,T]=(0,c.useState)(0),[I,E]=(0,c.useState)(!1),S=()=>{const e=o.subtract(1,"month");a(e),l(null),t&&t(null)},N=()=>{const e=B()();a(e),M(e)},P=()=>{const e=o.add(1,"month");a(e),l(null),t&&t(null)},M=e=>{l(e),t&&t(e)};return(0,c.useEffect)(()=>
1{if(!_)return;const e=document.querySelector(".ant-picker-body");if(!e)return;A.current=e;const n=e=>{I||(k(e.touches[0].clientY),T(0))},t=e=>{var n,t;if(null===b||I)return;const i=e.touches[0].clientY-b;Math.abs(i)>10&&e.preventDefault();let l=i;const o=(null===(n=A.current)||void 0===n?void 0:n.clientHeight)||400;if(Math.abs(i)>o/2){const e=.4*(Math.abs(i)-o/2);l=i>0?o/2+e:-o/2-e}T(l);const a=null===(t=A.current)||void 0===t?void 0:t.querySelector("table");a&&(a.style.transform="translateY(".concat(l,"px)"),a.style.transition="none")},i=e=>{var n;if(null===b||I)return;const t=A.current?25*A.current.clientHeight/100:100;E(!0);const i=null===(n=A.current)||void 0===n?void 0:n.querySelector("table");if(i&&(i.style.transition="transform 0.3s ease"),D>t){var o;if(i)i.style.transform="translateY(".concat((null===(o=A.current)||void 0===o?void 0:o.clientHeight)||400,"px)");setTimeout(()=>{S(),l()},300)}else if(D<-t){var a;if(i)i.style.transform="translateY(-".concat((null===(a=A.current)||void 0===a?void 0:a.clientHeight)||400,"px)");setTimeout(()=>{P(),l()},300)}else l();k(null)},l=()=>{var e;const n=null===(e=A.current)||void 0===e?void 0:e.querySelector("table");n&&(n.style.transform="",n.style.transition=""),T(0),E(!1)};return e.addEventListener("touchstart",n,{passive:!1}),e.addEventListener("touchmove",t,{passive:!1}),e.addEventListener("touchend",i),()=>{e.removeEventListener("touchstart",n),e.removeEventListener("touchmove",t),e.removeEventListener("touchend",i)}},[_,b,I,D,o]),(0,f.jsx)(W,{ref:w,children:(0,f.jsx)(V,{offset:x,value:o,onSelect:M,mode:n,onPanelChange:e=>{a(e)},isTodaySelected:C,fullCellRender:e=>{const n=i&&e.isSame(i,"day"),t=e.isSame(j,"day"),l=((e,n)=>{var t;return null===(t=n.filter(n=>n.date.isSame(e,"day")))||void 0===t?void 0:t.sort((e,n)=>e.date.isBefore(n.date)?-1:1)})(e,d||[]),a=e.month()===o.month();return(0,f.jsxs)($,{className:"ant-picker-cell-inner ant-picker-calendar-date",style:{background:"transparent",color:"inherit",opacity:a?1:.5},isSelected:!!n,children:[(0,f.jsx)("div",{className:"ant-picker-calendar-date-value",style:{color:t?U.UE:n?"#inherit":"inherit",backgroundColor:t?U.jd:"transparent",borderRadius:t?"100px":"0",width:t?_?"14px":"24px":void 0,height:t?_?"14px":"24px":void 0,textAlign:t?"center":void 0,lineHeight:_?"14px":"24px"},children:e.date()}),(0,f.jsx)("div",{className:"ant-picker-calendar-date-content",style:{overflow:_?"hidden":""},children:(0,f.jsxs)(J,{children:[l.length>0?l.slice(0,l.length>3?2:void 0).map(e=>(0,f.jsxs)(ee,{children:[(0,f.jsx)(ne,{color:e.color}),(0,f.jsx)(te,{offline:e.offline,children:e.title}),!_&&(0,f.jsx)(ie,{children:e.date.format("h:mm A")})]},"".concat(e.id,"-").concat(e.date.format("YYYY-MM-DD"),"-").concat(e.title))):null,l.length>3&&(0,f.jsx)(le,{className:"text-grey",children:g("more",{count:l.length-2})})]})})]})},headerRender:()=>(0,f.jsxs)(Y,{children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(G,{children:o.format("MMMM")})," ",(0,f.jsx)(K,{children:o.format("YYYY")})]}),(0,f.jsxs)(r.A,{gap:"xl",alignItems:"center",children:[!_&&(0,f.jsx)(y,{filters:v,setFilters:p,eventTypeOptions:m}),(0,f.jsxs)(r.A,{style:{gap:1},alignItems:"center",children:[(0,f.jsx)(X,(0,h.A)((0,h.A)({},Q._M),{},{onClick:S,children:(0,f.jsx)(H.A,{})})),(0,f.jsx)(X,(0,h.A)((0,h.A)({},Q._M),{},{onClick:N,children:g("today")})),(0,f.jsx)(X,(0,h.A)((0,h.A)({},Q._M),{},{onClick:P,children:(0,f.jsx)(Z.A,{})}))]})]})]})})})};var ae=t(57378),de=t(13549),re=t(23207);B().extend(z()),B().extend(R());const se=["#1890ff","#52c41a","#fa8c16","#f5222d","#722ed1","#eb2f96","#faad14","#13c2c2","#2f54eb","#712ab1","#45c8f0","#ffbb96","#9254de","#ffd666","#ff7875"],ce=new Map,ue=e=>{if(ce.has(e))return ce.get(e);const n=ce.size%se.length,t=se[n];return ce.set(e,t),t};var ve=t(96097),pe=t(90301);const me=e=>{let{integration:n,size:t=16}=e;return"google_calendar"===n?(0,f.jsx)("img",{src:"https://lamaco-strapi.s3.eu-west-3.amazonaws.com/icons8_calendrier_google_480_f2937f4222.png",alt:"Google calendar",width:t,height:t}):(0,f.jsx)("img",{src:"https://lamaco-strapi.s3.eu-west-3.amazonaws.com/icons8_calendrier_perspectives_480_d9ce4f9ab4.png",alt:"Outlook calendar",width:t,height:t})};var he=t(73792),xe=t(61832),ge=t(77720);const fe=()=>(0,f.jsxs)("svg",{width:"100%",height:"100%",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M12.667 8.5L2.66699 8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,f.jsx)("path",{d:"M10 5.16699L12.6262 7.79322C12.9596 8.12655 13.1262 8.29322 13.1262 8.50033C13.1262 8.70743 12.9596 8.8741 12.6262 9.20743L10 11.8337",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),ye=e=>(0,f.jsx)(ge.A,(0,h.A)({component:fe},e)),_e=e=>{let{event:n}=e;const{t:t}=(0,s.Bd)("calendar/index");return(0,f.jsx)(pe.n,{className:"m-0",children:(0,f.jsxs)(r.A,{className:"p-3 w-100",flexDirection:"column",children:[(0,f.jsxs)(r.A,{alignItems:"center",justifyContent:"between",gap:"xs",className:"w-100",children:[n.title,(0,f.jsx)(me,{integration:n.calendar.integration,size:32})]}),(0,f.jsx)(r.A,{alignItems:"center",gap:"xxs",style:{fontSize:12,color:"#3A60EE"},children:(e=>e.start.dateTime?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{children:new Date(e.start.timeZone?(0,de.A5)(e.start.dateTime,e.start.timeZone):e.start.dateTime).toLocaleTimeString((0,he.LV)(xe.Ay.language),{hour:"numeric",minute:"2-digit"})}),e.end.dateTime&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{style:{width:16,height:16},children:(0,f.jsx)(ye,{})}),(0,f.jsxs)("div",{children:[" ",new Date(e.end.timeZone?(0,de.A5)(e.end.dateTime,e.end.timeZone):e.end.dateTime).toLocaleTimeString((0,he.LV)(xe.Ay.language),{hour:"numeric",minute:"2-digit"})]})]})]}):e.start.date&&e.end.date?((e,n)=>{const t=B()(e),i=B()(n);return 1===i.diff(t,"day")&&0===i.hour()&&0===i.minute()&&0===i.second()})(e.start.date,e.end.date)?t("all.day"):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{children:(0,de.cm)(new Date(B().tz(e.start.date,e.start.timeZone).toDate()))}),(0,f.jsx)("div",{style:{width:16,height:16},children:(0,f.jsx)(ye,{})}),(0,f.jsx)("div",{children:(0,de.cm)(new Date(B().tz(e.end.date,e.end.timeZone).toDate()))})]}):e.start.date?B()(e.start.date).format("MMM D, YYYY"):"")(n)})]})})};var je=t(37490);const Ce=()=>(0,f.jsxs)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M4.38505 10.8212C3.44187 11.3828 0.96891 12.5296 2.47511 13.9645C3.21087 14.6655 4.03033 15.1668 5.06058 15.1668H10.9394C11.9697 15.1668 12.7891 14.6655 13.5249 13.9645C15.0311 12.5296 12.5581 11.3828 11.615 10.8212C9.40321 9.50425 6.59679 9.50426 4.38505 10.8212Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,f.jsx)("path",{d:"M11 4.8335C11 6.49035 9.65685 7.8335 8 7.8335C6.34315 7.8335 5 6.49035 5 4.8335C5 3.17664 6.34315 1.8335 8 1.8335C9.65685 1.8335 11 3.17664 11 4.8335Z",stroke:"currentColor",strokeWidth:"1.2"})]}),we=e=>(0,f.jsx)(ge.A,(0,h.A)({component:Ce},e));var Ae=t(43387);const be=()=>(0,f.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M10.3333 7.33333C10.3333 8.622 9.28862 9.66667 7.99996 9.66667C6.71129 9.66667 5.66663 8.622 5.66663 7.33333C5.66663 6.04467 6.71129 5 7.99996 5C9.28862 5 10.3333 6.04467 10.3333 7.33333Z",stroke:"currentColor"}),(0,f.jsx)("path",{d:"M8 1.33301C11.247 1.33301 14 4.02166 14 7.28352C14 10.5973 11.2022 12.9228 8.618 14.5041C8.42967 14.6104 8.2167 14.6663 8 14.6663C7.7833 14.6663 7.57033 14.6104 7.382 14.5041C4.8026 12.9074 2 
110.6088 2 7.28352C2 4.02166 4.75296 1.33301 8 1.33301Z",stroke:"currentColor"})]}),ke=e=>(0,f.jsx)(Ae.A,(0,h.A)({component:be},e)),De=()=>(0,f.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsxs)("g",{"clip-path":"url(#clip0_14752_40402)",children:[(0,f.jsx)("path",{d:"M14.6667 7.99967C14.6667 11.6816 11.6819 14.6663 8.00004 14.6663C4.31814 14.6663 1.33337 11.6816 1.33337 7.99967C1.33337 4.31778 4.31814 1.33301 8.00004 1.33301C11.6819 1.33301 14.6667 4.31778 14.6667 7.99967Z",stroke:"currentColor",strokeWidth:"1.2"}),(0,f.jsx)("path",{d:"M10 9.66118C9.68109 10.2635 9.10082 10.6663 8.43787 10.6663C7.43134 10.6663 6.61538 9.73775 6.61538 8.59227V7.40708C6.61538 6.2616 7.43134 5.33301 8.43787 5.33301C9.10082 5.33301 9.68109 5.73585 10 6.33817M6 7.99967H8.61538",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),(0,f.jsx)("defs",{children:(0,f.jsx)("clipPath",{id:"clip0_14752_40402",children:(0,f.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]}),Te=e=>(0,f.jsx)(ge.A,(0,h.A)({component:De},e)),Ie=()=>(0,f.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M1.3335 7.33366C1.3335 5.13377 1.3335 4.03383 2.01691 3.35041C2.70033 2.66699 3.80028 2.66699 6.00016 2.66699H6.66683C8.86672 2.66699 9.96666 2.66699 10.6501 3.35041C11.3335 4.03383 11.3335 5.13377 11.3335 7.33366V8.66699C11.3335 10.8669 11.3335 11.9668 10.6501 12.6502C9.96666 13.3337 8.86672 13.3337 6.66683 13.3337H6.00016C3.80027 13.3337 2.70033 13.3337 2.01691 12.6502C1.3335 11.9668 1.3335 10.8669 1.3335 8.66699V7.33366Z",stroke:"currentColor"}),(0,f.jsx)("path",{d:"M11.3335 5.93789L11.4174 5.86863C12.828 4.7048 13.5332 4.12289 14.1 4.40387C14.6668 4.68484 14.6668 5.61635 14.6668 7.47937V8.52193C14.6668 10.385 14.6668 11.3165 14.1 11.5974C13.5332 11.8784 12.828 11.2965 11.4174 10.1327L11.3335 10.0634",stroke:"currentColor",strokeLinecap:"round"}),(0,f.jsx)("ellipse",{cx:"7.66699",cy:"6.33398",rx:"1",ry:"1",stroke:"currentColor"})]}),Ee=e=>(0,f.jsx)(ge.A,(0,h.A)({component:Ie},e)),Se=()=>(0,f.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M11.75 4.875C12.2341 4.97536 12.5993 5.14287 12.8928 5.42243C13.625 6.11988 13.625 7.24242 13.625 9.48749C13.625 11.7326 13.625 12.8551 12.8928 13.5525C12.1605 14.25 10.982 14.25 8.625 14.25H7.375C5.01798 14.25 3.83947 14.25 3.10723 13.5525C2.375 12.8551 2.375 11.7326 2.375 9.48749C2.375 7.24242 2.375 6.11988 3.10723 5.42243C3.40074 5.14287 3.76594 4.97536 4.25 4.875",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"}),(0,f.jsx)("path",{d:"M8.01581 1.75033L8 9.25M8.01581 1.75033C7.91416 1.74612 7.81191 1.78244 7.72083 1.85932C7.15429 2.33754 6.125 3.58054 6.125 3.58054M8.01581 1.75033C8.10695 1.7541 8.1976 1.79047 8.27926 1.85943C8.84569 2.33773 9.875 3.58054 9.875 3.58054",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),Ne=e=>(0,f.jsx)(ge.A,(0,h.A)({component:Se},e));var Pe,Me=t(49822),Le=t(41093),Be=t(7727),Oe=t(11136),ze=t(91646),Fe=t(31417),Re=t(76925),qe=t(6705);const He=m.Ay.div(Pe||(Pe=(0,i.A)(["\n  position: absolute;\n  top: 15px;\n  left: 15px;\n  display: flex;\n  height: 24px;\n  padding: 6px 8px;\n  justify-content: center;\n  align-items: center;\n  gap: 4px;\n  border-radius: 100px;\n  background: #fff;\n  font-size: 12px;\n  font-weight: 400;\n  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n"]))),Ze=e=>{var n,t,i,l,a,d,u,p;let{availability:m,product:h,handleViewDate:x,expandDetails:g}=e;const{t:y}=(0,s.Bd)("store/products/products/drawer"),_=(0,v.Iz)(),{showProductDetails:j}=(0,v.IT)(),{storeCurrency:C}=(0,Le.E_)(),w=(0,c.useMemo)(()=>(null===m||void 0===m?void 0:m.event_type)||(null===h||void 0===h?void 0:h.cal_event_type),[m,h]),A=(0,c.useMemo)(()=>(null===w||void 0===w?void 0:w.time_zone)||"Europe/Paris",[w]),{totalAttendees:b}=(0,Me.n0)(w||null,m),{startTime:k,endTime:D}=(0,Me.Xi)(new Date(m.date||""),A,(null===w||void 0===w?void 0:w.duration)||1),T=(0,c.useMemo)(()=>{var e,n,t,i;return!(null!==h&&void 0!==h&&null!==(e=h.variants)&&void 0!==e&&null!==(n=e[0])&&void 0!==n&&null!==(t=n.prices)&&void 0!==t&&null!==(i=t.find(e=>e.currency_code===C))&&void 0!==i&&i.amount)},[h,C]);return(0,f.jsx)(pe.n,{className:"m-0 overflow-hidden position-relative ".concat(g&&x?"cursor-pointer":""),onClick:g&&x?()=>x(m):void 0,children:(0,f.jsxs)(f.Fragment,{children:[g&&(null===h||void 0===h?void 0:h.thumbnail)&&(0,f.jsxs)(f.Fragment,{children:[(null===h||void 0===h?void 0:h.status)===re.S.PUBLISHED?(0,f.jsxs)(He,{children:[(0,f.jsx)(je.A,{color:U.xX}),(0,f.jsx)("div",{children:y("published")})]}):(0,f.jsxs)(He,{children:[(0,f.jsx)(je.A,{color:U.hm}),(0,f.jsx)("div",{children:y("offline")})]}),(0,f.jsx)(Be.A,{src:h.thumbnail,placeholder:(0,Fe.j5)(h.thumbnail),children:(e,n)=>(0,f.jsx)("img",{src:e,alt:h.title,className:"",style:{maxHeight:190,width:"100%",filter:n?"blur(7px)":"",transition:"blur 1s",objectFit:"cover",flexShrink:0}})})]}),(0,f.jsxs)(r.A,{className:"p-3",gap:"sm",flexDirection:"column",children:[(0,f.jsxs)(r.A,{justifyContent:"between",alignItems:"center",className:"w-100",children:[(0,f.jsxs)(r.A,{flexDirection:"column",children:[(0,f.jsx)("div",{className:"font-weight-semibold",style:{fontSize:16},children:g?(0,f.jsx)("div",{children:null===h||void 0===h?void 0:h.title}):(0,de.cm)(new Date(m.date||""),A)}),(0,f.jsxs)(r.A,{alignItems:"center",style:{gap:2,fontSize:12,color:"#3A60EE"},children:[(0,f.jsx)("div",{children:k}),(0,f.jsx)("div",{style:{width:16,height:16},children:(0,f.jsx)(ye,{})}),(0,f.jsx)("div",{children:D})]})]}),x&&!g&&!j&&(0,f.jsx)(o.Ay,{onClick:()=>x(m),type:"text",className:"d-flex align-items-center justify-content-center",icon:(0,f.jsx)("div",{style:{width:24,height:24},children:(0,f.jsx)(ye,{})})}),g&&(0,f.jsx)(Re.Ce,{productType:Re.ch.EVENT})]}),(0,f.jsxs)(r.A,{flexDirection:"column",gap:"xxs",className:"text-grey",children:[g&&(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(0,f.jsx)(Te,{}),(0,f.jsx)("div",{children:T?y("free"):y("event.price",{price:(0,ze.E1)((null===h||void 0===h||null===(n=h.variants)||void 0===n||null===(t=n[0])||void 0===t||null===(i=t.prices)||void 0===i||null===(l=i.find(e=>e.currency_code===C))||void 0===l?void 0:l.amount)||0,C)})})]}),(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(0,f.jsx)(we,{}),(0,f.jsx)("div",{children:y(1!==(null===w||void 0===w?void 0:w.max_seats_per_time_slot)&&(null!==w&&void 0!==w&&w.max_seats_per_time_slot||1!==b)?"attendee.plural"
1:"attendee.singular",{attendees:"".concat(b).concat(null!==w&&void 0!==w&&w.max_seats_per_time_slot?"/".concat(null===w||void 0===w?void 0:w.max_seats_per_time_slot):"")})})]}),g&&(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(null===m||void 0===m||null===(a=m.event_type)||void 0===a?void 0:a.location_type)===Oe.iF.IN_PERSON?(0,f.jsx)(ke,{}):(0,f.jsx)(Ee,{}),(0,f.jsx)("div",{children:(null===m||void 0===m||null===(d=m.event_type)||void 0===d?void 0:d.location_type)===Oe.iF.ONLINE?y("online_videocall"):null!==m&&void 0!==m&&null!==(u=m.event_type)&&void 0!==u&&u.address?(0,de.gk)(null===m||void 0===m||null===(p=m.event_type)||void 0===p?void 0:p.address):"-"})]})]})]}),new Date(m.date||"")>new Date&&(0,f.jsx)(r.A,{className:"pl-3 pr-3 pt-2 pb-2",style:{gap:5,background:"#F7F7F9"},alignItems:"center",children:(0,f.jsx)(qe.A,{style:{height:30},icon:(0,f.jsx)(Ne,{}),onClick:e=>{e.stopPropagation(),_(["shareEvent"],[(null===h||void 0===h?void 0:h.id)||""])},children:y("share")})})]})})},Ue=()=>{const{t:e}=(0,s.Bd)("calendar/index");return(0,f.jsxs)(r.A,{flexDirection:"column",alignItems:"center",justifyContent:"center",className:"w-100",gap:"xl",style:{height:300},children:[(0,f.jsxs)(r.A,{flexDirection:"column",gap:"xs",alignItems:"center",justifyContent:"center",style:{color:U.ml},children:[(0,f.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M24.5 2.66699V5.33366M8.5 2.66699V5.33366",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,f.jsx)("path",{d:"M15.233 29.3333C9.859 29.3333 7.17199 29.3333 5.5025 27.5285C3.83301 25.7236 3.83301 22.8188 3.83301 17.009V16.3243C3.83301 10.5146 3.83301 7.60971 5.5025 5.80486C7.17199 4 9.859 4 15.233 4H17.7663C23.1404 4 25.8274 4 27.4968 5.80486C29.135 7.57581 29.1658 10.4058 29.1663 16",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,f.jsx)("path",{d:"M4.5 10.667H28.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,f.jsx)("path",{d:"M19.833 20L24.4997 24.6667M24.4997 24.6667L29.1663 29.3333M24.4997 24.6667L29.1663 20M24.4997 24.6667L19.833 29.3333",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,f.jsx)("div",{className:"text-center font-weight-semibold",children:e("no_events")})]}),(0,f.jsx)(o.Ay,{type:"primary",onClick:()=>{},icon:(0,f.jsx)(l.A,{}),children:e("create")})]})};B().extend(z()),B().extend(R());const Qe=e=>{const n=e,t=e;return n.event_type?new Date((null===n||void 0===n?void 0:n.date)||""):t.start.dateTime&&t.start.timeZone?B()((0,de.A5)(t.start.dateTime,t.start.timeZone)).toDate():new Date(t.start.dateTime||t.start.date||"")},We=e=>{let{events:n}=e;const t=(0,v.Iz)(),i=(0,u.al)(),l=e=>{t(["dateDetails"],[(null===e||void 0===e?void 0:e.id)||""])};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(r.A,{flexDirection:"column",style:{gap:i?16:24},children:null===n||void 0===n?void 0:n.sort((e,n)=>Qe(e)<Qe(n)?-1:1).map(e=>{const n=e,t=e;return n.event_type?(0,f.jsx)(Ze,{availability:n,product:n.event_type.product,expandDetails:!0,handleViewDate:l},e.id):(0,f.jsx)(_e,{event:t},t.id)})}),0===(null===n||void 0===n?void 0:n.length)&&(0,f.jsx)(Ue,{})]})};var Ve=t(24356);B().extend(z()),B().extend(R());const Ye=e=>{let{open:n,onCancel:t,date:i,events:l}=e;const o=(0,u.al)(),{openDrawer:a,closeDrawer:d}=(0,ve.g)();return(0,c.useEffect)(()=>(n&&a(),()=>{n&&d()}),[n]),(0,f.jsx)(Ve.A,{open:n,onClose:t,title:(0,de.cm)((null===i||void 0===i?void 0:i.toDate())||new Date),children:(0,f.jsx)("div",{className:"".concat(o?"pr-3 pl-3 pb-3":"pb-4 pr-4 pl-4"),children:(0,f.jsx)(We,{events:l})})})};var Ge,Ke=t(16569),Xe=t(36282),$e=t(73216),Je=(t(64222),t(16391)),en=t(62997),nn=t(46989),tn=t(95816),ln=t(4174),on=t(75452);const an=m.Ay.div(Ge||(Ge=(0,i.A)(["\n  position: absolute;\n  top: calc(50% - 50px);\n  transform: translateY(-50%);\n  right: 10px;\n  max-width: 50%;\n  text-overflow: ellipsis !important;\n  overflow: hidden !important;\n  white-space: nowrap !important;\n  background-color: #fff;\n  padding: 10px;\n  border-radius: 8px;\n  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1);\n  z-index: 1000;\n  font-size: 12px;\n"])));var dn=t(68262),rn=t(879),sn=t.n(rn),cn=(t(84189),t(69721)),un=t(43830),vn=t(94651),pn=t(97969),mn=t(40584);const hn=e=>{var n,t,i,a,d,u,p,m;let{product:h,availability:x,setShowAddAttendeeModal:g}=e;const{t:y}=(0,s.Bd)("store/products/products/drawer"),{store:_}
1=(0,dn.gbT)(),{showDetails:j}=(0,v.IT)(),C=(0,v.Iz)(),{storeCurrency:w}=(0,Le.E_)(),A=(0,c.useMemo)(()=>(null===x||void 0===x?void 0:x.event_type)||(null===h||void 0===h?void 0:h.cal_event_type),[x,h]),b=!(null!==h&&void 0!==h&&null!==(n=h.variants)&&void 0!==n&&null!==(t=n[0])&&void 0!==t&&null!==(i=t.prices)&&void 0!==i&&null!==(a=i.find(e=>e.currency_code===(null===_||void 0===_?void 0:_.default_currency_code)))&&void 0!==a&&a.amount),{startTime:k,endTime:D}=(0,Me.Xi)(new Date((null===x||void 0===x?void 0:x.date)||""),(null===A||void 0===A?void 0:A.time_zone)||"Europe/Paris",(null===A||void 0===A?void 0:A.duration)||1),{totalAttendees:T,totalTicketsLeft:I}=(0,Me.n0)(A,x);return(0,f.jsx)(un.A,{avatar:(0,f.jsx)("div",{style:{width:66,height:66},children:(0,f.jsx)(vn.A,{})}),title:(0,de.cm)(new Date((null===x||void 0===x?void 0:x.date)||""),(null===A||void 0===A?void 0:A.time_zone)||"Europe/Paris"),badge:0===I?(0,f.jsx)(mn.A,{className:"m-0",children:y("soldout")}):void 0,content:(0,f.jsxs)(r.A,{justifyContent:"center",alignItems:"center",flexDirection:"column",className:"text-center pb-3",gap:"sm",children:[(0,f.jsxs)(r.A,{alignItems:"center",style:{fontSize:16,gap:2},className:"font-size-base text-grey",children:[(0,f.jsx)("div",{children:k}),(0,f.jsx)("div",{style:{width:16,height:16},children:(0,f.jsx)(ye,{})}),(0,f.jsx)("div",{children:D})]}),(0,f.jsxs)(r.A,{className:"mt-3",flexDirection:"column",justifyContent:"center",alignItems:"center",style:{width:240},children:[(0,f.jsxs)("div",{className:"mb-0 d-flex align-items-center gap-xs",children:[(0,f.jsx)(we,{}),y(1!==(null===A||void 0===A?void 0:A.max_seats_per_time_slot)&&(null!==A&&void 0!==A&&A.max_seats_per_time_slot||1!==T)?"attendee.plural":"attendee.singular",{attendees:"".concat(T).concat(null!==A&&void 0!==A&&A.max_seats_per_time_slot?"/".concat(null===A||void 0===A?void 0:A.max_seats_per_time_slot):"")})]}),(null===A||void 0===A?void 0:A.max_seats_per_time_slot)&&(0,f.jsx)(pn.A,{className:"m-0 w-100",strokeColor:"#3A60EE",percent:T/(null===A||void 0===A?void 0:A.max_seats_per_time_slot)*100,showInfo:!1})]})]}),items:[(0,f.jsx)("div",{className:"p-3",children:(0,f.jsxs)(r.A,{gap:"md",alignItems:"center",className:"cut-text-w-100",children:[(0,f.jsx)(Be.A,{src:h.thumbnail,placeholder:(0,Fe.j5)(h.thumbnail),children:(e,n)=>(0,f.jsx)("img",{src:e,alt:h.title,className:"rounded",style:{filter:n?"blur(7px)":"",transition:"blur 1s",borderRadius:8,height:98,width:98,objectFit:"cover",flexShrink:0}})}),(0,f.jsxs)(r.A,{flexDirection:"column",gap:"sm",className:"cut-text-w-100",children:[(0,f.jsx)(qe.A,{style:{height:20,fontSize:16},className:"text-left font-weight-semibold",onClick:()=>j?C(["dateDetails"],[""]):C(["showProductDetails"],[h.id]),children:(0,f.jsx)("span",{className:"cut-text-w-100",children:h.title})}),(0,f.jsxs)(r.A,{flexDirection:"column",gap:"xxs",className:"text-grey",children:[(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(0,f.jsx)(Te,{}),(0,f.jsx)("div",{children:b?y("free"):y("event.price",{price:(0,ze.E1)((null===h||void 0===h||null===(d=h.variants)||void 0===d||null===(u=d[0])||void 0===u||null===(p=u.prices)||void 0===p||null===(m=p.find(e=>e.currency_code===(null===_||void 0===_?void 0:_.default_currency_code)))||void 0===m?void 0:m.amount)||0,w)})})]}),(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(null===A||void 0===A?void 0:A.location_type)===Oe.iF.IN_PERSON?(0,f.jsx)(ke,{}):(0,f.jsx)(Ee,{}),(0,f.jsx)("div",{children:(null===A||void 0===A?void 0:A.location_type)===Oe.iF.ONLINE?y("online_videocall"):null!==A&&void 0!==A&&A.address?(0,de.gk)(null===A||void 0===A?void 0:A.address):"-"})]})]})]})]})}),(0,f.jsxs)(r.A,{className:"pt-3 pr-3 pl-3",flexDirection:"column",gap:"xs",children:[(0,f.jsx)(Xe.A,{content:0===I?y("date.soldout"):new Date((null===x||void 0===x?void 0:x.date)||"")<new Date?y("past.event"):void 0,placement:"bottom",open:(0===I||new Date((null===x||void 0===x?void 0:x.date)||"")<new Date)&&void 0,children:(0,f.jsx)(o.Ay,{icon:(0,f.jsx)(l.A,{}),type:"primary",onClick:()=>g(!0),disabled:0===I||new Date((null===x||void 0===x?void 0:x.date)||"")<new Date,children:y("add.attendee")})}),(0,f.jsx)(o.Ay,{icon:(0,f.jsx)(Ne,{}),onClick:()=>C(["shareEvent"],[h.id]),children:y("share.this.date")})]})]})};var xn=t(8918),gn=t(72053);const fn=()=>(0,f.jsxs)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M1.3335 4.5L5.94218 7.11131C7.64123 8.07401 8.3591 8.07401 10.0581 7.11131L14.6668 4.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),(0,f.jsx)("path",{d:"M1.34401 9.48342C1.38759 11.5271 1.40938 12.549 2.16347 13.3059C2.91755 14.0629 3.96705 14.0892 6.06605 14.142C7.3597 14.1745 8.64063 14.1745 9.93428 14.142C12.0333 14.0892 13.0828 14.0629 13.8369 13.3059C14.5909 12.549 14.6127 11.5271 14.6563 9.48342C14.6703 8.8263 14.6703 8.17306 14.6563 7.51594C14.6127 5.47225 14.5909 4.4504 13.8369 3.69345C13.0828 2.9365 12.0333 2.91013 9.93428 2.85739C8.64063 2.82488 7.3597 2.82488 6.06604 2.85738C3.96705 2.91012 2.91755 2.93648 2.16346 3.69344C1.40938 4.45039 1.38759 5.47224 1.34401 7.51593C1.32999 8.17305 1.32999 8.8263 1.34401 9.48342Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]}),yn=e=>(0,f.jsx)(ge.A,(0,h.A)({component:fn},e)),_n=()=>(0,f.jsx)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)("path",{d:"M2.51858 8.46125C1.88656 7.35921 1.58139 6.45933 1.39739 5.54715C1.12524 4.19806 1.74804 2.88021 2.77975 2.03932C3.21579 1.68393 3.71565 1.80535 3.9735 2.26794L4.55562 3.31228C5.01702 4.14005 5.24772 4.55394 5.20197 4.99274C5.15621 5.43153 4.84508 5.78892 4.22281 6.50368L2.51858 8.46125ZM2.51858 8.46125C3.79783 10.6919 5.80539 12.7005 8.03859 13.9813M8.03859 13.9813C9.14063 14.6133 10.0405 14.9184 10.9527 15.1024C12.3018 15.3746 13.6196 14.7518 14.4605 13.7201C14.8159 13.284 14.6945 12.7842 14.2319 12.5263L13.1876 11.9442C12.3598 11.4828 11.9459 11.2521 11.5071 11.2979C11.0683 11.3436 10.7109 11.6548 9.99616 12.277L8.03859 13.9813Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})}),jn=e=>(0,f.jsx)(ge.A,(0,h.A)({component:_n},e));var Cn=t(38822);const wn=e=>{var n,t,i;let{booking:l}=e;const{t:o}=(0,s.Bd)("store/products/products/drawer"),a=(0,c.useMemo)(()=>{var e;return null===(e=l.attendees)||void 0===e?void 0:e[0]},[l]);return(0,f.jsx)(pe.n,{className:"m-0",children:(0,f.jsx)(r.A,{className:"p-3",children:(0,f.jsxs)(r.A,{flexDirection:"column",gap:"xs",className:"w-100",children:[(0,f.jsxs)(r.A,{alignItems:"center",justifyContent:"between",className:"w-100",children:[(0,f.jsx)("div",{style:{fontSize:16},className:"font-weight-semibold",children:a.name}),(0,f.jsx)(Cn.A,{children:o("confirmed")})]}),(0,f.jsxs)(r.A,{flexDirection:"column",gap:"xxs",className:"text-grey",children:[(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(0,f.jsx)(we,{}),o(1===(null===(n=l.attendees)||void 0===n?void 0:n.length)?"person.count":"persons.
1count",{count:null===(t=l.attendees)||void 0===t?void 0:t.length})]}),(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(0,f.jsx)(yn,{}),null===a||void 0===a?void 0:a.email]}),(null===a||void 0===a?void 0:a.phone_number)&&(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(0,f.jsx)(jn,{}),"+".concat(null===a||void 0===a||null===(i=a.phone_number)||void 0===i?void 0:i.replace("+",""))]})]})]})})})};var An=t(67298),bn=t(26449);const kn=e=>{let{eventType:n,availability:t}=e;const{t:i}=(0,s.Bd)("store/products/products/drawer"),[l,o]=(0,c.useState)(Oe.cP.ACCEPTED),{calBookings:a,isLoading:d}=(0,Me.__)({event_type_id:null===n||void 0===n?void 0:n.id,status:l,limit:1e5,expand:"attendees"},{enabled:!(null===n||void 0===n||!n.id)}),u=(0,c.useMemo)(()=>null===a||void 0===a?void 0:a.filter(e=>e.start_time===(null===t||void 0===t?void 0:t.date)),[a,t,l]),v=[{key:Oe.cP.ACCEPTED,label:i("confirmed")},{key:Oe.cP.PENDING,label:i("pending")}];return(0,f.jsxs)(r.A,{flexDirection:"column",gap:"sm",children:[(0,f.jsx)(xn.A,{className:"m-0 p-0 h-100",activeKey:l,onChange:e=>o(e),items:v,tabBarStyle:{paddingLeft:0,paddingTop:0}}),(0,f.jsxs)(r.A,{flexDirection:"column",gap:"xs",children:[d?(0,f.jsx)(gn.A,{}):null===u||void 0===u?void 0:u.map(e=>(0,f.jsx)(wn,{booking:e},e.id)),l===Oe.cP.ACCEPTED&&0===(null===u||void 0===u?void 0:u.length)&&(0,f.jsxs)(r.A,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"xs",children:[(0,f.jsx)(An.n,{strokeWidth:1.5,className:"text-grey",icon:bn.FolderRemoveIcon}),(0,f.jsx)("p",{className:"m-0 text-center",children:i("no_confirmed_attendees")})]}),l===Oe.cP.PENDING&&0===(null===u||void 0===u?void 0:u.length)&&(0,f.jsxs)(r.A,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"xs",children:[(0,f.jsx)(An.n,{strokeWidth:1.5,className:"text-grey",icon:bn.FolderRemoveIcon}),(0,f.jsx)("p",{className:"m-0 text-center",children:i("no_pending_attendees")})]})]})]})};var Dn=t(46746),Tn=t(49096),In=t(94171),En=t(15020);sn().workerClass=t(86881).A;const Sn=e=>{var n;let{open:t,onClose:i,product:a,availability:d}=e;const p=(0,$e.Zp)(),m=(0,c.useRef)(null),{confirmDeleteAvailability:h}=(0,v.IT)(),x=(0,v.Iz)(),{mutateAsync:g,isLoading:y}=(0,ae.sA)(),{t:_}=(0,s.Bd)("store/products/products/drawer"),{dateDetails:j}=(0,v.IT)(),C=(0,u.al)(),{store:w}=(0,dn.gbT)(),{storeCurrency:A}=(0,Le.E_)(),{openDrawer:b,closeDrawer:k}=(0,ve.g)(),[D,T]=(0,c.useState)(!1),{getCleanAddress:I}=(0,cn.pt)(),E=(0,c.useMemo)(()=>(null===d||void 0===d?void 0:d.event_type)||(null===a||void 0===a?void 0:a.cal_event_type),[d,a]),S=(0,c.useMemo)(()=>{var e;return d||(null===E||void 0===E||null===(e=E.availabilities)||void 0===e?void 0:e.find(e=>e.id===j))},[E,j,d]);(0,c.useEffect)(()=>(t&&b(),()=>{t&&k()}),[t]);const N=(0,c.useMemo)(()=>{var e,n,t,i;return 0===(null===a||void 0===a||null===(e=a.variants)||void 0===e||null===(n=e[0])||void 0===n||null===(t=n.prices)||void 0===t||null===(i=t.find(e=>e.currency_code===A))||void 0===i?void 0:i.amount)},[a,A]),P=(0,c.useMemo)(()=>{var e;return a?null===(e=((e,n,t,i,l,o,a,d)=>{var s,c,u,v,p,m,h,x,g,y,_,j,C,w,A,b,k,D,T,I,E,S,N,P,M,L,B,O,z,F,R,q,H,Z,U,Q,W,V,Y,G,K,X,$,J,ee,ne,te,ie,le,oe,ae,se,ce,ue,ve,pe,me,he,xe,ge,fe,ye,_e,je,Ce,we,Ae,be,ke,De,Te,Ie,Ee,Se,Ne,Pe,Me,Le,Be,Fe,qe,He,Ze,Ue,Qe,We,Ve,Ye,Ge,Ke,Xe,$e,dn,rn,sn,cn,un,vn,pn,mn,hn,xn,gn,fn,yn,_n,jn,Cn,wn,An,bn,kn,Dn,Tn,In,En,Sn,Nn,Pn,Mn,Ln,Bn,On;const zn=(0,Re.YW)(e),Fn=!(null!==e&&void 0!==e&&null!==(s=e.variants)&&void 0!==s&&null!==(c=s[0])&&void 0!==c&&null!==(u=c.prices)&&void 0!==u&&null!==(v=u.find(e=>e.currency_code===(null===n||void 0===n?void 0:n.default_currency_code)))&&void 0!==v&&v.amount);return[{name:"url",title:i("general.url"),content:(0,f.jsx)("div",{style:{width:t?"50%":""},className:"text-right",children:(0,f.jsx)(Je.A,{product:e})}),hidden:e.status===re.S.DRAFT},{name:"collection",title:i("general.collection"),content:(0,f.jsx)("div",{className:"w-100 d-flex align-items-center justify-content-between",children:!!e.collection&&(0,f.jsxs)(r.A,{alignItems:"center",gap:"xs",children:[(0,f.jsx)(nn.A,{}),e.collection.title]})}),hidden:!e.collection},...null!==e&&void 0!==e&&e.file_id?[{name:"price",title:i("general.price"),content:(0,f.jsxs)("div",{children:[ze.Q9[l],null===(p=((0,ze._r)(null,null===e||void 0===e||null===(m=e.variants)||void 0===m||null===(h=m[0])||void 0===h?void 0:h.prices,l)||0)/100)||void 0===p?void 0:p.toFixed(2)]})}]:zn===Re.ch.VOUCHER?[{name:"price",title:i("general.price"),content:(0,f.jsx)("div",{children:i("voucher.price.".concat(null===e||void 0===e?void 0:e.price_type),{price:"".concat(ze.Q9[l]).concat(null===(x=((0,ze._r)(null,null===e||void 0===e||null===(g=e.variants)||void 0===g||null===(y=g[0])||void 0===y?void 0:y.prices,l)||0)/100)||void 0===x?void 0:x.toFixed(2))})})},...(null===e||void 0===e||null===(_=e.voucher)||void 0===_?void 0:_.location_type)===on.wi.IN_PERSON?[{name:"location",title:i("general.location"),content:(0,f.jsx)("div",{children:null!==e&&void 0!==e&&null!==(j=e.voucher)&&void 0!==j&&null!==(C=j.address)&&void 0!==C&&null!==(w=C.metadata)&&void 0!==w&&w.lat&&null!==e&&void 0!==e&&null!==(A=e.voucher)&&void 0!==A&&null!==(b=A.address)&&void 0!==b&&null!==(k=b.metadata)&&void 0!==k&&k.lng?(0,f.jsxs)("div",{style:{borderRadius:10,overflow:"hidden",height:160,marginBottom:22},className:"w-100 position-relative",children:[(null===e||void 0===e||null===(D=e.voucher)||void 0===D?void 0:D.address)&&(0,f.jsx)(an,{children:a(null===e||void 0===e||null===(T=e.voucher)||void 0===T?void 0:T.address)}),(0,f.jsx)(ln.A,{mapRef:o,initialState:{latitude:(null===e||void 0===e||null===(I=e.voucher)||void 0===I||null===(E=I.address)||void 0===E||null===(S=E.metadata)||void 0===S?void 0:S.lat)||0,longitude:(null===e||void 0===e||null===(N=e.voucher)||void 0===N||null===(P=N.address)||void 0===P||null===(M=P.metadata)||void 0===M?void 0:M.lng)||0,zoom:13},zoom:13,markerPosition:{latitude:(null===e||void 0===e||null===(L=e.voucher)||void 0===L||null===(B=L.address)||void 0===B||null===(O=B.metadata)||void 0===O?void 0:O.lat)||0,longitude:(null===e||void 0===e||null===(z=e.voucher)||void 0===z||null===(F=z.address)||void 0===F||null===(R=F.metadata)||void 0===R?void 0:R.lng)||0}})]}):null!==e&&void 0!==e&&null!==(q=e.voucher)&&void 0!==q&&q.address?(0,f.jsx)("div",{children:a(null===e||void 0===e||null===(H=e.voucher)||void 0===H?void 0:H.address)}):null!==e&&void 0!==e&&null!==(Z=e.voucher)&&void 0!==Z&&Z.location_text?(0,f.jsx)("div",{children:null===e||void 0===e||null===(U=e.voucher)||void 0===U?void 0:U.location_text}):(0,f.jsx)("div",{children:"-"})}),position:null!==e&&void 0!==e&&null!==(Q=e.voucher)&&void 0!==Q&&null!==(W=Q.address)&&void 0!==W&&null!==(V=W.metadata)&&void 0!==V&&V.lat&&null!==e&&void 0!==e&&null!==(Y=e.voucher)&&void 0!==Y&&null!==(G=Y.address)&&void 0!==G&&null!==(K=G.metadata)&&void 0!==K&&K.lng?tn.CE.BOTTOM:void 0}]:[],...null!==(X=e.voucher)&&void 0!==X&&X.min_unit_per_purchase||null!==($=e.voucher)&&void 0!==$&&$.max_unit_per_purchase?[{name:"unit_per_sale",title:i("general.unit_per_sale"),content:(0,f.jsxs)(r.A,{flexDirection:"column",alignItems:"end",style:{gap:4},children:[!(null===e||void 0===e||null===(J=e.voucher)||void 0===J||!J.min_unit_per_purchase)&&i("min",{value:null===e||void 0===e||null===(ee=e.voucher)||void 0===ee?void 0:ee.min_unit_per_purchase}),(null===e||void 0===e||null===(ne=e.voucher)||void 0===ne?void 0:ne.min_unit_per_purchase)&&(null===e||void 0===e||null===(te=e.voucher)||void 0===te?void 0:te.max_unit_per_purchase)&&" / ",!(null===e||void 0===e||null===(ie=e.voucher)||void 0===ie||!ie.max_unit_per_purchase)&&i("max",{value:null===e||void 0===e||null===(le=e.voucher)||void 0===le?void 0:le.max_unit_per_purchase})]})}]:[],...null!==(oe=e.voucher)&&void 0!==oe&&oe.min_age||null!==(ae=e.voucher)&&void 0!==ae&&ae.max_age?[{name:"age_restriction",title:i("general.age_restriction"),content:(0,f.jsxs)(r.A,{flexDirection:"column",alignItems:"end",style:{gap:4},children:[!(null===e||void 0===e||null===(se=e.voucher)||void 0===se||!se.min_age)&&i("min.age",{age:null===e||void 0===e||null===(ce=e.voucher)||void 0===ce?void 0:ce.min_age}),(null===e||void 0===e||null===(ue=e.voucher)||void 0===ue?void 0:ue.min_age)&&(null===e||void 0===e||null===(ve=e.voucher)||void 0===ve?void 0:ve.max_age)&&" / ",!(null===e||void 0===e||null===(pe=e.voucher)||void 0===pe||!pe.max_age)&&i("max.age",{age:null===e||void 0===e||null===(me=e.voucher)||void 0===me?void 0:me.max_age})]})}]:[],...null!==(he=e.variants)&&void 0!==he&&null!==(xe=he[0])&&void 0!==xe&&xe.manage_inventory?[{name:"quantity",title:i("general.quantity"),content:(0,f.jsx)(r.A,{flexDirection:"column",alignItems:"end",style:{gap:4},children:i("left",{left:null===(ge=e.variants)||void 0===ge||null===(fe=ge[0])||void 0===fe?void 0:fe.inventory_quantity,total:null===(ye=e.variants)||void 0===ye||null===(_e=ye[0])||void 0===_e||null===(je=_e.metadata)||void 0===je?void 0:je.max_edition_quantity})})}]:[]]:[],...zn!==Re.ch.EVENT&&zn!==Re.ch.VOUCHER?[{name:"sales",title:i("general.sales"),content:(0,f.jsx)("div",{children:(0,f.jsx)(en.uI,{productId:e.id})})}]:d||zn===Re.ch.VOUCHER?[]:[{name:"duration",title:i("general.duration"),content:(0,f.jsx)("div",{children:(0,de.B4)((null===e||void 0===e||null===(Ce=e.cal_event_type)||void 0===Ce?void 0:Ce.duration)||0,i)})},{name:"price",title:i("general.price"),content:(0,f.jsx)("div",{children:Fn?i("free"):i("event.price",{price:(0,ze.E1)((null===e||void 0===e||null===(we=e.variants)||void 0===we||null===(Ae=we[0])||void 0===Ae||null===(be=Ae.prices)||void 0===be||null===(ke=be.find(e=>e.currency_code===(null===n||void 0===n?void 0:n.default_currency_code)))||void 0===ke?void 0:ke.amount)||0,l)})})},{name:"location",title:i("general.location"),content:(0,f.jsx)("div",{children:(null===e||void 0===e||null===(De=e.cal_event_type)||void 0===De?void 0:De.location_type)===Oe.iF.ONLINE?(0,f.jsxs)(r.A,{flexDirection:"column",alignItems:"end",children:[i("online"),(0,f.jsx)("div",{className:"text-grey",children:i("videocall")})]}):null!==e&&void 0!==e&&null!==(Te=e.cal_event_type)&&void 0!==Te&&null!==(Ie=Te.address)&&void 0!==Ie&&null!==(Ee=Ie.metadata)&&void 0!==Ee&&Ee.lat&&null!==e&&void 0!==e&&null!==(Se=e.cal_event_type)&&void 0!==Se&&null!==(Ne=Se.address)&&void 0!==Ne&&null!==(Pe=Ne.metadata)&&void 0!==Pe&&Pe.lng?(0,f.jsxs)("div",{style:{borderRadius:10,overflow:"hidden",height:160,marginBottom:22},className:"w-100 position-relative",children:[(null===e||void 0===e||null===(Me=e.cal_event_type)||void 0===Me?void 0:Me.address)&&(0,f.jsx)(an,{children:a(null===e||void 0===e||null===(Le=e.cal_event_type)||void 0===Le?void 0:Le.address)}),(0,f.jsx)(ln.A,{mapRef:o,initialState:{latitude:(null===e||void 0===e||null===(Be=e.cal_event_type)||void 0===Be||null===(Fe=Be.address)||void 0===Fe||null===(qe=Fe.metadata)||void 0===qe?void 0:qe.lat)||0,longitude:(null===e||void 0===e||null===(He=e.cal_event_type)||void 0===He||null===(Ze=He.address)||void 0===Ze||null===(Ue=Ze.metadata)||void 0===Ue?void 0:Ue.lng)||0,zoom:13},zoom:13,markerPosition:{latitude:(null===e||void 0===e||null===(Qe=e.cal_event_type)||void 0===Qe||null===(We=Qe.address)||void 0===We||null===(Ve=We.metadata)||void 0===Ve?void 0:Ve.lat)||0,longitude:(null===e||void 0===e||null===(Ye=e.cal_event_type)||void 0===Ye||null===(Ge=Ye.address)||void 0===Ge||null===(Ke=Ge.metadata)||void 0===Ke?void 0:Ke.lng)||0}})]}):null!==e&&void 0!==e&&null!==(Xe=e.cal_event_type)&&void 0!==Xe&&Xe.address?(0,f.jsx)("div",{children:a(null===e||void 0===e||null===($e=e.cal_event_type)||void 0===$e?void 0:$e.address)}):null!==e&&void 0!==e&&null!==(dn=e.cal_event_type)&&void 0!==dn&&dn.location_text&&(null===e||void 0===e||null===(rn=e.cal_event_type)||void 0===rn?void 0:rn.location_type)===Oe.iF.IN_PERSON?(0,f.jsx)("div",{children:null===e||void 0===e||null===(sn=e.cal_event_type)||void 0===sn?void 0:sn.location_text}):(0,f.jsx)("div",{children:"-"})}),position:null!==e&&void 0!==e&&null!==(cn=e.cal_event_type)&&void 0!==cn&&null!==(un=cn.address)&&void 0!==un&&null!==(vn=un.metadata)&&void 0!==vn&&vn.lat&&null!==e&&void 0!==e&&null!==(pn=e.cal_event_type)&&void 0!==pn&&null!==(mn=pn.address)&&void 0!==mn&&null!==(hn=mn.metadata)&&void 0!==hn&&hn.lng&&(null===e||void 0===e||null===(xn=e.cal_event_type)||void 0===xn?void 0:xn.location_type)===Oe.iF.IN_PERSON?tn.CE.BOTTOM:void 0},...null!==(gn=e.cal_event_type)&&void 0!==gn&&gn.max_age_restriction||null!==(fn=e.cal_event_type)&&void 0!==fn&&fn.min_age_restriction||null!==e&&void 0!==e&&null!==(yn=e.cal_event_type)&&void 0!==yn&&yn.min_seats_per_time_slot||null!==e&&void 0!==e&&null!==(_n=e.cal_event_type)&&void 0!==_n&&_n.max_seats_per_time_slot?[{name:"attendees",title:i("general.attendees"),content:(0,f.jsxs)(r.A,{flexDirection:"column",alignItems:"end",style:{gap:4},children:[((null===e||void 0===e||null===(jn=e.cal_event_type)||void 0===jn?void 0:jn.min_seats_per_time_slot)||(null===e||void 0===e||null===(Cn=e.cal_event_type)||void 0===Cn?void 0:Cn.max_seats_per_time_slot))&&(0,f.jsxs)("div",{children:[(null===e||void 0===e||null===(wn=e.cal_event_type)||void 0===wn?void 0:wn.min_seats_per_time_slot)&&i("min.seats",{seats:null===e||void 0===e||null===(An=e.cal_event_type)||void 0===An?void 0:An.min_seats_per_time_slot}),(null===e||void 0===e||null===(bn=e.cal_event_type)||void 0===bn?void 0:bn.max_seats_per_time_slot)&&"".concat(null!==e&&void 0!==e&&null!==(kn=e.cal_event_type)&&void 0!==kn&&kn.min_seats_per_time_slot?" / ":"").concat(i("max.seats",{seats:null===e||void 0===e||null===(Dn=e.cal_event_type)||void 0===Dn?void 0:Dn.max_seats_per_time_slot}))]}),((null===e||void 0===e||null===(Tn=e.cal_event_type)||void 0===Tn?void 0:Tn.min_age_restriction)||(null===e||void 0===e||null===(In=e.cal_event_type)||void 0===In?void 0:In.max_age_restriction))&&(0,f.jsxs)("div",{children:[(null===e||void 0===e||null===(En=e.cal_event_type)||void 0===En?void 0:En.min_age_restriction)&&i("min.age",{age:null===e||void 0===e||null===(Sn=e.cal_event_type)||void 0===Sn?void 0:Sn.min_age_restriction}),(null===e||void 0===e||null===(Nn=e.cal_event_type)||void 0===Nn?void 0:Nn.max_age_restriction)&&"".concat(null!==e&&void 0!==e&&null!==(Pn=e.cal_event_type)&&void 0!==Pn&&Pn.min_age_restriction?" / ":"").concat(i("max.age",{age:null===e||void 0===e||null===(Mn=e.cal_event_type)||void 0===Mn?void 0:Mn.max_age_restriction}))]})]})}]:[],{name:"prevent_booking",title:i("general.prevent_booking"),content:(0,f.jsx)("div",{children:1===(null===e||void 0===e||null===(Ln=e.cal_event_type)||void 0===Ln?void 0:Ln.minimum_booking_notice)?i("prevent_booking.singular",{hours:null===e||void 0===e||null===(Bn=e.cal_event_type)||void 0===Bn?void 0:Bn.minimum_booking_notice}):i("prevent_booking.plural",{hours:null===e||void 0===e||null===(On=e.cal_event_type)||void 0===On?void 0:On.minimum_booking_notice})})}]]})(a,w,C,_,A,m,I,S).filter(e=>!e.hidden))||void 0===e?void 0:e.map(e=>({key:e.name,content:e.content,title:e.title})):[]},[a,w,C,A,S]),{totalAttendees:M,totalTicketsLeft:L}=(0,Me.n0)(E,S),B=((e,n)=>{const{t:t}=(0,s.Bd)("store/products/products/drawer"),{storeCurrency:i}=(0,Le.E_)(),{data:l}=(0,Me.pZ)((null===e||void 0===e?void 0:e.cal_event_type_id)||""),{data:o}=(0,En.cH)((null===e||void 0===e?void 0:e.id)||"",{enabled:!(null===e||void 0===e||!e.voucher_id
1)}),{data:a}=(0,Me.Kh)((null===e||void 0===e?void 0:e.cal_event_type_id)||"",(null===n||void 0===n?void 0:n.id)||"");return[{name:"sales",title:t("general.sales"),content:n?(0,f.jsx)(en.BT,{eventTypeId:(null===e||void 0===e?void 0:e.cal_event_type_id)||"",availability:n}):null!==e&&void 0!==e&&e.cal_event_type_id?(0,f.jsx)(en.$h,{eventTypeId:(null===e||void 0===e?void 0:e.cal_event_type_id)||""}):(0,f.jsx)(en.uI,{productId:(null===e||void 0===e?void 0:e.id)||""})},{name:"revenue",title:t("revenue"),content:(0,f.jsx)("div",{children:n?(0,ze.E1)((null===a||void 0===a?void 0:a.total)||0,i):null!==e&&void 0!==e&&e.cal_event_type_id?(0,ze.E1)((null===l||void 0===l?void 0:l.total)||0,i):(0,ze.E1)((null===o||void 0===o?void 0:o.total)||0,i)})}]})(a,S),{calBookings:O}=(0,Me.__)({event_type_id:null===E||void 0===E?void 0:E.id,status:Oe.cP.ACCEPTED,limit:1e5,expand:"attendees"},{enabled:!(null===E||void 0===E||!E.id)}),z=(0,c.useMemo)(()=>null===O||void 0===O?void 0:O.filter(e=>e.start_time===(null===S||void 0===S?void 0:S.date)),[O,S]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(In.A,{open:h&&h===(null===S||void 0===S?void 0:S.id),onCancel:()=>x(["confirmDeleteAvailability"],[""]),loading:y,title:_("delete.availability.title"),onConfirm:async()=>{try{await g((null===S||void 0===S?void 0:S.id)||""),x(["confirmDeleteAvailability"],[""]),i()}catch(e){console.error(e),Ke.Ay.error(_("error.delete.availability"))}},confirmText:_("delete"),cancelText:_("cancel"),danger:!0,bodyText:null!==z&&void 0!==z&&z.length?_("delete.availability.body.bookings"):_("delete.availability.body")}),(0,f.jsx)(Tn.A,{eventType:null===a||void 0===a?void 0:a.cal_event_type,availability:S,seatsLeft:L,open:D,onCancel:()=>T(!1)}),(0,f.jsxs)(Ve.A,{open:t,onClose:i,title:_("event"),goBack:i,removeCloseButton:!0,footer:(0,f.jsx)(o.Ay,{className:"w-100 d-flex align-items-center justify-content-center",style:{height:C?48:40},type:"primary",onClick:()=>{p("/store/products/edit?product_type=event&product_id=".concat(null===a||void 0===a?void 0:a.id,"&previous=").concat((0,v.d0)()))},children:_("actions.edit")}),children:[(0,f.jsx)("div",{className:"mt-4",children:(0,f.jsx)(hn,{product:a,availability:S,setShowAddAttendeeModal:T})}),(0,f.jsx)("div",{className:C?"mt-4":"mt-5",children:(0,f.jsx)(tn.Ay,{title:_("section.title.general"),items:P})}),!N&&(0,f.jsx)("div",{className:C?"mt-4":"mt-5",children:(0,f.jsx)(tn.Ay,{title:_("revenue"),items:B})}),(0,f.jsx)("div",{className:C?"mt-4":"mt-5",children:(0,f.jsxs)(tn.G5,{children:[(0,f.jsxs)(r.A,{alignItems:"start",justifyContent:"between",className:"w-100",children:[(0,f.jsxs)(r.A,{flexDirection:"column",children:[(0,f.jsx)("h4",{className:"mb-1",style:{fontSize:18,fontWeight:600},children:_("general.attendees")}),(0,f.jsx)("div",{className:"text-grey",children:_("attendees.confirmed",{attendees:"".concat(M).concat(null!==E&&void 0!==E&&E.max_seats_per_time_slot?"/".concat(null===E||void 0===E?void 0:E.max_seats_per_time_slot):"")})})]}),(0,f.jsx)(Xe.A,{content:0===L?_("date.soldout"):new Date((null===S||void 0===S?void 0:S.date)||"")<new Date?_("past.event"):void 0,placement:"bottom",open:(0===L||new Date((null===S||void 0===S?void 0:S.date)||"")<new Date)&&void 0,children:(0,f.jsx)(o.Ay,{className:"gray-btn",disabled:0===L||new Date((null===S||void 0===S?void 0:S.date)||"")<new Date,onClick:()=>T(!0),icon:(0,f.jsx)(l.A,{})})})]}),(0,f.jsx)(kn,{eventType:E,availability:S})]})}),(0,f.jsx)(r.A,{className:"p-4",gap:"lg",flexDirection:"column",children:((null===E||void 0===E||null===(n=E.availabilities)||void 0===n?void 0:n.length)||0)>1&&(0,f.jsxs)(o.Ay,{className:"w-100 text-danger rounded-pill d-flex align-items-center justify-content-center border-0",type:"text",danger:!0,onClick:()=>x(["confirmDeleteAvailability"],[(null===S||void 0===S?void 0:S.id)||""]),children:[(0,f.jsx)(Dn.A,{className:"pr-1 mr-1"}),_("actions.delete")]})})]})]})};var Nn=t(59781),Pn=t(88991),Mn=t(46564),Ln=t(30596);const Bn=e=>{let{open:n,onCancel:t,eventType:i}=e;const{t:l}=(0,s.Bd)("my-page/event-product"),a=(0,u.al)(),{mutateAsync:d,isLoading:r}=(0,ae.zU)(),c=(0,Ln.iX)(void 0,(null===i||void 0===i?void 0:i.time_zone)||(0,de.MS)());return(0,f.jsx)(Pn.oZ,{open:n,onCancel:t,title:l("add_date"),footer:(0,f.jsx)(o.Ay,{loading:r,type:"primary",className:"w-100",onClick:async()=>{try{const e=(0,de.jH)(c.tempDate,c.tempTime,c.timeZone);e&&(await d({date:e,event_type_id:i.id,start_time:e.toISOString().slice(11,19),end_time:B()(e).add((null===i||void 0===i?void 0:i.duration)||1,"hour").toISOString().slice(11,19)}),t())}catch(e){console.error(e),Ke.Ay.error(l("availability.create.error"))}},children:l("save")}),removePadding:!0,maxBodyHeight:a?void 0:"70vh",children:(0,f.jsx)(Mn.Ay,{controls:c,date:void 0,show:!0,add_time:!0,hideAddTimeSwitch:!0,timeTitle:l("start_time"),disableTimezone:!0,timezone:(null===i||void 0===i?void 0:i.time_zone)||"Europe/Paris",setUpdateTrigger:()=>{}})})}
1,On=e=>{let{product:n,calEventType:t}=e;const{t:i}=(0,s.Bd)("store/products/products/table"),l=(0,Nn.jE)(),[o,a]=(0,c.useState)(""),[d,r]=(0,c.useState)(""),{mutateAsync:u,isLoading:v}=(0,dn.LyD)(n.id);return(0,f.jsxs)(f.Fragment,{children:[t&&(0,f.jsx)(Bn,{open:o===n.id,onCancel:()=>a(""),eventType:t}),(0,f.jsx)(In.A,{open:!!d&&d===n.id,onCancel:()=>{r("")},loading:v,title:i("actions.delete_event.title"),onConfirm:async()=>{await u(),l.invalidateQueries(["page-blocks"]),r("")},confirmText:i("delete"),cancelText:i("cancel"),danger:!0,bodyText:(0,f.jsxs)(s.x6,{i18nKey:"actions.delete_event.body_text",t:i,components:{b:(0,f.jsx)("b",{})},children:["It\u2019ll be ",(0,f.jsx)("b",{children:"gone forever"})," and won\u2019t be able to recover it."]})})]})};var zn=t(57645),Fn=t(8354);const Rn=()=>(0,f.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M2.33333 7L10.3985 11.5698C13.3719 13.2545 14.6281 13.2545 17.6015 11.5698L25.6667 7",stroke:"#1B1B1A",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,f.jsx)("path",{d:"M2.35172 15.7217C2.42799 19.2982 2.46613 21.0864 3.78578 22.4111C5.10543 23.7357 6.94205 23.7819 10.6153 23.8742C12.8792 23.9311 15.1208 23.9311 17.3847 23.8742C21.0579 23.7819 22.8946 23.7357 24.2142 22.4111C25.5339 21.0864 25.572 19.2982 25.6483 15.7217C25.6728 14.5718 25.6728 13.4286 25.6483 12.2786C25.572 8.70217 25.5339 6.91394 24.2142 5.58927C22.8946 4.2646 21.058 4.21845 17.3847 4.12616C15.1208 4.06928 12.8792 4.06927 10.6153 4.12615C6.94205 4.21844 5.10542 4.26458 3.78577 5.58925C2.46612 6.91392 2.42799 8.70215 2.35172 12.2786C2.3272 13.4286 2.3272 14.5718 2.35172 15.7217Z",stroke:"#1B1B1A",strokeWidth:"1.5",strokeLinejoin:"round"})]}),qn=e=>(0,f.jsx)(ge.A,(0,h.A)({component:Rn},e)),Hn=()=>(0,f.jsxs)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("path",{d:"M18.5 7C19.2745 7.16058 19.8588 7.42859 20.3284 7.87589C21.5 8.99181 21.5 10.7879 21.5 14.38C21.5 17.9721 21.5 19.7681 20.3284 20.8841C19.1569 22 17.2712 22 13.5 22H11.5C7.72876 22 5.84315 22 4.67157 20.8841C3.5 19.7681 3.5 17.9721 3.5 14.38C3.5 10.7879 3.5 8.99181 4.67157 7.87589C5.14118 7.42859 5.7255 7.16058 6.5 7",stroke:"#1B1B1A",strokeWidth:"1.5",strokeLinecap:"round"}),(0,f.jsx)("path",{d:"M12.5253 2.00052L12.5 14M12.5253 2.00052C12.3627 1.99379 12.1991 2.05191 12.0533 2.17492C11.1469 2.94006 9.5 4.92886 9.5 4.92886M12.5253 2.00052C12.6711 2.00657 12.8162 2.06476 12.9468 2.17508C13.8531 2.94037 15.5 4.92886 15.5 4.92886",stroke:"#1B1B1A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Zn=e=>(0,f.jsx)(ge.A,(0,h.A)({component:Hn},e)),Un=()=>(0,f.jsxs)("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("rect",{width:"60",height:"60",rx:"13.3594",fill:"url(#paint0_linear_10301_51198)"}),(0,f.jsx)("path",{d:"M51.9141 28.7109C51.9141 38.7427 42.1028 46.875 30 46.875C28.1669 46.875 26.3864 46.6884 24.6846 46.337C24.1704 46.2308 23.6344 46.2168 23.1703 46.4622C21.6504 47.2659 19.149 49.3009 15.8918 49.4451C15.7448 49.4516 15.6625 49.2827 15.753 49.1666C17.678 46.6962 18.9325 44.4129 18.1055 43.969C12.0758 40.733 8.08594 35.1082 8.08594 28.7109C8.08594 18.6792 17.8972 10.5469 30 10.5469C42.1028 10.5469 51.9141 18.6792 51.9141 28.7109Z",fill:"white"}),(0,f.jsx)("defs",{children:(0,f.jsxs)("linearGradient",{id:"paint0_linear_10301_51198",x1:"30",y1:"0",x2:"30",y2:"60",gradientUnits:"userSpaceOnUse",children:[(0,f.jsx)("stop",{stopColor:"#5CF777"}),(0,f.jsx)("stop",{offset:"1",stopColor:"#0EBC29"})]})})]}),Qn=e=>(0,f.jsx)(ge.A,(0,h.A)({component:Un},e));var Wn,Vn=t(26847),Yn=t(54844);const Gn=m.Ay.div(Wn||(Wn=(0,i.A)(["\n  border-radius: 16px;\n  background-color: #efefef;\n  padding: 10px;\n  width: ","px;\n  min-width: ","px;\n  min-height: ","px;\n  height: ","px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  transition: background-color 0.2s;\n  &:hover {\n    background-color: #dedddd;\n  }\n"])),e=>{let{size:n}=e;return n||60},e=>{let{size:n}=e;return n||60},e=>{let{size:n}=e;return n||60},e=>{let{size:n}=e;return n||60}),Kn=(0,p.m)(r.A),Xn=e=>{let{store_url:n,shareText:t,shareTitle:i,pageCollections:l,handleIntegrate:o,product:a}=e;const{t:d}=(0,s.Bd)("my-page/share-page"),{editPageCollection:r}=(0,v.IT)(),u=(0,c.useMemo)(()=>r?null===l||void 0===l?void 0:l.find(e=>e.slug===r):null,[r,l]),p=(0,c.useMemo)(()=>t||"".concat(d("share.text",{paage:zn.uY?"Paage":"Lama"})," ").concat(n),[d,n,t]),m=(0,c.useMemo)(()=>[...(u||a)&&o?[{key:"integrate",title:d("integrate"),icon:(0,f.jsx)(Gn,{children:(0,f.jsx)(An.n,{icon:bn.SourceCodeIcon,size:28,strokeWidth:1.5})}),onClick:o}]:[],{key:"messages",title:d("messages"),icon:(0,f.jsx)(Qn,{}),onClick:()=>{window.open("sms:?body=".concat(encodeURIComponent(p)),"_blank")}},{key:"whatsapp",title:"WhatsApp",icon:(0,f.jsx)(Vn.A,{}),onClick:()=>
1{window.open("https://api.whatsapp.com/send/?text=".concat(encodeURIComponent(p)),"_blank")}},{key:"x",title:"X",icon:(0,f.jsx)(Yn.A,{}),onClick:()=>{window.open("https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(p)),"_blank")}},{key:"email",title:d("email"),icon:(0,f.jsx)(Gn,{children:(0,f.jsx)(qn,{})}),onClick:()=>{window.open("mailto:?subject=".concat(encodeURIComponent(i||d("check.out.my.page",{paage:zn.uY?"Paage":"Lama"})),"&body=").concat(encodeURIComponent(p)),"_blank")}},{key:"more-apps",title:d("more.apps"),icon:(0,f.jsx)(Gn,{children:(0,f.jsx)(Zn,{})}),onClick:()=>{try{navigator.share({text:t,url:n})}catch(e){console.log(e)}}}],[d,n,t,u,a,o]);return(0,f.jsxs)(Kn,{gap:"sm",alignItems:"center",children:[m.map((e,n)=>(0,f.jsxs)("div",{className:"gap-xs d-flex justify-content-center align-items-center flex-column cursor-pointer\n            ".concat(0===n?"ml-4 h-100 pt-4 pb-4 pr-1":"h-100 pt-4 pb-4","\n         "),onClick:e.onClick,children:[(0,f.jsx)("div",{className:"mr-1 ml-1 d-flex align-items-center justify-content-center",style:{minHeight:60,maxHeight:60,minWidth:60,maxWidth:60},children:e.icon}),(0,f.jsx)("div",{className:"font-size-sm position-relative",children:e.title})]},e.key)),(0,f.jsx)("div",{style:{minWidth:4,maxWidth:4,overflow:"hidden",visibility:"hidden"},children:"-"})]})},$n=e=>{let{open:n,onCancel:t,product:i}=e;const{t:l}=(0,s.Bd)("store/products/products/drawer"),o=(0,u.al)(),{store:a}=(0,dn.gbT)(),d=(0,c.useMemo)(()=>"".concat(zn.I6,"/").concat(null===a||void 0===a?void 0:a.eshop_handle,"/events/").concat((0,ze.e9)(i.title,i.handle||"")),[a,i]);return(0,f.jsx)(Pn.oZ,{footer:null,open:n,centered:!0,closable:!0,destroyOnClose:!0,removePadding:!0,onCancel:t,width:440,title:null,fullScreenOnMobile:!0,children:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(r.A,{flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"md",className:"p-4",children:[(0,f.jsx)("h1",{className:"mb-0 ".concat(o?"mt-0":"mt-4"," text-center"),children:l("share.event.title")}),(0,f.jsx)("div",{className:"text-center",children:l("share.event.description")}),(0,f.jsx)(Je.A,{size:"large",copiedText:l("page_link.copied"),copyButtonPosition:"prefix",popover:(0,f.jsx)("div",{children:l("copy.link")}),link:d})]}),(0,f.jsx)(Fn.A,{className:"mt-0 mb-0"}),(0,f.jsx)(Xn,{store_url:d,shareTitle:l("share.title.product"),shareText:"".concat(l("share.text.product")," ").concat(d)})]})})};var Jn=t(63444),et=t(88370);const nt=e=>{let{open:n,onCancel:t}=e;const i=(0,u.al)(),[l,o]=(0,c.useState)(""),[a,d]=(0,c.useState)(1),r=(0,et.V)(a,d,o);return(0,f.jsx)(Jn.A,{removePadding:!0,open:n,width:600,currentStep:a,maxBodyHeight:i?"":"75vh",onCancel:t,updateTrigger:l,items:r,infinite:!0,currentSlide:a-1})};var tt;B().extend(z()),B().extend(R());const it=m.Ay.div(tt||(tt=(0,i.A)(["\n  ","\n"])),p.E),lt=()=>{const{dateDetails:e,showProductDetails:n,shareEvent:t,create:i}=(0,v.IT)(),{t:p}=(0,s.Bd)(["calendar/index","store/products/products/drawer","store/products/products/product-types","store/products/products/table","store/products/products/product-status","my-page/share-page","my-page/digital-product","my-page/event","store/products/create/media","store/products/create/general","store/sales"]),m=(0,u.al)(),[h,x]=(0,c.useState)(null),[_,j]=(0,c.useState)(B()()),C=(0,v.Iz)(),[w,A]=(0,c.useState)({}),{calendarEvents:b,eventTypeOptions:k,selectedDayEvents:D}=function(e,n,t){const{events:i}=(0,g.oZ)({startDate:e.clone().subtract(40,"day").toDate().getTime(),endDate:e.clone().add(40,"day").toDate().getTime(),keepPreviousData:!1}),{events:l}=(0,g.am)({startDate:e.clone().subtract(40,"day").toDate().getTime(),endDate:e.clone().add(40,"day").toDate().getTime(),keepPreviousData:!1}),[o,a]=(0,c.useState)([]),{calAvailabilities:d}=(0,ae.zG)({expand:"event_type.product.variants.prices,event_type.address",date:{gte:e.clone().subtract(45,"day").toDate(),lte:e.clone().add(45,"day").toDate()},limit:1e6},{keepPreviousData:!1});(0,c.useEffect)(()=>{a(e=>{var n;return[...e,...null!==(n=null===d||void 0===d?void 0:d.filter(n=>!e.find(e=>e.id===n.id)))&&void 0!==n?n:[]]})},[d]);const r=(0,c.useMemo)(()=>{const e=[];return null===o||void 0===o||o.forEach(n=>{var t,i,l;null!==e&&void 0!==e&&e.find(e=>e.value===n.event_type_id)||e.push({label:(null===n||void 0===n||null===(t=n.event_type)||void 0===t?void 0:t.t
1itle)||"",image:(null===n||void 0===n||null===(i=n.event_type)||void 0===i||null===(l=i.product)||void 0===l?void 0:l.thumbnail)||"",value:n.event_type_id||""})}),e},[o]),s=(0,c.useMemo)(()=>(null===d||void 0===d?void 0:d.filter(e=>{var n,i;return(!t.eventTypeId||t.eventTypeId===e.event_type_id)&&(!t.calendarId||"paage"===t.calendarId)&&(null==t.online||t.online===("published"===(null===(n=e.event_type)||void 0===n||null===(i=n.product)||void 0===i?void 0:i.status)))}).map(e=>{var n,t,i,l,o,a;const d=(null===e||void 0===e||null===(n=e.event_type)||void 0===n?void 0:n.time_zone)||"UTC",r=B()(e.date).tz(d),s=(null===e||void 0===e||null===(t=e.event_type)||void 0===t||null===(i=t.product)||void 0===i?void 0:i.status)===re.S.DRAFT?U.hm:ue((null===e||void 0===e?void 0:e.event_type_id)||"");return{date:r,id:e.id,title:(null===(l=e.event_type)||void 0===l?void 0:l.title)||"",color:s,offline:(null===e||void 0===e||null===(o=e.event_type)||void 0===o||null===(a=o.product)||void 0===a?void 0:a.status)===re.S.DRAFT,iCalUID:e.ical_uid||""}}))||[],[d,t]),u=(0,c.useMemo)(()=>null===i||void 0===i?void 0:i.filter(e=>{var n;return!t.eventTypeId&&(!t.calendarId||t.calendarId===(null===(n=e.calendar)||void 0===n?void 0:n.externalId))&&!t.online&&!s.find(n=>n.iCalUID&&n.iCalUID===e.id)}).map(e=>{var n,t;return{id:e.id,date:e.start.dateTime&&e.start.timeZone?B()((0,de.A5)(e.start.dateTime,e.start.timeZone)):B()(e.start.dateTime||e.start.date).tz(e.start.timeZone),title:e.title,color:(null===(n=e.calendar)||void 0===n?void 0:n.hexColor)||ue((null===(t=e.calendar)||void 0===t?void 0:t.externalId)||""),iCalUID:e.iCalUId}}),[i,t,s]),v=(0,c.useMemo)(()=>null===l||void 0===l?void 0:l.filter(e=>{var n;return!t.eventTypeId&&(!t.calendarId||t.calendarId===(null===(n=e.calendar)||void 0===n?void 0:n.externalId))&&!t.online&&!s.find(n=>n.iCalUID&&n.iCalUID===e.id)&&!u.find(n=>n.iCalUID&&n.id===e.id)}).map(e=>{var n,t;return{id:e.id,date:e.start.dateTime&&e.start.timeZone?B()((0,de.A5)(e.start.dateTime,e.start.timeZone)):B()(e.start.dateTime||e.start.date).tz(e.start.timeZone),title:e.title,color:(null===(n=e.calendar)||void 0===n?void 0:n.hexColor)||ue((null===(t=e.calendar)||void 0===t?void 0:t.externalId)||""),iCalUID:e.iCalUId}}),[l,t,s,u]),p=(0,c.useMemo)(()=>[...s,...u,...v],[s,u,v]),m=(0,c.useMemo)(()=>[...d||[],...i||[],...l||[]],[d,i,l]),h=(0,c.useMemo)(()=>p.filter(e=>e.date.isSame(n,"day")).map(e=>m.find(n=>n.id===e.id)),[p,n,m]);return{calendarEvents:p,eventTypeOptions:r,selectedDayEvents:h}}(_,h,w),T=(0,c.useMemo)(()=>null===D||void 0===D?void 0:D.find(n=>{let{id:t}=n;return e&&t===e}),[e,D]),I=(0,c.useMemo)(()=>{var e,n,i;return(null===T||void 0===T||null===(e=T.event_type)||void 0===e?void 0:e.product)||(null===D||void 0===D||null===(n=D.find(e=>{var n,i;return t&&(null===e||void 0===e||null===(n=e.event_type)||void 0===n||null===(i=n.product)||void 0===i?void 0:i.id)===t}))||void 0===n||null===(i=n.event_type)||void 0===i?void 0:i.product)},[T,t]);return(0,f.jsxs)(a.A,{children:[(0,f.jsx)(Ye,{open:!!h&&!e&&!(null===D||void 0===D||!D.length),onCancel:()=>x(null),date:h,events:D}),(0,f.jsx)(nt,{open:"true"===i,onCancel:()=>C(["create"],[""])}),e&&I&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Sn,{open:!!e&&!n,onClose:()=>C(["dateDetails"],[""]),product:I,availability:T}),(0,f.jsx)(On,{product:I,calEventType:null===T||void 0===T?void 0:T.event_type})]}),I&&(0,f.jsx)($n,{open:!!I&&t===I.id,onCancel:()=>C(["shareEvent"],[""]),product:I}),(0,f.jsxs)("div",{className:"d-flex justify-content-between align-items-center flex-column",children:[(0,f.jsx)(d.Y,{title:p("calendar"),button:(0,f.jsx)(r.A,{alignItems:"center",gap:"md",children:(0,f.jsx)(o.Ay,{type:"primary",onClick:()=>{C(["create"],["true"])},icon:(0,f.jsx)(l.A,{style:{fontSize:20}}),className:"d-flex align-items-center justify-content-center",size:m?"small":void 0,style:{borderRadius:m?"100%":""},children:!m&&p("new.event")})}),noWrap:!0,customPadding:m?16:30}),(0,f.jsxs)("div",{className:"pl-0 pr-0  pb-1",style:{width:"100%"},children:[m&&(0,f.jsx)(it,{style:{overflowX:"auto",paddingRight:16,paddingLeft:16},children:(0,f.jsx)(y,{filters:w,setFilters:A,eventTypeOptions:k})}),(0,f.jsx)("div",{className:m?"":"pr-5 pl-4",children:(0,f.jsx)(oe,{selectedDate:h,setSelectedDate:x,displayDate:_,setDisplayDate:j,items:b,filters:w,setFilters:A,eventTypeOptions:k,offset:m?330:240})})]})]})]})}},57378:(e,n,t)=>{t.d(n,{A:()=>p,sA:()=>v,zG:()=>h,zU:()=>m});var i=t(89379),l=t(80045),o=t(203),a=t(59781),d=t(12836),r=t(96444),s=t(68262),c=t(95406);const u=["data"];function v(){const e=(0,a.jE)();return(0,d.n)({mutationFn:async e=>(0,r.default)("/admin/cal-availabilities/".concat(e),{method:"DELETE"}),onSuccess:()=>
1{e.invalidateQueries(s.BnX.all)}})}function p(){return(0,d.n)({mutationFn:async e=>{let{availabilityId:n}=e;return(0,r.default)("/admin/cal-availabilities/".concat(n,"/attendee-list"),{method:"GET",responseType:"arraybuffer",headers:{"Content-Type":"application/json",Accept:"application/pdf"}})}})}function m(){const e=(0,a.jE)();return(0,d.n)({mutationFn:async e=>(0,r.default)("/admin/cal-availabilities",{method:"POST",data:e}),onSuccess:()=>{e.invalidateQueries(s.BnX.all)}})}function h(e,n){const t=(0,o.I)(["cal-availabilities",e],{queryFn:async()=>(0,r.default)("/admin/cal-availabilities".concat((0,c.cX)(e||{})),{method:"GET"}),enabled:void 0===(null===n||void 0===n?void 0:n.enabled)||n.enabled,keepPreviousData:void 0===(null===n||void 0===n?void 0:n.keepPreviousData)||n.keepPreviousData}),{data:a}=t,d=(0,l.A)(t,u);return(0,i.A)((0,i.A)({},a),d)}},72528:(e,n,t)=>{t.d(n,{$u:()=>C,DX:()=>b,GF:()=>T,KZ:()=>w,Sj:()=>_,Y0:()=>A,am:()=>E,me:()=>P,oZ:()=>I,om:()=>k,pc:()=>j,rZ:()=>N,sv:()=>y,uO:()=>D,yF:()=>S});var i=t(89379),l=t(80045),o=t(203),a=t(59781),d=t(12836),r=t(96444),s=t(11136),c=t(65043);const u=["data"],v=["data"],p=["data"],m=["data"],h=["data"];function x(e){e.invalidateQueries(["cal-credentials"]),e.invalidateQueries(["store-selected-calendar"]),e.invalidateQueries(["store-conflict-calendars"]),e.invalidateQueries(["google-calendar-events"]),e.invalidateQueries(["google-calendars"]),e.invalidateQueries(["outlook-calendar-events"]),e.invalidateQueries(["outlook-calendars"]),e.invalidateQueries(["appointment-external-events"])}const g="paage-cal-credentials-updated";function f(){try{localStorage.setItem(g,String(Date.now()))}catch(e){}try{const e=new BroadcastChannel(g);e.postMessage({type:"updated"}),e.close()}catch(n){}}function y(e){const n=n=>{n.key===g&&e()};window.addEventListener("storage",n);let t=null;try{t=new BroadcastChannel(g),t.onmessage=()=>e()}catch(i){t=null}return()=>{var e;window.removeEventListener("storage",n),null===(e=t)||void 0===e||e.close()}}function _(e){const n=(0,o.I)(["cal-credentials"],{queryFn:async()=>(0,r.default)("/admin/cal-credentials",{method:"GET"}),enabled:void 0===(null===e||void 0===e?void 0:e.enabled)||e.enabled,keepPreviousData:void 0===(null===e||void 0===e?void 0:e.keepPreviousData)||e.keepPreviousData}),{data:t}=n,a=(0,l.A)(n,u);return(0,i.A)((0,i.A)({},t),a)}function j(e){let{clientId:n,redirectUri:t,state:i}=e;const l="url_params="+JSON.stringify(i),o={response_type:"code",scope:["User.Read","Calendars.Read","Calendars.ReadWrite","offline_access","OnlineMeetings.ReadWrite"].join(" "),client_id:n,prompt:"select_account",redirect_uri:t,state:l},a=new URLSearchParams(o);return"https://login.microsoftonline.com/common/oauth2/v2.0/authorize?".concat(a)}function C(e){let{clientId:n,redirectUri:t,state:i}=e;const l="url_params="+JSON.stringify(i),o={response_type:"code",access_type:"offline",scope:["https://www.googleapis.com/auth/calendar.events","https://www.googleapis.com/auth/calendar.readonly","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/userinfo.email"].join(" "),client_id:n,prompt:"consent",redirect_uri:t,state:l},a=new URLSearchParams(o);return"https://accounts.google.com/o/oauth2/v2/auth?".concat(a)}const w=function(e,n){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=(0,a.jE)();return(0,o.I)({queryKey:["exchangeOutlookCalendarToken",e,n],queryFn:async()=>(0,r.default)("admin/cal-credentials/office365-calendar/token",{method:"POST",data:{code:e,redirect_uri:n}}),enabled:t&&!!e,onSuccess:()=>{x(i),f()}})},A=function(e,n){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=(0,a.jE)();return(0,o.I)({queryKey:["exchangeGoogleCalendarToken",e,n],queryFn:async()=>(0,r.default)("admin/cal-credentials/google-calendar/token",{method:"POST",data:{code:e,redirect_uri:n}}),onSuccess:()=>{x(i),f()},enabled:t&&!!e})};function b(){const e=(0,a.jE)();return(0,d.n)({mutationFn:async e=>{let{code:n,redirectUri:t}=e;return(0,r.default)("admin/cal-credentials/google-calendar/token",{method:"POST",data:{code:n,redirect_uri:t}})},onSuccess:()=>{x(e),f()}})}function k(){const e=(0,a.jE)();return(0,d.n)({mutationFn:async e=>{let{code:n,redirectUri:t}=e;return(0,r.default)("admin/cal-credentials/office365-calendar/token",{method:"POST",data:{code:n,redirect_uri:t}})},onSuccess:()=>{x(e),f()}})}function D(){const e=(0,a.jE)();return(0,d.n)({mutationFn:async e=>(0,r.default)("/admin/cal-credentials/".concat(e),{method:"DELETE"}),onSuccess:()=>{x(e)}})}function T(e){const n=(0,o.I)(["outlook-calendars"],{queryFn:async()=>(0,r.default)("/admin/cal-credentials/office365-calendar/calendars",{method:"GET"}),enabled:void 0===(null===e||void 0===e?void 0:e.enabled)||e.enabled,keepPreviousData:void 0===(null===e||void 0===e?void 0:e.keepPreviousData)||e.keepPreviousData}),{data:t}=n,a=(0,l.A)(n,v);return(0,i.A)({calendars:(null===t||void 0===t?void 0:t.calendars)||[]},a)}function I(e){const n=(0,o.I)(["outlook-calendar-events",null===e||void 0===e?void 0:e.startDate,null===e||void 0===e?void 0:e.endDate],{queryFn:async()=>(0,r.default)("/admin/cal-credentials/office365-calendar/calendars/events".concat(null!==e&&void 0!==e&&e.startDate?"?startDate=".concat(e.startDate):"").concat(null!==e&&void 0!==e&&e.endDate?"&endDate=".concat(e.endDate):""),{method:"GET"}),enabled:void 0===(null===e||void 0===e?void 0:e.enabled)||e.enabled,keepPreviousData:void 0===(null===e||void 0===e?void 0:e.keepPreviousData)||e.keepPreviousData}),{data:t}=n,a=(0,l.A)(n,p);return(0,i.A)({events:(null===t||void 0===t?void 0:t.events)||[]},a)}function E(e){const n=(0,o.I)(["google-calendar-events",null===e||void 0===e?void 0:e.startDate,null===e||void 0===e?void 0:e.endDate],{queryFn:async()=>(0,r.default)("/admin/cal-credentials/google-calendar/calendars/events".concat(null!==e&&void 0!==e&&e.startDate?"?startDate=".concat(e.startDate):"").concat(null!==e&&void 0!==e&&e.endDate?"&endDate=".concat(e.endDate):""),{method:"GET"}),enabled:void 0===(null===e||void 0===e?void 0:e.enabled)||e.enabled,keepPreviousData:void 0===(null===e||void 0===e?void 0:e.keepPreviousData)||e.keepPreviousData}),{data:t}=n,a=(0,l.A)(n,m);return(0,i.A)({events:(null===t||void 0===t?void 0:t.events)||[]},a)}function S(e){const n=(0,o.I)(["google-calendars"],{queryFn:async()=>(0,r.default)("/admin/cal-credentials/google-calendar/calendars",{method:"GET"}),enabled:void 0===(null===e||void 0===e?void 0:e.enabled)||e.enabled,keepPreviousData:void 0===(null===e||void 0===e?void 0:e.keepPreviousData)||e.keepPreviousData}),{data:t}=n,a=(0,l.A)(n,h);return(0,i.A)({calendars:(null===t||void 0===t?void 0:t.calendars)||[]},a)}function N(){const{calCredentials:e}=_(),n=(0,c.useMemo)(()=>null===e||void 0===e?void 0:e.find(e=>{var n;return(null===(n=e.app)||void 0===n?void 0:n.slug)===s.L$.GOOGLE}),[e]),{calendars:t}=S({enabled:!!n}),i=(0,c.useMemo)(()=>null===e||void 0===e?void 0:e.find(e=>{var n;return(null===(n=e.app)||void 0===n?void 0:n.slug)===s.L$.OUTLOOK}),[e]),{calendars:l}=T({enabled:!!i});return{integrationCalendars:(0,c.useMemo)(()=>[...t,...l].filter(e=>!e.readOnly),[t,l]),googleCalendars:t,outlookCalendars:l}}function P(e){const n=(0,a.jE)(),{enabled:t}=e;(0,c.useEffect)(()=>
1{if(!t)return;const e=()=>{x(n)};window.addEventListener("focus",e);const i=window.setInterval(e,2500),l=y(e);return()=>{window.removeEventListener("focus",e),window.clearInterval(i),l()}},[t,n])}},73963:(e,n,t)=>{t.d(n,{CJ:()=>d,FQ:()=>o,ZX:()=>r});var i=t(89379),l=t(49395);function o(e){var n;return"appointment"===(null===e||void 0===e||null===(n=e.cal_event_type)||void 0===n?void 0:n.kind)}function a(e,n){return"/".concat(e,"/book/").concat(n)}function d(e,n){var t,i,d;const r=null===(t=e.cal_event_type)||void 0===t?void 0:t.slug,s=e.cal_event_type_id||(null===(i=e.cal_event_type)||void 0===i?void 0:i.id);return o(e)&&r&&s&&n?{url:a(n,r),cal_event_type_id:s,title:(null===(d=e.cal_event_type)||void 0===d?void 0:d.title)||e.title||"",cover_url:e.thumbnail||void 0,thumbnail_url:e.thumbnail||void 0,display_mode:l.Cu.SQUARE,enriched:!0}:null}function r(e,n,t){const l=d(e,n);return l?(0,i.A)((0,i.A)({id:t},l),{},{cal_event_type:e.cal_event_type}):null}},94171:(e,n,t)=>{t.d(n,{A:()=>c});var i=t(65043),l=t(98734),o=t(4686),a=t(87790),d=t(88991),r=t(63935),s=t(70579);const c=e=>{let{open:n,onCancel:t,onConfirm:c,confirmText:u,cancelText:v,title:p,bodyText:m,danger:h,loading:x,confirmPhrase:g}=e;const[f,y]=(0,i.useState)("");(0,i.useEffect)(()=>{n||y("")},[n]);const _=!!c&&!!u&&(!g||f===g);return(0,s.jsx)(d.oZ,{open:n,onCancel:t,title:p,removeDivider:!0,size:"small",destroyOnClose:!0,fullScreenOnMobile:!0,zIndex:3e3,footer:(0,s.jsxs)(l.A,{justifyContent:"end",alignItems:"center",gap:"sm",className:"w-100",children:[(0,s.jsx)(o.Ay,{type:"secondary",className:"text-sm",onClick:t,children:v}),!!c&&!!u&&(0,s.jsx)(o.Ay,{type:h?"destructive":"default",onClick:()=>{_&&!x&&(null===c||void 0===c||c())},loading:x,disabled:!_,children:u})]}),children:(0,s.jsxs)(l.A,{flexDirection:"column",gap:"md",children:[(0,s.jsx)("div",{className:"text-sm",style:{color:r.f,whiteSpace:"pre-line"},children:m}),g&&(0,s.jsx)(a.A,{value:f,onChange:e=>y(e.target.value),placeholder:g})]})})}},99139:(e,n,t)=>{t.d(n,{A:()=>g});var i,l,o=t(57528),a=t(67298),d=t(98734),r=t(63935),s=t(26399),c=t(65043),u=t(2826),v=t(91646),p=t(79229),m=t(70579);const h=u.Ay.div(i||(i=(0,o.A)(["\n  cursor: ",";\n  pointer-events: ",";\n  border-radius: 8px;\n  padding: 12px;\n  border: 1px solid ",";\n  background: ",";\n  transition: all 0.2s ease;\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  justify-content: space-between;\n  &:hover {\n    background: ",";\n  }\n"])),e=>{let{disabled:n}=e;return n?"not-allowed":"pointer"},e=>{let{disabled:n}=e;return n?"none":"auto"},r.Y2,e=>{let{disabled:n}=e;return n?r.mP:r.dh},r.aj),x=u.Ay.div(l||(l=(0,o.A)(["\n  opacity: ",";\n  transition: all 0.2s ease;\n"])),e=>{let{isHovered:n}=e;return n?1:0}),g=e=>{let{image:n,title:t,description:i,icon:l,onClick:o,action:u,disabled:g,className:f,style:y}=e;const[_,j]=(0,c.useState)(!1),C=(0,s.al)();return(0,m.jsxs)(h,{className:f,style:y,disabled:g,onClick:o,onMouseEnter:C?void 0:()=>j(!0),onMouseLeave:C?void 0:()=>j(!1),children:[(0,m.jsxs)(d.A,{flexDirection:"column",gap:"xs",children:[l&&(0,m.jsx)(m.Fragment,{children:(0,v.JJ)(l)?(0,m.jsx)(a.n,{strokeWidth:2,icon:l,size:16}):l}),(0,m.jsxs)(d.A,{alignItems:"center",gap:"sm",children:[n&&(0,m.jsx)(p.A,{format:"standard",src:n,alt:"string"===typeof t?t:""}),(0,m.jsxs)(d.A,{flexDirection:"column",gap:"xxs",children:[(0,m.jsx)("div",{className:"text-sm-medium",children:t}),i&&(0,m.jsx)("div",{className:"text-xs",style:{color:r.f},children:i})]})]})]}),u&&!C&&(0,m.jsx)(x,{isHovered:_,children:u})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.