PageSourceSearch

https://zmantov.co.il/_next/static/chunks/1013-8d50688cef4286a9f0ad.js

js zmantov.co.il collected 2026-10-02 00:38:18 UTC 172,998 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1013],{71013:function(e,t,r){"use strict";r.d(t,{Z:function(){return Le}});var n=r(67294),s=r(25135),a=r(29703),i=r(57378),c=r(3945),l=r(41664),o=r(52091),u=r(7696),d=r(2777),p=r(61121),m=r(8704),x=r(19042),f=r(92809),v=r(10219),h=r(11163),g=r(85893),b=["children","activeClassName"];function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){(0,f.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(e){var t=e.children,r=(e.activeClassName,(0,v.Z)(e,b)),s=(0,h.useRouter)().asPath,a=n.Children.only(t),i=a.props.className||"",c=s===r.href||s===r.as?"bg-green-500 text-white ".concat(i).trim():i;return(0,g.jsx)(l.default,y(y({},r),{},{children:n.cloneElement(a,{className:c||null})}))},N=r(78633);var k=function(e){var t=e.href,r=e.icon,s=e.text,a=e.clickCallback,i=e.onClick,c=(0,h.useRouter)().asPath;return(0,n.useEffect)((function(){c===t&&a(s,r),c.indexOf("account/upgrade")>-1&&a("\u05de\u05d7\u05d9\u05e8\u05d9\u05dd \u05d5\u05d7\u05d1\u05d9\u05dc\u05d5\u05ea",(0,g.jsx)(x.QaE,{size:23}))}),[c,t,s]),(0,g.jsx)("li",{className:"cursor-pointer hover:bg-gray-100 rounded text-gray-900",onClick:function(){i&&i()},children:(0,g.jsx)(w,{activeClassName:"active",href:t||"",children:(0,g.jsxs)("a",{href:t||null,className:"flex items-center p-2 md:px-4 md:py-2.5 rounded-md lg:rounded-none focus:shadow-outline",children:[(0,g.jsx)("span",{className:"ml-4",children:r}),(0,g.jsx)("span",{className:"text-base",children:s})]})})})},Z=function(e){var t,r,n=e.setRouteTitle,s=e.user,a=function(e,t){n({title:e,icon:t})};return(0,g.jsxs)("ul",{className:"mt-1 md:mt-2 p-1 lg:p-0 text-gray-700",children:[(0,g.jsx)(k,{href:"/app/",icon:(0,g.jsx)(x.QaE,{size:22}),text:"\u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05d9",clickCallback:a}),(0,g.jsx)(k,{href:"/app/account/",icon:(0,g.jsx)(u.eNb,{size:22}),text:"\u05d4\u05d7\u05e9\u05d1\u05d5\u05df \u05e9\u05dc\u05d9",clickCallback:a}),(!(null!==s&&void 0!==s&&null!==(t=s.business)&&void 0!==t&&t.creditBoxToken)||!(null!==s&&void 0!==s&&null!==(r=s.business)&&void 0!==r&&r.invoiceToken))&&(0,g.jsx)("li",{className:"p-2 md:px-4 md:py-2.5 cursor-pointer hover:opacity-90 rounded bg-indigo-600 transition",children:(0,g.jsx)(l.default,{href:"https://land.zmantov.co.il/invoice-offer/",children:(0,g.jsxs)("a",{target:"_blank",className:"tracking-tight flex items-center text-white",children:[(0,g.jsx)(N.j$X,{size:22}),(0,g.jsxs)("span",{className:"mr-4 flex items-center",children:["\u05d7\u05e9\u05d1\u05d5\u05e0\u05d9\u05d5\u05ea \u05d5\u05e1\u05dc\u05d9\u05e7\u05d4",(0,g.jsx)("span",{className:"bg-white text-indigo-600 tracking-normal text-xs font-semibold mr-2 px-1.5 py-0.5 rounded",children:"\u05d7\u05d3\u05e9"})]})]})})}),(0,g.jsx)(k,{href:"/app/calendar/",icon:(0,g.jsx)(o.Pll,{size:22}),text:"\u05d9\u05d5\u05de\u05df \u05e2\u05d1\u05d5\u05d3\u05d4",clickCallback:a}),(0,g.jsx)(k,{href:"/app/availability/",icon:(0,g.jsx)(o.jst,{size:22}),text:"\u05d7\u05d5\u05e4\u05e9\u05d9\u05dd \u05d5\u05d4\u05e4\u05e1\u05e7\u05d5\u05ea",clickCallback:a}),(0,g.jsx)(k,{href:"/app/staff/",icon:(0,g.jsx)(u.DR0,{size:21}),text:"\u05d0\u05e0\u05e9\u05d9 \u05e6\u05d5\u05d5\u05ea",clickCallback:a}),(0,g.jsx)(k,{href:"/app/services/",icon:(0,g.jsx)(m.ceo,{size:22}),text:"\u05e9\u05d9\u05e8\u05d5\u05ea\u05d9\u05dd",clickCallback:a}),(0,g.jsx)(k,{href:"/app/customers/",icon:(0,g.jsx)(p.xa5,{size:22}),text:"\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea",clickCallback:a}),(0,g.jsx)(k,{href:"/app/marketing/",icon:(0,g.jsx)(x.h4y,{size:22}),text:"\u05e9\u05d9\u05d5\u05d5\u05e7",clickCallback:a}),(0,g.jsx)(k,{href:"/app/stats/",icon:(0,g.jsx)(x.m$,{size:22}),text:"\u05e1\u05d8\u05d8\u05d9\u05e1\u05d8\u05d9\u05e7\u05d4 \u05d5\u05d3\u05d5\u05d7\u05d5\u05ea",clickCallback:a}
1),(0,g.jsx)(k,{href:"/app/settings/",icon:(0,g.jsx)(d.nbt,{size:22}),text:"\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea",clickCallback:a}),(0,g.jsx)(k,{href:"/app/updates/",icon:(0,g.jsx)(u.LSj,{className:"-ml-1",size:24}),text:"\u05de\u05d4 \u05d7\u05d3\u05e9?",clickCallback:a}),(0,g.jsx)("li",{className:"p-2 md:px-4 md:py-2.5 cursor-pointer hover:bg-gray-100 rounded text-gray-900",children:(0,g.jsx)(l.default,{href:"https://zmantov.tawk.help/",children:(0,g.jsxs)("a",{target:"_blank",className:"tracking-tight flex items-center",children:[(0,g.jsx)(x.VKD,{size:22}),(0,g.jsx)("span",{className:"mr-4 flex items-center",children:"\u05e9\u05d0\u05dc\u05d5\u05ea \u05d5\u05de\u05d3\u05e8\u05d9\u05db\u05d9\u05dd"})]})})}),(0,g.jsx)("li",{className:"p-2 md:px-4 md:py-2.5 cursor-pointer hover:bg-gray-100 rounded text-gray-900",children:(0,g.jsx)(l.default,{href:"https://instagram.com/zmantov",children:(0,g.jsxs)("a",{target:"_blank",className:" tracking-tight flex items-center",children:[(0,g.jsx)(u.Adh,{size:22}),(0,g.jsx)("span",{className:"mr-4",children:"\u05e2\u05e7\u05d1\u05d5 \u05d0\u05d7\u05e8\u05d9\u05e0\u05d5 zmantov@"})]})})})]})},S=r(30266),P=r(809),C=r.n(P),A=r(51721),T=(r(25675),r(93181));var O=function(){var e=(0,n.useState)(""),t=e[0],r=e[1],a=(0,n.useState)(!1),i=a[0],c=a[1],l=(0,s.a)().user,o=function(){var e=(0,S.Z)(C().mark((function e(t){var n,s,a,i;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=t.target.files[0])){e.next=12;break}return c(!0),s=URL.createObjectURL(n),r(s),(a=new FormData).append("file",n),e.next=9,A.ZP.post("/api/business/updateLogo/",a,{headers:{"Content-Type":"image/jpg"}});case 9:i=e.sent,i.data,c(!1);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"bg-white px-4 py-5 text-center mx-auto w-56",children:[(0,g.jsx)("div",{className:"mb-4 ",children:i?(0,g.jsx)("div",{className:"w-50 h-48 mx-auto p-2 flex justify-center items-center",children:(0,g.jsx)(T.frZ,{className:"mx-auto animate-spin text-gray-400",size:70})}):(0,g.jsx)("img",{className:"w-56 h-48 mx-auto rounded-full object-cover object-center p-1 shadow border border-gray-200",src:t||(l.business&&l.business.details&&l.business.details.logo?"https://zmantov.fra1.digitaloceanspaces.com/logos/".concat(l.business.details.logo):"/img/business/store-placeholder.png"),alt:"Avatar Upload"})}),(0,g.jsxs)("label",{className:"cursor-pointer mt-6",children:[(0,g.jsxs)("span",{className:"mt-2 text-base leading-normal px-4 shadow flex justify-center font-semibold items-center py-3 bg-blue-500 hover:bg-blue-600 text-white text-sm rounded-md",children:[(0,g.jsx)("div",{className:"ml-2",children:"\u05d4\u05e2\u05dc\u05d0\u05ea \u05dc\u05d5\u05d2\u05d5"}),(0,g.jsx)(p.AM0,{})]}),(0,g.jsx)("input",{accept:"image/*",disabled:i,onChange:o,type:"file",className:"hidden"})]})]})})},D=r(96486),E=r.n(D);function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){(0,f.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=function(e){var t=e.setStep,r=(0,s.a)().user,i=(0,a.E)(),c=i.updateBusiness,l=i.loading,o=(0,n.use
1State)(E().get(r,"business.details",{})),u=o[0],d=o[1],p=function(e){e.persist();var t=e.target.value;d((function(r){return I(I({},r),{},(0,f.default)({},e.target.name,t))}))},m=function(){var e=(0,S.Z)(C().mark((function e(n){var s;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),s=r.businessId,u.phone||(u.phone=r.phone),u.wizardStep=3,console.log("businessDetails",u),e.next=7,c({businessId:s,details:u});case 7:e.sent,t(3);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"bg-white p-3 sm:p-6 shadow-sm border border-gray-200 rounded space-y-4 text-center",children:[(0,g.jsxs)("div",{className:"space-y-1 sm:max-w-sm mx-auto ",children:[(0,g.jsx)("h3",{className:"font-bold text-lg",children:"\u05e2\u05ea\u05d9\u05d3\u05d5\u05ea: \u05d4\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e9\u05dc\u05db\u05dd \u05d9\u05e2\u05d5\u05e4\u05d5 \u05e2\u05dc \u05d6\u05d4."}),(0,g.jsx)("p",{children:"\u05d9\u05e9 \u05dc\u05de\u05dc\u05d0 \u05d0\u05ea \u05db\u05dc \u05d4\u05e4\u05e8\u
105d8\u05d9\u05dd! \u05d0\u05e0\u05d5 \u05e0\u05e6\u05d9\u05d2 \u05d0\u05d5\u05ea\u05dd \u05dc\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05d1\u05d3\u05e3 \u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05db\u05dd. \u05dc\u05d0\u05d7\u05e8 \u05d4\u05e9\u05dc\u05de\u05ea \u05d4\u05ea\u05d4\u05dc\u05d9\u05da, \u05ea\u05e7\u05d1\u05dc\u05d5 \u05d2\u05d9\u05e9\u05d4 \u05dc\u05de\u05e2\u05e8\u05db\u05ea \u05d4\u05e0\u05d9\u05d4\u05d5\u05dc."})]}),(0,g.jsxs)("div",{className:"py-3 text-center mx-auto",children:[(0,g.jsx)(O,{}),(0,g.jsx)("p",{className:"text-xs font-medium text-blue-500",children:"\u05de\u05d5\u05de\u05dc\u05e5 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05dc\u05d5\u05d2\u05d5 \u05d0\u05d5 \u05ea\u05de\u05d5\u05e0\u05d4 \u05d4\u05de\u05ea\u05d0\u05e8\u05ea \u05d0\u05ea \u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05db\u05dd"})]}),(0,g.jsx)("hr",{}),(0,g.jsxs)("form",{name:"businessDetails",className:"space-y-6",onSubmit:m,children:[(0,g.jsxs)("div",{className:"form-control space-y-1",children:[(0,g.jsx)("label",{className:"label font-bold",children:(0,g.jsx)("span",{className:"label-text text-gray-800 md:text-base",children:"\u05e9\u05dd \u05d4\u05e2\u05e1\u05e7"})}),(0,g.jsx)("input",{type:"text",name:"name",value:u.name||"",onChange:p,required:!0,placeholder:"\u05dc\u05d3\u05d5\u05d2\u05de\u05d0: \u05de\u05e9\u05d4 \u05e2\u05d9\u05e6\u05d5\u05d1 \u05e9\u05d9\u05e2\u05e8",className:"border px-3 h-12"})]}),(0,g.jsxs)("div",{className:"form-control space-y-1",children:[(0,g.jsx)("label",{className:"label font-bold",children:(0,g.jsx)("span",{className:"label-text text-gray-800 md:text-base",children:"\u05e1\u05d5\u05d2 \u05d4\u05e2\u05e1\u05e7"})}),(0,g.jsxs)("select",{name:"type",onChange:p,value:u.type||"",required:!0,className:"select select-bordered  bg-white border border-gray-300 select-md w-full border px-3 h-12 bg-white font-normal",children:[(0,g.jsx)("option",{value:"",children:"\u05d1\u05d7\u05e8"}
1),(0,g.jsx)("option",{value:"\u05de\u05e1\u05e4\u05e8\u05d4",children:"\u05de\u05e1\u05e4\u05e8\u05d4"}),(0,g.jsx)("option",{value:"\u05de\u05e8\u05e4\u05d0\u05d4",children:"\u05de\u05e8\u05e4\u05d0\u05d4"}),(0,g.jsx)("option",{value:"\u05de\u05db\u05d5\u05df \u05d9\u05d5\u05e4\u05d9",children:"\u05de\u05db\u05d5\u05df \u05d9\u05d5\u05e4\u05d9"}),(0,g.jsx)("option",{value:"\u05d7\u05d3\u05e8 \u05d1\u05e8\u05d9\u05d7\u05d4",children:"\u05d7\u05d3\u05e8 \u05d1\u05e8\u05d9\u05d7\u05d4"}),(0,g.jsx)("option",{value:"\u05de\u05d5\u05e8\u05d9\u05dd \u05e4\u05e8\u05d8\u05d9\u05d9\u05dd",children:"\u05de\u05d5\u05e8\u05d9\u05dd \u05e4\u05e8\u05d8\u05d9\u05d9\u05dd"}),(0,g.jsx)("option",{value:"\u05de\u05d0\u05de\u05df \u05db\u05d5\u05e9\u05e8",children:"\u05de\u05d0\u05de\u05e0\u05d9 \u05db\u05d5\u05e9\u05e8"}),(0,g.jsx)("option",{value:"\u05d9\u05d5\u05e2\u05e6\u05d9\u05dd",children:"\u05d9\u05d5\u05e2\u05e6\u05d9\u05dd"}),(0,g.jsx)("option",{value:"\u05d0\u05d7\u05e8...",children:"\u05d0\u05d7\u05e8..."})]})]}),(0,g.jsxs)("div",{className:"form-control space-y-2",children:[(0,g.jsx)("label",{className:"label font-bold mb-0 pb-0",children:(0,g.jsx)("span",{className:"label-text md:text-base text-gray-800",children:"\u05db\u05de\u05d4 \u05de\u05d9\u05dc\u05d9\u05dd \u05e2\u05dc \u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05da"})}),(0,g.jsxs)("div",{className:"text-right pr-1 text-xs text-gray-500 pb-2",children:[(0,g.jsx)("div",{className:"",children:"\u05d6\u05d4 \u05d4\u05de\u05e7\u05d5\u05dd \u05dc\u05db\u05ea\u05d5\u05d1 \u05ea\u05d9\u05d0\u05d5\u05e8 \u05e7\u05e6\u05e8 \u05e2\u05dc \u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05db\u05dd, \u05d5\u05dc\u05de\u05d4 \u05db\u05d3\u05d0\u05d9 \u05dc\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05dc\u05d4\u05d2\u05d9\u05e2. \u05dc\u05d3\u05d5\u05d2\u05de\u05d0: \u05f4\u05de\u05d5\u05de\u05d7\u05d4 \u05dc\u05e2\u05d9\u05e6\u05d5\u05d1 \u05e9\u05d9\u05e2\u05e8 \u05dc\u05d2\u05d1\u05e8\u05d9\u05dd \u05d5\u05e0\u05e9\u05d9\u05dd, \u05e9\u05d9\u05e8\u05d5\u05ea\u05d9\u05d5\u05ea, \u05de\u05e7\u05e6\u05d5\u05e2\u05d9\u05d5\u05ea, \u05de\u05d7\u05d9\u05e8\u05d9\u05dd \u05e0\u05d5\u05d7\u05d9\u05dd \u05d5\u05d9\u05d7\u05e1 \u05d7\u05dd \u05dc\u05db\u05d5\u05dc\u05dd\u05f4"}),(0,g.jsx)("strong",{className:"text-gray-800",children:"\u05db\u05d0\u05df \u05dc\u05d0 \u05db\u05d5\u05ea\u05d1\u05d9\u05dd \u05e9\u05d9\u05e8\u05d5\u05ea\u05d9\u05dd \u05d5\u05de\u05d7\u05d9\u05e8\u05d9\u05dd :)"})]}),(0,g.jsx)("textarea",{name:"description",onChange:p,value:u.description||"",required:!0,placeholder:"\u05dc\u05d3\u05d5\u05d2\u05de\u05d0: \u05de\u05d5\u05de\u05d7\u05d9\u05dd \u05dc\u05e2\u05d9\u05e6\u05d5\u05d1 \u05e9\u05d9\u05e2\u05e8, \u05d4\u05d7\u05dc\u05e7\u05d5\u05ea, \u05ea\u05e1\u05e4\u05d5\u05e8\u05d5\u05ea \u05d5\u05e6\u05d1\u05e2. \u05de\u05d1\u05d8\u05d9\u05d7\u05d9\u05dd \u05de\u05e7\u05e6\u05d5\u05e2\u05d9\u05d5\u05ea \u05d5\u05d9\u05d7\u05e1 \u05d0\u05d9\u05e9\u05d9 \u05d5\u05d7\u05dd \u05dc\u05db\u05dc \u05dc\u05e7\u05d5\u05d7 \u05d5\u05dc\u05e7\u05d5\u05d7\u05d4.",className:"border text-sm bg-white h-20 leading-relaxed p-3"})]}),(0,g.jsxs)("div",{className:"form-control space-y-1",children:[(0,g.jsx)("label",{className:"label font-bold mb-0 pb-0",children:(0,g.jsx)("span",{className:"label-text md:text-base text-gray-800",children:"\u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05dc\u05d0\u05d4 \u05e9\u05dc \u05d4\u05e2\u05e1\u05e7"})}),(0,g.jsx)("p",{className:"text-right pr-1 text-xs text-gray-500 pb-2",children:"\u05d9\u05e9 \u05dc\u05d4\u05d6\u05d9\u05df \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05dc\u05d0\u05d4 \u05d4\u05db\u05d5\u05dc\u05dc\u05ea \u05e8\u05d7\u05d5\u05d1, \u05de\u05e1\u05f3 \u05d5\u05e2\u05d9\u05e8. \u05dc\u05d3\u05d5\u05d2\u05de\u05d0 \u05f4\u05de\u05e0\u05d7\u05dd \u05d1\u05d2\u05d9\u05df 120, \u05ea\u05dc \u05d0\u05d1\u05d9\u05d1\u05f4"}),(0,g.jsx)("input",{name:"address",onChange:p,value:u.address||"",required:!0,type:"text",placeholder:"\u05dc\u05d3\u05d5\u05d2\u05de\u05d0: \u05de\u05e0\u05d7\u05dd \u05d1\u05d2\u05d9\u05df 22, \u05ea\u05dc \u05d0\u05d1\u05d9\u05d1",className:"border px-3 h-12 bg-white"})]}),(0,g.jsxs)("div",{className:"form-control space-y-1 hidden",children:[(0,g.jsx)("label",{className:"label font-bold",children:(0,g.jsx)("span",{className:"label-text md:text-base text-gray-800",children:"\u05de\u05e1\u05f3 \u05d4\u05d8\u05dc\u05e4\u05d5\u05df \u05e9\u05dc\u05db\u05dd"})}),(0,g.jsx)("input",{required:!0,type:"text",pattern:"\\d*",name:"phone",onChange:p,value:u.phone||r.ph
1one,placeholder:"\u05d4\u05d6\u05df \u05d0\u05ea \u05de\u05e1\u05f3 \u05d4\u05d8\u05dc\u05e4\u05d5\u05df \u05e9\u05dc \u05d4\u05e2\u05e1\u05e7",className:"border px-3 h-12 bg-white"})]}),(0,g.jsx)("div",{className:"form-control pt-3",children:(0,g.jsx)("button",{type:"submit",disabled:l,className:"flex justify-center items-center disabled:opacity-50 text-center text-md h-12 w-full bg-green-500 text-white font-bold py-3 px-4  hover:border-green-500 rounded",children:l?(0,g.jsx)(T.frZ,{className:"mx-auto animate-spin",size:40}):(0,g.jsx)("span",{children:"\u05d4\u05de\u05e9\u05da \u05dc\u05d4\u05d2\u05d3\u05e8\u05ea \u05d6\u05de\u05e0\u05d9\u05dd"})})})]})]})})},M=r(23083),B=r(66480),L=r(17018);var F=function(e){var t=e.setStep,r=(0,s.a)().user,i=(0,a.E)(),c=i.updateBusiness,l=i.loading,o=(0,n.useState)((0,L.getTimeSettings)(r)),u=o[0],d=o[1],p=_.get(r,"business.details",{}),m=function(){var e=(0,S.Z)(C().mark((function e(n){var s;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),s=r.businessId,p.wizardStep=4,u.availability&&0!==u.availability.length||(u.availability=[{day:1,active:!0,startTime:"08:00",endTime:"17:00"},{day:2,active:!0,startTime:"08:00",endTime:"17:00"},{day:3,active:!0,startTime:"08:00",endTime:"17:00"},{day:4,active:!0,startTime:"08:00",endTime:"17:00"},{day:5,active:!0,startTime:"08:00",endTime:"17:00"},{day:6,active:!0,startTime:"08:00",endTime:"13:00"},{day:7,active:!1,startTime:"08:00",endTime:"17:00"}]),e.next=6,c({businessId:s,details:p,timeSettings:u});case 6:e.sent,d(u),t(4);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{className:"bg-white p-3 sm:p-6 shadow-sm border border-gray-200 rounded space-y-4 text-center",children:(0,g.jsxs)("form",{name:"businessDetails",className:"space-y-4",onSubmit:m,children:[(0,g.jsxs)("div",{className:"form-control text-right space-y-3",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"font-bold",children:(0,g.jsx)("div",{className:"label-text md:text-base text-gray-800",children:"\u05d9\u05de\u05d9 \u05d5\u05e9\u05e2\u05d5\u05ea \u05e4\u05e2\u05d9\u05dc\u05d5\u05ea \u05d4\u05e2\u05e1\u05e7"})}),(0,g.jsx)("p",{className:"text-sm md:text-sm",children:"\u05db\u05d0\u05df \u05ea\u05d5\u05db\u05dc\u05d5 \u05dc\u05d4\u05d2\u05d3\u05d9\u05e8 \u05d1\u05d0\u05d9\u05dc\u05d5 \u05d9\u05de\u05d9\u05dd \u05d5\u05e9\u05e2\u05d5\u05ea \u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05db\u05dd \u05d9\u05d4\u05d9\u05d4 \u05e4\u05ea\u05d5\u05d7, \u05d5\u05de\u05ea\u05d9 \u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05d9\u05d5\u05db\u05dc\u05d5 \u05dc\u05e7\u05d1\u05d5\u05e2 \u05ea\u05d5\u05e8."})]}),(0,g.jsx)(M.Z,{timeSettings:u,setTimeSettings:d})]}),(0,g.jsx)("p",{children:"\u05de\u05de\u05e9 \u05dc\u05d0\u05d7\u05e8 \u05e1\u05d9\u05d5\u05dd \u05ea\u05d4\u05dc\u05d9\u05da \u05d4\u05d4\u05d2\u05d3\u05e8\u05d4 \u05d4\u05e8\u05d0\u05e9\u05d5\u05e0\u05d9, \u05ea\u05d5\u05db\u05dc\u05d5 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d3\u05d1\u05e8\u05d9\u05dd \u05d4\u05e0\u05d5\u05d2\u05e2\u05d9\u05dd \u05dc\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea \u05d6\u05de\u05e0\u05d9\u05dd, \u05e7\u05d1\u05d9\u05e2\u05ea \u05ea\u05d5\u05e8\u05d9\u05dd, \u05d1\u05d9\u05d8\u05d5\u05dc\u05d9\u05dd \u05d5\u05db\u05d5\u05f3 \u05d1\u05de\u05e1\u05da \u05d4\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea."}),(0,g.jsx)("div",{className:"form-control text-right space-y-3 hidden",children:(0,g.jsx)(B.Z,{timeSettings:u,setTimeSettings:d})}),(0,g.jsxs)("div",{className:"form-control pt-3 flex flex-row align-center justify-between",children:[(0,g.jsx)("button",{onClick:function(){return t(2)},className:"bg-gray-400 hover:bg-gray-500 text-white font-bold py-3 px-4 hover:border-gray-500 rounded w-full ml-1",children:"\u05dc\u05e9\u05dc\u05d1 \u05d4\u05e7\u05d5\u05d3\u05dd"}),(0,g.jsx)("button",{type:"submit",disabled:l,className:"flex justify-center items-center disabled:opacity-50 whitespace-nowrap text-center text-md h-12 w-full bg-green-500 text-white font-bold py-3 px-4 hover:border-green-500 rounded",children:l?(0,g.jsx)(T.frZ,{className:"mx-auto animate-spin",size:40}):(0,g.jsx)("span",{children:"\u05d4\u05d1\u05d0: \u05e9\u05d9\u05e8\u
105d5\u05ea\u05d9 \u05d4\u05e2\u05e1\u05e7"})})]})]})})})},H=r(79056),G=r(1693),U=r(84823),q=r.n(U),Y=r(33406);var V=function(e){var t=e.setTheServices,r=(0,n.useState)(!0),i=r[0],c=r[1],l=(0,s.a)().user.businessId,o=(0,n.useState)(!1),d=o[0],p=o[1],m=(0,n.useState)([]),x=m[0],f=m[1],v=(0,a.E)(),h=v.getServices,b=v.deleteService,j=(0,n.useState)(""),y=(j[0],j[1],(0,n.useState)({})),w=y[0],N=y[1],k=(0,Y.Z)(),Z=(0,H.default)(k,2),P=Z[0],A=Z[1];(0,n.useEffect)((function(){d?P():A()}),[d]),(0,n.useEffect)((0,S.Z)(C().mark((function e(){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O();case 2:case"end":return e.stop()}}),e)}))),[]);var O=function(){var e=(0,S.Z)(C().mark((function e(){var r;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.next=3,h({businessId:l});case 3:(r=e.sent)&&r.data.services&&(f(r.data.services),t(r.data.services)),c(!1),p(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,g.jsxs)(g.Fragment,{children:[i?(0,g.jsx)(T.frZ,{className:"mx-auto animate-spin",size:50}):(0,g.jsx)(g.Fragment,{children:x&&x.length>0?(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsxs)("div",{className:"border",children:[(0,g.jsxs)("div",{className:"grid grid-cols-4 bg-gray-100 mb-1 font-medium",children:[(0,g.jsx)("div",{className:"h-8 flex items-center col-span-2 pr-2",children:"\u05e9\u05dd \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea"}),(0,g.jsx)("div",{className:"h-8 flex items-center  col-span-1",children:"\u05e2\u05dc\u05d5\u05ea"}),(0,g.jsx)("div",{className:"h-8 flex items-center justify-center col-span-1"})]}),(0,g.jsx)("div",{className:"space-y-6 text-sm p-2 pb-4",children:x.map((function(e){return(0,g.jsxs)("div",{className:"grid grid-cols-4 border- items-center flex",children:[(0,g.jsxs)("div",{className:"h-8 flex col-span-2 flex-col text-sm text-right",children:[(0,g.jsx)("div",{className:"text-gray-700 font-semibold",children:e.name}),(0,g.jsxs)("p",{className:"text-xs text-gray-500",children:["\u05de\u05e9\u05da: ",q().timeConvert(e.length)]})]}),(0,g.jsxs)("div",{className:"h-8 flex col-span-1 items-center text-right text-sm",children:[e.startingPrice&&"\u05d4\u05d7\u05dc \u05de-","\u20aa",e.price]}),(0,g.jsxs)("div",{className:"h-8 flex col-span-1 items-center justify-end text-sm",children:[(0,g.jsx)("label",{onClick:function(){return function(e){var r=x.filter((function(t){return t._id!==e}));b({businessId:l,serviceId:e}),f(r),t(r)}(e._id)},className:"cursor-pointer bg-white hover:bg-gray-100 text-gray-800 font-semibold py-1 px-2 border border-gray-400 rounded ml-1",children:(0,g.jsx)(u.GnT,{size:16})}),(0,g.jsx)("button",{onClick:function(){return function(e){N(e),p(!0)}(e)},className:"bg-white hover:bg-gray-100 text-gray-800 font-semibold py-1 px-2 border border-gray-400 rounded",children:(0,g.jsx)(u.HuK,{size:16})})]})]},e._id)}))})]}),(0,g.jsx)("div",{children:(0,g.jsxs)("button",{onClick:function(){N({}),p(!0)},className:"flex cursor-pointer w-full sm:w-44 items-center justify-center bg-blue-500 hover:bg-blue-400 text-white font-bold py-3 px-3 pl-4 hover:border-blue-500 rounded",children:[(0,g.jsx)(u.uGf,{size:22}),(0,g.jsx)("span",{className:"pr-1",children:"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e9\u05d9\u05e8\u05d5\u05ea"})]})})]}):(0,g.jsx)("div",{className:"p-5 border-dashed border-2",children:(0,g.jsxs)("button",{onClick:function(){N({}),p(!0)},className:"flex cursor-pointer mx-auto w-full sm:w-44 items-center justify-center bg-blue-500 hover:bg-blue-400 text-white font-bold py-3 px-3 pl-4 hover:border-blue-500 rounded",children:[(0,g.jsx)(u.uGf,{size:22}),(0,g.jsx)("span",{className:"pr-1",children:"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e9\u05d9\u05e8\u05d5\u05ea"})]})})}),(0,g.jsx)(G.Z,{callback:O,showModal:d,setShowModal:p,serviceToEdit:w})]})};var W=function(e){var t=e.setStep,r=((0,s.a)().user,(0,a.E)()),i=(r.updateBusiness,r.loading),c=(0,n.useState)([]),l=c[0],o=c[1];return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"bg-white p-3 sm:p-6 shadow-sm border border-gray-200 rounded space-y-6 text-center",children:[(0,g.jsxs)("div",{className:"space-y-1 sm:max-w-xl mx-auto tracking-tight text-sm",children:[(0,g.jsx)("h3",{className:"font-bold text-lg",children:"\u05d0\u05d9\u05dc\u05d5 \u05e9\u05d9\u05e8\u
105d5\u05ea\u05d9\u05dd \u05d0\u05ea\u05dd \u05de\u05e6\u05d9\u05e2\u05d9\u05dd?"}),(0,g.jsx)("div",{className:"bg-red-500 inline-block px-3 py-px text-white rounded ",children:"\u05d7\u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d3"}),(0,g.jsx)("p",{className:"pt-3",children:"\u05d4\u05d5\u05e1\u05d9\u05e4\u05d5 \u05d0\u05ea \u05e9\u05d9\u05e8\u05d5\u05ea\u05d9 \u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05db\u05dd."}),(0,g.jsxs)("p",{className:"pt-2",children:["\u05d9\u05e9 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05db\u05dc \u05e9\u05d9\u05e8\u05d5\u05ea \u05d1\u05e0\u05e4\u05e8\u05d3, \u05dc\u05d3\u05d5\u05d2\u05de\u05d0: ",(0,g.jsx)("strong",{className:"",children:"\u05ea\u05e1\u05e4\u05d5\u05e8\u05ea"}),", ",(0,g.jsx)("strong",{className:"",children:"\u05ea\u05e1\u05e4\u05d5\u05e8\u05ea + \u05d6\u05e7\u05df"}),", ",(0,g.jsx)("strong",{className:"",children:"\u05d4\u05d7\u05dc\u05e7\u05d4"}),". \u05dc\u05dc\u05d0 \u05d4\u05d5\u05e1\u05e4\u05ea \u05e9\u05d9\u05e8\u05d5\u05ea\u05d9\u05dd, \u05dc\u05e7\u05d5\u05d7\u05d5\u05ea ",(0,g.jsx)("span",{className:"font-bold underline text-red-600",children:"\u05dc\u05d0 \u05d9\u05d5\u05db\u05dc\u05d5"})," \u05dc\u05e7\u05d1\u05d5\u05e2 \u05ea\u05d5\u05e8."]}),(0,g.jsx)("p",{className:"pt-2",children:"\u05ea\u05d5\u05db\u05dc\u05d5 \u05dc\u05e2\u05e8\u05d5\u05da \u05d0\u05ea \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea\u05d9\u05dd \u05d1\u05db\u05dc \u05d6\u05de\u05df \u05dc\u05d0\u05d7\u05e8 \u05e1\u05d9\u05d5\u05dd \u05d4\u05ea\u05d4\u05dc\u05d9\u05da."})]}),(0,g.jsx)("div",{children:(0,g.jsx)(V,{setTheServices:o})}),(0,g.jsx)("div",{className:"space-y-4",children:(0,g.jsxs)("div",{className:"form-control pt-3 flex flex-row align-center justify-between",children:[(0,g.jsx)("button",{onClick:function(){return t(3)},className:"bg-gray-400 hover:bg-gray-500 text-white font-bold py-3 px-4  hover:border-gray-500 rounded w-full ml-1",children:"\u05dc\u05e9\u05dc\u05d1 \u05d4\u05e7\u05d5\u05d3\u05dd"}),(0,g.jsx)("button",{disabled:0===l.length||i,onClick:function(){t(5)},className:"flex justify-center items-center disabled:opacity-50 text-center text-md h-12 w-full bg-green-500 text-white font-bold py-3 px-4  hover:border-green-500 rounded",children:(0,g.jsx)("span",{children:"\u05d4\u05d1\u05d0"})})]})})]})})},K=(r(74855),r(97644));var $=function(e){var t=e.setStep,r=(0,h.useRouter)(),s=(0,i.Z)(),c=s.user,l=s.mutateUser,o=(0,n.useState)(!1),u=(o[0],o[1],(0,n.useState)(!1)),d=u[0],p=u[1],m=(0,a.E)().setWizardComplete;(0,n.useEffect)((0,S.Z)(C().mark((function e(){var t;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.businessId,e.next=3,m({businessId:t});case 3:return e.next=5,l();case 5:case"end":return e.stop()}}),e)}))),[]);var x=function(){var e=(0,S.Z)(C().mark((function e(){var n,s;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p(!0),n=c.businessId,e.next=4,m({businessId:n});case 4:if(s=e.sent,!s.data.success){e.next=13;break}return p(!1),t(6),e.next=11,l();case 11:return e.next=13,r.push("/app/");case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"bg-white p-3 sm:p-6 shadow-sm border border-gray-200 rounded space-y-6 text-center",children:[(0,g.jsxs)("div",{className:"space-y-2 sm:max-w-lg mx-auto text-center flex flex-col justify-center items-center",children:[(0,g.jsx)("div",{className:"text-5xl",children:(0,g.jsx)(K.Z,{symbol:"\ud83c\udf89",label:"confetti"})}),(0,g.jsx)("h3",{className:"font-bold text-lg pt-2",children:"\u05de\u05d3\u05d4\u05d9\u05dd!"}),(0,g.jsx)("p",{children:"\u05d4\u05d5\u05e1\u05e4\u05ea\u05dd \u05d0\u05ea \u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05db\u05dd \u05d1\u05d4\u05e6\u05dc\u05d7\u05d4."}),(0,g.jsx)("p",{className:"text-green-600 font-semibold",children:"\u05dc\u05d0\u05d7\u05e8 \u05dc\u05d7\u05d9\u05e6\u05d4 \u05e2\u05dc \u05db\u05e4\u05ea\u05d5\u05e8 \u05d4\u05d9\u05e8\u05d5\u05e7, \u05ea\u05d2\u05d9\u05e2\u05d5 \u05dc\u05de\u05e2\u05e8\u05db\u05ea \u05d4\u05e0\u05d9\u05d4\u05d5\u05dc \u05d3\u05e8\u05db\u05d4 \u05ea\u05d5\u05db\u05dc\u05d5 \u05dc\u05e8\u05d0\u05d5\u05ea \u05d0\u05ea \u05d9\u05d5\u05de\u05df \u05d4\u05e2\u05d1\u05d5\u05d3\u05d4 \u05e9\u05dc\u05db\u05dd, \u05dc\u05e9\u05e0\u05d5\u05ea \u05d4\u05d2\u05d3\u05e8\u
105d5\u05ea, \u05d5\u05dc\u05d4\u05ea\u05d7\u05d9\u05dc \u05dc\u05e7\u05d1\u05dc \u05dc\u05e7\u05d5\u05d7\u05d5\u05ea."}),(0,g.jsx)("p",{className:"text-gray-600",children:"\u05d0\u05e0\u05d7\u05e0\u05d5 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd \u05dc\u05db\u05dc \u05e9\u05d0\u05dc\u05d4 \u05d1\u05e2\u05de\u05d5\u05d3 \u05d4\u05d0\u05d9\u05e0\u05e1\u05d8\u05d2\u05e8\u05dd \u05e9\u05dc\u05e0\u05d5 \u05d5\u05d1\u05e6\u05f3\u05d0\u05d8 \u05d1\u05e4\u05d9\u05e0\u05d4 \u05d4\u05d9\u05de\u05e0\u05d9\u05ea \u05dc\u05de\u05d8\u05d4 :)"})]}),(0,g.jsx)("div",{className:"space-y-4",children:(0,g.jsxs)("div",{className:"form-control pt-3 flex flex-row align-center justify-between",children:[(0,g.jsx)("button",{disabled:d,onClick:function(){return t(4)},className:"bg-gray-400 hover:bg-gray-500 text-white font-bold py-3 px-4  hover:border-gray-500 rounded w-full ml-1",children:"\u05dc\u05e9\u05dc\u05d1 \u05d4\u05e7\u05d5\u05d3\u05dd"}),(0,g.jsx)("button",{disabled:d,onClick:function(){x()},className:"flex justify-center items-center disabled:opacity-50 text-center text-md h-12 w-full bg-green-500 text-white font-bold py-3 px-4  hover:border-green-500 rounded",children:d?(0,g.jsx)(T.frZ,{className:"mx-auto animate-spin",size:40}):(0,g.jsx)("span",{children:"\u05dc\u05de\u05e2\u05e8\u05db\u05ea \u05d4\u05e0\u05d9\u05d4\u05d5\u05dc"})})]})})]})})},Q=r(28472),X=r(30622),J=r(48166),ee=r.n(J);var te=function(e){var t,r,s=e.isTrial,c=e.willReachLimit,o=e.hasDebt,u=(0,i.Z)().user,d=(0,a.E)().getDebtDetails,p=(0,n.use
1State)(null),m=p[0],x=p[1],f="/app/account/";if(s){f+="upgrade",r="\u05e8\u05db\u05d9\u05e9\u05ea \u05de\u05e0\u05d5\u05d9";var v=(0,X.dateByAddingDays)(u.business.onboardingComplete,30),h=(0,X.daysBetween)(v,new Date);t=1===h?"\u05e0\u05d5\u05ea\u05e8 \u05d9\u05d5\u05dd \u05dc\u05e1\u05d9\u05d5\u05dd \u05d4\u05e0\u05d9\u05e1\u05d9\u05d5\u05df, \u05e8\u05db\u05e9\u05d5 \u05de\u05e0\u05d5\u05d9 \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d4\u05de\u05e9\u05d9\u05da \u05dc\u05d4\u05e0\u05d5\u05ea \u05de\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e9\u05dc\u05d0 \u05de\u05ea\u05e7\u05e9\u05e8\u05d9\u05dd \u05dc\u05e7\u05d1\u05d5\u05e2 \u05ea\u05d5\u05e8\u05d9\u05dd :)":"\u05e0\u05d5\u05ea\u05e8\u05d5 \u05e2\u05d5\u05d3 ".concat(h," \u05d9\u05de\u05d9\u05dd \u05dc\u05e1\u05d9\u05d5\u05dd \u05d4\u05e0\u05d9\u05e1\u05d9\u05d5\u05df, \u05e8\u05db\u05e9\u05d5 \u05de\u05e0\u05d5\u05d9 \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d4\u05de\u05e9\u05d9\u05da \u05dc\u05d4\u05e0\u05d5\u05ea \u05de\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e9\u05dc\u05d0 \u05de\u05ea\u05e7\u05e9\u05e8\u05d9\u05dd \u05dc\u05e7\u05d1\u05d5\u05e2 \u05ea\u05d5\u05e8\u05d9\u05dd :)")}else c?(t="\u05d0\u05ea\u05dd \u05d1\u05d3\u05e8\u05da \u05dc\u05e0\u05d9\u05e6\u05d5\u05dc \u05de\u05e7\u05e1\u05d9\u05de\u05dc\u05d9 \u05e9\u05dc \u05d4\u05ea\u05d5\u05db\u05e0\u05d9\u05ea \u05d4\u05d7\u05d5\u05d3\u05e9\u05d9\u05ea \u05e9\u05dc\u05db\u05dd.",r="\u05d4\u05d7\u05e9\u05d1\u05d5\u05df \u05e9\u05dc\u05d9"):o&&(!function(){b.apply(this,arguments)}(),f+="upgrade/#upgrade-options",r="\u05dc\u05d1\u05d7\u05d9\u05e8\u05ea \u05de\u05e0\u05d5\u05d9",t="\u05d1\u05d7\u05e9\u05d1\u05d5\u05e0\u05da \u05e7\u05d9\u05d9\u05dd \u05d7\u05d5\u05d1 \u05e9\u05dc ".concat(m,' \u05e9"\u05d7. \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d7\u05d6\u05d5\u05e8 \u05dc\u05e2\u05d1\u05d5\u05d3\u05d4 \u05e8\u05e6\u05d9\u05e4\u05d4 \u05d9\u05e9 \u05dc\u05d4\u05e1\u05d3\u05d9\u05e8 \u05d0\u05ea \u05d4\u05ea\u05e9\u05dc\u05d5\u05dd.'));function b(){return(b=(0,S.Z)(C().mark((function e(){var t,r,n;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d();case 2:r=e.sent,n=(null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.upcomingCharges.total)||ee()[u.business.subscription.plan].price,x(n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return s||c||o&&m?(0,g.jsxs)("div",{className:"flex justify-between items-center bg-red-50 border-r-4 border-red-500 text-red-600 p-3 py-2 -mt-2 mb-3 md:-mt-3 md:mb-5 border-r-4 rounded ".concat((c||o)&&"bg-red-50 border-red-500 text-red-600"," ").concat(s&&"bg-blue-50 border-blue-500 text-blue-600"),role:"alert",children:[(0,g.jsxs)("div",{className:"tracking-tight md:text-base w-full",children:[(0,g.jsxs)("strong",{className:"animate-pulse font-bold pl-1 flex items-center",children:[(0,g.jsx)(Q.eEn,{size:18}),(0,g.jsx)("span",{className:"pr-1",children:"\u05e9\u05d9\u05de\u05d5 \u05dc\u05d1"})]}),(0,g.jsx)("span",{className:"block sm:inline text-sm md:text-base tracking-tight",children:t})]}),(0,g.jsx)("div",{className:"flex w-36 justify-end",children:(0,g.jsx)(l.default,{href:f,scroll:!o,children:(0,g.jsx)("a",{className:"hover:opacity-90 shadow border text-white text-sm md:text-base font-medium p-1 px-1.5 py-1.5 rounded ".concat((c||o)&&"bg-red-500 border-red-500"," ").concat(s&&"bg-blue-500 border-blue-500"),children:r})})})]}):(0,g.jsx)("div",{})},re=r(80008),ne=r.n(re);var se=function(e){var t,r,a,i,c,l=e.children,o=e.wizardStep,u=(0,s.a)().user,d=o||E().get(u,"business.details.wizardStep",2),p=(0,n.useState)(d),m=p[0],x=p[1],f=(0,h.useRouter)();(0,n.useEffect)((function(){x(E().get(u,"business.details.wizardStep",2)),f.query.oauth||window.scrollTo(0,0)}),[f.query]);var v=(null===u||void 0===u||null===(t=u.billing)||void 0===t?void 0:t.subscription.isTrial)&&!(null!==u&&void 0!==u&&null!==(r=u.business)&&void 0!==r&&r.subscription)&&ne()(null===(a=u.business)||void 0===a?void 0:a.onboardingComplete).add(10,"days")<ne()()||!1,b=((null===u||void 0===u?void 0:u.billing)||!1).willReachLimit,j=null===u||void 0===u||null===(i=u.billing)||void 0===i||null===(c=i.subscription)||void 0===c?void 0:c.hasDebt;return(0,g.jsxs)(g.Fragment,{children:[m<6&&(0,g.jsx)("div",{className:"max-w-3xl p-1 md:p-4 min-h-full mx-auto",children:(0,g.jsxs)("div",{className:"m-1 md:m-5 space-y-3",children:[(0,g.jsxs)("div",{className:"mt-2 grid grid-cols-4 text-xs sm:text-base divide-x divide-x-reverse text-center divide-gray-300 border rounded bg-gray-50",children:[(0,g.jsx)("div",{className:"p-2 px-0 ".concat(2===m?"bg-gray-200 text-gray-800 font-medium":"text-gray-400"),children:"1. \u05e4\u05e8\u
105d8\u05d9 \u05d4\u05e2\u05e1\u05e7"}),(0,g.jsx)("div",{className:"p-2 px-0 ".concat(3===m?"bg-gray-200 text-gray-800 font-medium":"text-gray-400"),children:"2. \u05d6\u05de\u05e0\u05d9\u05dd"}),(0,g.jsx)("div",{className:"p-2 px-0 ".concat(4===m?"bg-gray-200 text-gray-800 font-medium":"text-gray-400"),children:"3. \u05e9\u05d9\u05e8\u05d5\u05ea\u05d9\u05dd"}),(0,g.jsx)("div",{className:"p-2 px-0 ".concat(5===m?"bg-gray-200 text-gray-800 font-medium":"text-gray-400"),children:"4. \u05e1\u05d9\u05d5\u05dd"})]}),2===m&&(0,g.jsx)(R,{setStep:x}),3===m&&(0,g.jsx)(F,{setStep:x}),4===m&&(0,g.jsx)(W,{setStep:x}),5===m&&(0,g.jsx)($,{setStep:x})]})}),(0,g.jsxs)("div",{className:"max-w-5xl p-3 md:p-4 mx-auto overflow-hidden",children:[v&&(0,g.jsx)(te,{isTrial:v}),b&&(0,g.jsx)(te,{willReachLimit:b}),j&&(0,g.jsx)(te,{hasDebt:j}),6===m&&l]})]})},ae=r(3132),ie=r(30080),ce=r(97131),le=r(904),oe=r(93170),ue=r(20107),de=r(53254),pe=de.notificationTypes.NEW_APPOINTMENT,me=de.notificationTypes.NEW_MANUAL_APPOINTMENT,xe=de.notificationTypes.NEW_CUSTOMER,fe=de.notificationTypes.CANCELLED,ve=de.notificationTypes.CUSTOMER_REGISTERED_FOR_GROUP,he=de.notificationTypes.CUSTOMER_CANCELLED_GROUP_REGISTRATION,ge=(0,ue.Z)(oe.Z);var be=function(e){var t=e.event;return(0,g.jsx)("div",{className:"relative overflow-hidden",children:(0,g.jsxs)("div",{className:"flex items-center w-full ",children:[(0,g.jsxs)("div",{className:"order-1 bg-white w-auto text-xs space-y-1 py-3",children:[(0,g.jsxs)("div",{className:"space-x-1 space-x-reverse",children:[(0,g.jsx)(K.Z,{symbol:"\ud83c\udf89",label:"confetti"}),(0,g.jsx)("span",{className:"bg-yellow-100 py-px p-1 font-medium rounded text-yellow-600",children:"\u05dc\u05e7\u05d5\u05d7 \u05d7\u05d3\u05e9"})]}),(0,g.jsxs)("div",{className:"text-xs text-gray-900 text-opacity-100 space-x-1 space-x-reverse",children:[(0,g.jsx)("span",{children:t.data.firstName+" "+t.data.lastName}),(0,g.jsx)("span",{children:"male"===t.data.gender?"\u05d4\u05e6\u05d8\u05e8\u05e3 \u05db\u05dc\u05e7\u05d5\u05d7 \u05dc\u05e2\u05e1\u05e7 \u05e9\u05dc\u05da":"female"===t.data.gender?"\u05d4\u05e6\u05d8\u05e8\u05e4\u05d4 \u05db\u05dc\u05e7\u05d5\u05d7\u05d4 \u05dc\u05e2\u05e1\u05e7 \u05e9\u05dc\u05da":"\u05d4\u05e6\u05d8\u05e8\u05e3/\u05d4 \u05db\u05dc\u05e7\u05d5\u05d7/\u05d4 \u05dc\u05e2\u05e1\u05e7 \u05e9\u05dc\u05da"})]}),(0,g.jsx)("div",{style:{fontSize:"0.65rem"},className:"font-medium text-blue-900 leading-none pt-1",children:(0,g.jsx)(le.Z,{date:t.createdAt,formatter:ge,minPeriod:15})})]}),(0,g.jsx)("div",{className:"z-20 text-center flex justify-center items-center flex-col px-4",children:(0,g.jsx)("div",{className:"text-gray-600 rounded-full flex items-center justify-center",children:(0,g.jsx)(p.cHT,{size:30})})})]})})},je=function(e){var t=e.event;return(0,g.jsx)("div",{className:"relative overflow-hidden",children:(0,g.jsxs)("div",{className:"flex items-center w-full",children:[(0,g.jsxs)("div",{className:"order-1 bg-white w-auto text-xs space-y-1 py-3",children:[(0,g.jsxs)("div",{className:"text-xs text-gray-900 text-opacity-100 space-x-1 space-x-reverse",children:[t.data.isManual?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("span",{children:["\u05e7\u05d1\u05e2\u05ea\u05dd \u05ea\u05d5\u05e8 \u05e2\u05d1\u05d5\u05e8 ",_.get(t.customerDetails[0],"firstName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")+" "+_.get(t.customerDetails[0],"lastName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")]})})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{children:_.get(t.customerDetails[0],"firstName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")+" "+_.get(t.customerDetails[0],"lastName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")}),(0,g.jsxs)("span",{children:["male"===_.get(t.customerDetails[0],"gender","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")?"\u05e7\u05d1\u05e2":"female"===_.get(t.customerDetails[0],"gender","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")?"\u05e7\u05d1\u05e2\u05d4":"\u05e7\u05d1\u05e2/\u05d4"," \u05ea\u05d5\u05e8"]})]}),(0,g.jsxs)("span",{children:["\u05dc",_.get(t.serviceDetails[0],"name","(\u05e9\u05d9\u05e8\u05d5\u05ea \u05e0\u05de\u05d7\u05e7)")]})]}),(0,g.jsx)("div",{children:(0,g.jsxs)("span",{className:"text-gray-500",children:["\u05d9\u05d5\u05dd ",ne()(t.data.date).format("dddd, L \u05d1\u05e9\u05e2\u05d4 HH:mm")]})}),(0,g.jsx)("div",{style:{fontSize:"0.65rem"},className:"font-medium text-blue-900 leading-none pt-1",children:(0,g.jsx)(le.Z,{date:t.createdAt,formatter:ge,minPeriod:15})})]}),(0,g.jsx)("div",{className:"z-20 text-center flex justify-center items-center flex-col px-4",children:(0,g.jsx)("div",{className:"text-green-500 rounded-full flex items-center justify-center",children:(0,g.jsx)(p.n8v,{size:30})})})]})})},ye=function(e){var t=e.event;return(0,g.jsx)("div",{className:"relative overflow-hidden",children:(0,g.jsxs)("div",{className:"flex items-center w-full",children:[(0,g.jsxs)("div",{className:"order-1 bg-white w-auto text-xs space-y-1 py-3",children:[(0,g.jsxs)("div",{className:"text-xs text-gray-900 text-opacity-100 space-x-1 space-x-reverse",children:[(0,g.jsxs)("span",{children:["\u05d1\u05d5\u05d8\u05dc \u05d4\u05ea\u05d5\u05e8 \u05e9\u05dc ",_.get(t.customerDetails[0],"firstName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")+" "+_.get(t.customerDetails[0],"lastName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")]}),(0,g.jsxs)("span",{children:["\u05dc",_.get(t.serviceDetails[0],"name","(\u05e9\u05d9\u05e8\u
105d5\u05ea \u05e0\u05de\u05d7\u05e7)")]})]}),(0,g.jsx)("div",{children:(0,g.jsxs)("span",{className:"text-gray-500",children:["\u05d9\u05d5\u05dd ",ne()(t.data.date).format("dddd, L \u05d1\u05e9\u05e2\u05d4 HH:mm")]})}),(0,g.jsx)("div",{style:{fontSize:"0.65rem"},className:"font-medium text-blue-900 leading-none pt-1",children:(0,g.jsx)(le.Z,{date:t.createdAt,formatter:ge,minPeriod:15})})]}),(0,g.jsx)("div",{className:"z-20 text-center flex justify-center items-center flex-col px-4",children:(0,g.jsx)("div",{className:"text-red-500 rounded-full flex items-center justify-center",children:(0,g.jsx)(p.z4r,{size:30})})})]})})};function we(e){var t=e.event;return(0,g.jsx)("div",{className:"relative overflow-hidden",children:(0,g.jsxs)("div",{className:"flex items-center w-full",children:[(0,g.jsxs)("div",{className:"order-1 bg-white w-auto text-xs space-y-1 py-3",children:[(0,g.jsxs)("div",{className:"text-xs text-gray-900 text-opacity-100 space-x-1 space-x-reverse",children:[(0,g.jsx)("span",{children:_.get(t.customerDetails[0],"firstName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")+" "+_.get(t.customerDetails[0],"lastName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")}),(0,g.jsxs)("span",{children:["male"===_.get(t.customerDetails[0],"gender","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")?"\u05e0\u05e8\u05e9\u05dd":"female"===_.get(t.customerDetails[0],"gender","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")?"\u05e0\u05e8\u05e9\u05de\u05d4":"\u05e0\u05e8\u05e9\u05dd/\u05d4"," \u05dc",_.get(t.group[0],"groupName","\u05e9\u05d9\u05e2\u05d5\u05e8 \u05dc\u05dc\u05d0 \u05e9\u05dd")]})]}),(0,g.jsx)("div",{children:(0,g.jsxs)("span",{className:"text-gray-500",children:["\u05d9\u05d5\u05dd ",ne()(t.group[0].date).format("dddd, L")," \u05d1\u05e9\u05e2\u05d4 ",t.group[0].startTime]})}),(0,g.jsx)("div",{style:{fontSize:"0.65rem"},className:"font-medium  text-blue-900 leading-none pt-1",children:(0,g.jsx)(le.Z,{date:t.createdAt,formatter:ge,minPeriod:15})})]}),(0,g.jsx)("div",{className:"z-20 text-center flex justify-center items-center flex-col px-4",children:(0,g.jsx)("div",{className:"text-green-500 rounded-full flex items-center justify-center",children:(0,g.jsx)(p.p$$,{size:30})})})]})})}function Ne(e){var t=e.event;return(0,g.jsx)("div",{className:"relative overflow-hidden",children:(0,g.jsxs)("div",{className:"flex items-center w-full",children:[(0,g.jsxs)("div",{className:"order-1 bg-white w-auto text-xs space-y-1 py-3",children:[(0,g.jsxs)("div",{className:"text-xs text-gray-900 text-opacity-100 space-x-1 space-x-reverse",children:[(0,g.jsx)("span",{children:_.get(t.customerDetails[0],"firstName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")+" "+_.get(t.customerDetails[0],"lastName","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")}),(0,g.jsxs)("span",{children:["male"===_.get(t.customerDetails[0],"gender","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")?"\u05d1\u05d9\u05d8\u05dc":"female"===_.get(t.customerDetails[0],"gender","\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd")?"\u05d1\u05d9\u05d8\u05dc\u05d4":"\u05d1\u05d9\u05d8\u05dc/\u05d4"," \u05d0\u05ea \u05d4\u05d4\u05e8\u05e9\u05de\u05d4 \u05dc",_.get(t.group[0],"groupName","\u05e9\u05d9\u05e2\u05d5\u05e8 \u05dc\u05dc\u05d0 \u05e9\u05dd")]})]}),(0,g.jsx)("div",{children:(0,g.jsxs)("span",{className:"text-gray-500",children:["\u05d9\u05d5\u05dd ",ne()(t.group[0].date).format("dddd, L")," \u05d1\u05e9\u05e2\u05d4 ",t.group[0].startTime]})}),(0,g.jsx)("div",{style:{fontSize:"0.65rem"},className:"font-medium text-blue-900 leading-none pt-1",children:(0,g.jsx)(le.Z,{date:t.createdAt,formatter:ge,minPeriod:15})})]}),(0,g.jsx)("div",{className:"z-20 text-center flex justify-center items-center flex-col px-4",children:(0,g.jsx)("div",{className:"text-red-500 rounded-full flex items-center justify-center",children:(0,g.jsx)(p.N__,{size:30})})})]})})}var ke=function(e){var t=e.event;return(0,g.jsxs)(g.Fragment,{children:[(t.type===pe||t.type===me)&&(0,g.jsx)(je,{event:t}),t.type===xe&&(0,g.jsx)(be,{event:t}),t.type===fe&&(0,g.jsx)(ye,{event:t}),t.type===ve&&(0,g.jsx)(we,{event:t}),t.type===he&&(0,g.jsx)(Ne,{event:t})]})},Ze=r(20958),Se=r(49346),Pe=r(79977),Ce=function(e,t,r,n){return t&&!t.length?null:"".concat(r,"?limit=").concat(n,"&page=").concat(e+1)};var Ae=function(e){var t,r,s,i=e.toggle,c=(0,a.E)().getEventsFeed,l=(0,n.useRef)(),o=(0,Se.Z)(l),u=(0,Ze.ZP)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ce.apply(void 0,t.concat(["/events/",5]))}),c),d=u.data,p=u.error,m=u.size,x=u.setSize,f=u.isValidating,v=d?(t=[]).concat.apply(t,(0,ce.Z)(d)):[],h=!d&&!p||m>0&&d&&"undefined"===typeof d[m-1],b=0===(null===d||void 0===d||null===(r=d[0])||void 0===r?void 0:r.length),j=b||d&&(null===(s=d[d.length-1])||void 0===s?void 0:s.length)<5,y=f&&d&&d.length===m;return(0,n.useEffect)((function(){!o||j||y||x(m+1)}),[o,y]),(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"bg-white mx-auto w-full h-full divide-y sm:rounded-md overflow-y-auto sm:max-h-64 pt-14 sm:pt-0",children:[(0,g.jsxs)("div",{className:"font-medium bg-gray-100 fixed sm:sticky w-full top-0 sm:-mt-1 p-1 pr-4 z-40 border-b border-gray-200 flex items-center justify-between",children:[(0,g.jsx)("div",{className:"text-lg sm:text-base",children:"\u05e2\u05d3\u05db\u05d5\u05e0\u05d9\u05dd \u05d5\u05d4\u05ea\u05e8\u05d0\u05d5\u05ea"}),(0,g.jsx)("button",{className:"font-extrabold text-gray-700 sm:text-xl hover:bg-gray-200 p-3 sm:p-2 rounded text-2xl",onClick:i,children:(0,g.jsx)(ae.nfZ,{})})]}),v&&v.length>0&&v.map((function(e){return(0,g.jsx)(ke,{event:e},e._id)})),(0,g.jsxs)("div",{ref:l,children:[b&&(0,g.jsx)("div",{className:"text-center font-medium text-gray-400 p-3",children:"\u05d0\u05d9\u05df \u05d0\u05d9\u05e8\u
105d5\u05e2\u05d9\u05dd \u05dc\u05d4\u05e6\u05d2\u05d4"}),h&&!b&&(0,g.jsx)(Pe.Z,{}),j&&!b&&(0,g.jsx)("div",{className:"text-center font-medium text-gray-400 p-4 py-6",children:"\u05d0\u05d9\u05df \u05e2\u05d5\u05d3 \u05d0\u05d9\u05e8\u05d5\u05e2\u05d9\u05dd \u05dc\u05d4\u05e6\u05d2\u05d4"})]})]})})})};var Te=function(){var e=(0,n.useState)(!1),t=e[0],r=e[1],s=(0,Y.Z)(),a=(0,H.default)(s,2),i=a[0],c=a[1],l=function(e){e.preventDefault(),t?c():i(),r(!t)};return(0,g.jsxs)("div",{className:"relative",children:[(0,g.jsx)("button",{className:"z-50 block text-2xl flex items-center rounded-md bg-white hover:bg-gray-100 focus:bg-gray-100 p-2 lg:p-3 text-gray-600 focus:outline-none",onClick:l,children:(0,g.jsx)(o.Ivv,{})}),t&&(0,g.jsx)("div",{className:"fixed inset-0 h-full w-full z-10",onClick:l}),t&&(0,g.jsx)("div",{className:"fixed top-0 sm:top-auto sm:absolute w-full h-full sm:h-auto sm:w-96 left-0 sm:mt-1 bg-white sm:rounded-md border shadow-lg overflow-hidden z-20",children:(0,g.jsx)(Ae,{toggle:l})})]})},Oe=r(4298),De=r(55451),Ee=r(28133),ze=r(28739);var _e=function(e){var t,r=e.appointment,s=e.setAppointments,i=e.loadAppointments,c=e.user,l=(0,n.useState)(!1),o=l[0],u=l[1],d=(0,n.useState)(!1),p=d[0],m=d[1],x=(0,a.E)().updateBusinessApprovalStatus,f=r.serviceProvider,v=r.customer,h=r.service;function b(e){return j.apply(this,arguments)}function j(){return(j=(0,S.Z)(C().mark((function e(t){var n,a;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=t?u:m)(!0),e.prev=2,e.next=5,x({appointmentId:r._id,shouldApprove:t});case 5:s((function(e){return e.filter((function(e){return e._id!==r._id}))})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),400===(null===(a=e.t0.response)||void 0===a?void 0:a.status)?(ze.Am.error("\u05d4\u05ea\u05d5\u05e8 \u05db\u05d1\u05e8 \u05d8\u05d5\u05e4\u05dc \u05d5\u05d0\u05d9\u05e0\u05d5 \u05d1\u05de\u05e6\u05d1 \u05d4\u05de\u05ea\u05e0\u05d4"),i()):ze.Am.error("\u05dc\u05d0 \u05d4\u05e6\u05dc\u05d7\u05e0\u05d5 ".concat(t?"\u05dc\u05d0\u05e9\u05e8":"\u05dc\u05d3\u05d7\u05d5\u05ea"," \u05d0\u05ea \u05d4\u05ea\u05d5\u05e8, \u05e0\u05e1\u05d5 \u05e9\u05e0\u05d9\u05ea \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4"));case 11:n(!1);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}return(0,g.jsx)("div",{className:"relative overflow-hidden",children:(0,g.jsx)("div",{className:"flex items-center w-full",children:(0,g.jsxs)("div",{className:"order-1 bg-white w-auto text-xs space-y-1 p-3",children:[(0,g.jsxs)("div",{className:"text-xs text-gray-900 text-opacity-100 space-x-1 space-x-reverse mb-2",children:[v.firstName," ",v.lastName," \u05e7\u05d1\u05e2 \u05ea\u05d5\u05e8 \u05dc",h.name," \u05d1\u05d9\u05d5\u05dd ",ne()(r.date).format("dddd, LL \u05d1\u05e9\u05e2\u05d4 HH:mm")," ",(null===c||void 0===c||null===(t=c.serviceProviders)||void 0===t?void 0:t.length)>1&&"\u05d0\u05e6\u05dc ".concat(f.firstName," ").concat(f.lastName)]}),(0,g.jsx)("div",{}),(0,g.jsxs)("div",{className:"flex gap-2 my-2 w-3/4",style:{maxWidth:"240px"},children:[(0,g.jsx)("button",{onClick:function(e){return b(!0)},disabled:o||p,className:"border text-sm h-7 flex-1 border-green-500 text-green-500 p-2 hover:text-green-600 hover:border-green-600 hover:bg-green-50 rounded w-full flex justify-center items-center ease-in-out w-1/2",children:(0,g.jsx)(Ee.Z,{size:20,spin:o,children:"\u05d0\u05e9\u05e8"})}),(0,g.jsx)("button",{onClick:function(e){return b(!1)},disabled:o||p,className:"border text-sm h-7 flex-1 border-red-500 text-red-500 p-2 hover:text-red-600 hover:border-red-600 hover:bg-red-50 rounded flex justify-center items-center ease-in-out w-1/2",children:(0,g.jsx)(Ee.Z,{size:20,spin:p,children:"\u05d3\u05d7\u05d4"})})]})]})})})},Ie=r(37094);var Re=function(e){var t=e.toggle,r=e.appointments,n=e.loading,s=e.hasError,a=e.setAppointments,c=e.loadAppointments,l=(0,i.Z)().user;return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"bg-white mx-auto w-full h-full divide-y sm:rounded-md overflow-y-auto sm:max-h-64 pt-14 sm:pt-0",children:[(0,g.jsxs)("div",{className:"font-medium bg-gray-100 fixed sm:sticky w-full top-0 sm:-mt-1 p-1 pr-4 z-40 border-b border-gray-200 flex items-center justify-between",children:[(0,g.jsx)("div",{className:"text-lg sm:text-base",children:"\u05d1\u05d4\u05de\u05ea\u05e0\u05d4 \u05dc\u05d0\u05d9\u05e9\u05d5\u05e8"}),(0,g.jsx)("button",{className:"font-extrabold text-gray-700 sm:text-xl hover:bg-gray-200 p-3 sm:p-2 rounded text-2xl",onClick:t,children:(0,g.jsx)(ae.nfZ,{})})]}),(null===r||void 0===r?void 0:r.length)>0&&!s&&!n&&r.map((function(e){return(0,g.jsx)(_e,{appointment:e,setAppointments:a,loadAppointments:c,user:l},e._id)})),(0,g.jsxs)("div",{children:[!n&&!r.length&&!s&&(0,g.jsx)("div",{className:"text-center font-medium text-gray-400 p-3",children:"\u05d0\u05d9\u05df \u05ea\u05d5\u05e8\u05d9\u05dd \u05e9\u05de\u05de\u05ea\u05d9\u05e0\u05d9\u05dd \u05dc\u05d0\u05d9\u05e9\u05d5\u05e8"}),s&&!n&&(0,g.jsxs)("div",{className:"text-center text-gray-800 p-3 flex items-center",children:[(0,g.jsx)(Ie.abH,{className:"text-red-600 my-1 ml-1",size:25}
1),"\u05d0\u05d9\u05e8\u05e2\u05d4 \u05e9\u05d2\u05d9\u05d0\u05d4 \u05d1\u05d4\u05e6\u05d2\u05ea \u05ea\u05d5\u05e8\u05d9\u05dd \u05e9\u05de\u05de\u05ea\u05d9\u05e0\u05d9\u05dd \u05dc\u05d0\u05d9\u05e9\u05d5\u05e8"]}),n&&(0,g.jsx)(Pe.Z,{})]})]})})})};var Me=function(){var e=(0,n.useState)(!1),t=e[0],r=e[1],s=(0,Y.Z)(),i=(0,H.default)(s,2),c=i[0],l=i[1],o=(0,a.E)().getPendingAppointments,u=(0,n.useState)(!1),d=u[0],p=u[1],m=(0,n.useState)([]),x=m[0],f=m[1],v=(0,n.useState)(!1),h=v[0],b=v[1],j=function(e){e.preventDefault(),t?l():c(),t||y(),r(!t)};function y(){return w.apply(this,arguments)}function w(){return(w=(0,S.Z)(C().mark((function e(){var t;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,e.next=4,o();case 4:t=e.sent,f(t),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),p(!0);case 11:b(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}return(0,n.useEffect)((function(){y()}),[]),(0,g.jsxs)("div",{className:"relative",children:[(0,g.jsxs)("button",{onClick:j,className:"z-50 block text-2xl flex items-center rounded-md bg-white hover:bg-gray-100 focus:bg-gray-100 p-2 lg:p-3 text-gray-600 focus:outline-none",children:[(0,g.jsx)(De.jWx,{}),x.length>0&&(0,g.jsx)("div",{className:"text-white bg-red-500 absolute flex items-center justify-center rounded-full text-center pending-appointments-counter",children:x.length>9?"9+":x.length})]}),t&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"fixed inset-0 h-full w-full z-10",onClick:j}),(0,g.jsx)("div",{className:"fixed top-0 sm:top-auto sm:absolute w-full h-full sm:h-auto sm:w-96 left-0 sm:mt-1 bg-white sm:rounded-md border shadow-lg overflow-hidden z-20",children:(0,g.jsx)(Re,{toggle:j,appointments:x,loading:h,hasError:d,setAppointments:f,loadAppointments:y})})]})]})};var Be=function(){var e=(0,Y.Z)(),t=(0,H.default)(e,2),r=t[0],s=t[1],i=(0,n.useState)(null),c=i[0],l=i[1],o=(0,n.useState)(!1),u=o[0],d=o[1],p=(0,n.use
1State)(!1),m=p[0],x=p[1],f=(0,n.useState)(!1),v=f[0],h=f[1],b=(0,a.E)(),j=b.getLicenseAgreementStatus,y=b.acceptLicenseAgreement,w=!1===(null===c||void 0===c?void 0:c.hasAcceptedCurrent)&&!v;function N(){return(N=(0,S.Z)(C().mark((function e(){var t;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,j();case 3:t=e.sent,l(t),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function k(){return(k=(0,S.Z)(C().mark((function e(t){var r;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),x(!0),e.prev=2,e.next=5,y(c.currentVersion);case 5:r=e.sent,l(r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),h(!0);case 12:x(!1);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}return(0,n.useEffect)((function(){!function(){N.apply(this,arguments)}()}),[]),(0,n.useEffect)((function(){if(w)return r(),function(){return s()}}),[w]),w?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"fixed inset-0 w-full h-full bg-black opacity-60",style:{zIndex:1e3}}),(0,g.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-4 overflow-y-auto",style:{zIndex:1001},children:(0,g.jsxs)("div",{className:"bg-white rounded-lg shadow-lg w-full max-w-md p-6 text-gray-800",children:[(0,g.jsx)("h2",{className:"text-xl font-semibold mb-3",children:"\u05ea\u05e0\u05d0\u05d9 \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05e2\u05d5\u05d3\u05db\u05e0\u05d5"}),(0,g.jsx)("p",{className:"text-sm mb-4",children:"\u05ea\u05e0\u05d0\u05d9 \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05e9\u05dc \u05d4\u05de\u05e2\u05e8\u05db\u05ea \u05e2\u05d5\u05d3\u05db\u05e0\u05d5. \u05db\u05d3\u05d9 \u05dc\u05d4\u05de\u05e9\u05d9\u05da \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05d6\u05de\u05df \u05d8\u05d5\u05d1 \u05d9\u05e9 \u05dc\u05e7\u05e8\u05d5\u05d0 \u05d5\u05dc\u05d0\u05e9\u05e8 \u05d0\u05ea \u05d4\u05ea\u05e0\u05d0\u05d9\u05dd \u05d4\u05de\u05e2\u05d5\u05d3\u05db\u05e0\u05d9\u05dd."}),(0,g.jsx)("a",{href:c.agreementUrl,target:"_blank",rel:"noopener noreferrer",className:"text-green-600 font-medium text-sm underline block mb-5",children:"\u05dc\u05e7\u05e8\u05d9\u05d0\u05ea \u05ea\u05e0\u05d0\u05d9 \u05d4\u05e9\u05d9\u05de\u05d5\u05e9"}),(0,g.jsxs)("form",{onSubmit:function(e){return k.apply(this,arguments)},children:[(0,g.jsxs)("label",{className:"flex items-start mb-4 text-sm cursor-pointer",children:[(0,g.jsx)("input",{type:"checkbox",checked:u,disabled:m,onChange:function(e){var t=e.target;d(t.checked)},className:"mt-0.5 ml-2 h-4 w-4"}),(0,g.jsx)("span",{children:"\u05e7\u05e8\u05d0\u05ea\u05d9 \u05d5\u05d0\u05e0\u05d9 \u05de\u05d0\u05e9\u05e8/\u05ea \u05d0\u05ea \u05ea\u05e0\u05d0\u05d9 \u05d4\u05e9\u05d9\u05de\u05d5\u05e9"})]}),(0,g.jsx)("button",{type:"submit",disabled:!u||m,className:"flex justify-center items-center disabled:opacity-50 text-center text-md w-full bg-green-500 h-12 rounded text-white py-3 font-medium outline-none focus:outline-none",children:m?(0,g.jsx)(T.frZ,{className:"mx-auto animate-spin",size:24}):(0,g.jsx)("span",{children:"\u05d0\u05e0\u05d9 \u05de\u05d0\u05e9\u05e8/\u05ea"})})]}),(0,g.jsx)("a",{href:"/app/logout/",className:"block text-center text-gray-400 text-xs mt-4",children:"\u05d9\u05e6\u05d9\u05d0\u05d4 \u05de\u05d4\u05d7\u05e9\u05d1\u05d5\u05df"})]})})]}):null};var Le=function(e){var t,r=e.children,o=(0,n.useState)({title:"\u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05d9",icon:(0,g.jsx)(x.QaE,{size:23})}),d=o[0],p=o[1],m=(0,n.useState)(!1),f=m[0],v=m[1],b=(0,i.Z)({redirectTo:"/app/login"}).user,j=(0,n.useState)(E().get(b,"business.details.wizardStep",2)),y=j[0],w=j[1],N=(0,h.useRouter)();return(0,n.useEffect)((function(){if(b){var e;null!==(e=b.business)&&void 0!==e&&e.archived&&N.push("/app/error");try{w(E().get(b,"business.details.wizardStep",2))}catch(t){console.error(t)}}}),[b]),(0,n.useEffect)((function(){var e=function(e,t){t.shallow;v(!1)};return N.events.on("routeChangeStart",e),function(){N.events.off("routeChangeStart",e)}})),!b||!1===b.isLoggedIn||null!==b&&void 0!==b&&null!==(t=b.business)&&void 0!==t&&t.archived?(0,g.jsx)(c.Z,{}):(0,g.jsx)(s.H,{children:(0,g.jsxs)(a.u,{children:[(0,g.jsx)(Be,{}),(0,g.jsx)(Oe.default,{id:"privy-script-code",dangerouslySetInnerHTML:{__html:"   var _d_site = _d_site || '523C285C1F92A575C118C13B';\n   (function(p, r, i, v, y) {\n     p[i] = p[i] || function() { (p[i].q = p[i].q || []).push(arguments) };\n     v = r.createElement('script'); v.async = 1; v.src = 'https://widget.privy.com/assets/widget.js';\n     y = r.getElementsByTagName('script')[0]; y.parentNode.insertBefore(v, y);\n   })(window, document, 'Privy');"}}),(0,g.jsx)("div",{onClick:function(){return v(!f)},className:"".concat(f?"block":"hidden"," block lg:hidden w-full h-full fixed top-0 left-0 bg-black opacity-75 z-50")}),(0,g.jsxs)("div",{className:"flex flex-wrap w-full bg-gray-50 min-h-screen top-0",children:[(0,g.jsxs)("div",{className:" ".concat(f?"rounded-tl-2xl shadow-2xl":"translate-x-full"," z-50 lg:z-auto sidebar bg-white lg:bg-gray-50 text-blue-100 w-72 lg:w-64 py-1 px-2 lg:py-0 lg:px-0 fixed inset-y-0 right-0 transform  lg:-translate-x-0 transition duration-200 ease-in-out"),children:[(0,g.jsxs)("div",{className:"flex items-center",children:[(0,g.jsxs)("div",{className:"p-2 lg:mt-1 flex items-center sm:justify-center sm:mx-auto",children:[(0,g.jsx)(l.default,{href:"/app/",children:(0,g.jsx)("a",{href:"/app/",children:(0,g.jsx)("img",{src:"/img/logo.png",className:"w-36 lg:w-40 mx-auto -mr-2",alt:"logo"})})}),(0,g.jsx)(l.default,{href:"/app/logout/",children:(0,g.jsxs)("a",{href:"/app/logout/",className:"-mr-2 md:mr-4 bg-white hover:bg-gray-50 h-7 font-medium lg:h-8 flex items-center text-gray-500 text-sm -mt-1 pr-0.5 pl-1.5 flex items-center justify-between space-x-1 space-x-reverse lg:px-2 border border-gray-200 rounded shadow-sm",children:[(0,g.jsx)(u.K1g,{className:"hidden sm:block",size:17}),(0,g.jsx)(u.K1g,{className:"block sm:hidden",size:15}),(0,g.jsx)("span",{className:"text-xs tracking-tight",children:"\u05d9\u05e6\u05d9\u05d0\u05d4"})]})})]}),(0,g.jsx)("button",{className:"text-black absolute left-3 top-4 lg:hidden",onClick:function(){return v(!f)},children:(0,g.jsx)(ae.nfZ,{size:30})})]}),(0,g.jsx)(Z,{setRouteTitle:p,user:b})]}),(0,g.jsxs)("div",{className:"lg:mr-64 w-full z-20 shadow-lg lg:border-r border-gray-200 bg-white rounded-tr-xl",children:[(0,g.jsx)("div",{className:"md:border-b bg-white w-full shadow lg:shadow-none fixed top-0 z-30 lg:pl-64 lg:rounded-tr-xl",children:(0,g.jsxs)("div",{className:"flex items-center block justify-between pl-1 pr-3 lg:p-6 lg:pl-2 h-14 lg:h-16",children:[(0,g.jsx)("div",{className:"lg:hidden flex-1 flex items-center",children:(6===E().get(b,"business.details.wizardStep",2)||6===y)&&(0,g.jsx)("button",{className:"font-medium bg-gray-600 rounded p-1 px-2 text-white shadow border-gray-700 border outline-none focus:outline-none hover:outline-none",onClick:function(){return v(!f)}
1,children:"\u05ea\u05e4\u05e8\u05d9\u05d8"})}),(0,g.jsx)("div",{className:"text-xl lg:text-3xl font-bold sm:font-medium text-gray-700 text-center justify-center lg:justify-start flex items-center flex-1",children:(0,g.jsx)("span",{className:"whitespace-nowrap",children:d.title})}),(0,g.jsxs)("div",{className:"flex-1 flex item-center justify-end",children:[b.business.timeSettings.limits.approveAppointmentsManually&&(0,g.jsx)(Me,{}),(0,g.jsx)("div",{children:(0,g.jsx)("a",{target:"_blank",href:"https://zmantov.co.il/b/".concat(b.business.pageCode,"/"),className:"z-10 flex items-center text-2xl block rounded-md bg-white hover:bg-gray-100 p-2 lg:p-3 text-gray-600 focus:outline-none",children:(0,g.jsx)(ie.qTJ,{})})}),(0,g.jsx)("div",{className:"flex",children:(0,g.jsx)(Te,{})})]})]})}),(0,g.jsx)("main",{className:"sm:p-4 relative py-16 sm:py-20 pb-40 min-w-full w-full rounded-tr-xl",children:(0,g.jsx)(se,{wizardStep:y,children:r})})]})]})]})})}},1693:function(e,t,r){"use strict";var n=r(97131),s=r(92809),a=r(30266),i=r(809),c=r.n(i),l=r(67294),o=r(3132),u=r(62836),d=r(84823),p=r.n(d),m=r(29703),x=r(93181),f=r(28133),v=r(28739),h=r(57378),g=r(48166),b=r(52091),j=r(41664),y=r(85893);function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,s.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t,r=e.callback,s=e.showModal,i=e.setShowModal,d=e.serviceToEdit,w=(0,m.E)(),k=w.addNewService,Z=w.updateService,S=w.loading,P=w.archiveService,C=w.getServiceProviders,A=d&&d.name?d:{name:"",description:"",length:30,price:30,startingPrice:!1},T=(0,l.useState)(A),O=T[0],D=T[1],E=(0,l.useState)(!1),z=E[0],_=E[1],I=(0,l.useState)(!1),R=I[0],M=I[1],B=(0,l.useState)([]),L=B[0],F=B[1],H=(0,l.useState)(!1),G=H[0],U=H[1],q=(0,h.Z)().user,Y=null===q||void 0===q||null===(t=q.billing)||void 0===t?void 0:t.subscription;function V(){return(V=(0,a.Z)(c().mark((function e(){var t,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:t=e.sent,d._id&&d.serviceProviderIds.length?(r=t.map((function(e){var t,r=!1;return null!==(t=d.serviceProviderIds)&&void 0!==t&&t.includes(e._id)&&(r=!0),N(N({},e),{},{isSelected:r})})),t=r.some((function(e){return e.isSelected}))?r:X(t)):t=X(t),F((0,n.Z)(t));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,l.useEffect)((function(){_(!1),D(d&&d.name?d:{name:"",description:"",length:30,price:30,startingPrice:!1}),Q()&&function(){V.apply(this,arguments)}()}),[d,s]);var W=function(){var e=(0,a.Z)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D(N(N({},O),{},{startingPrice:"true"==t.target.value}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=(0,a.Z)(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),!Q()){e.next=6;break}if(L.filter((function(e){return e.isSelected})).length){e.next=6;break}return v.Am.error("\u05d9\u05e9 \u05dc\u05d1\u05d7\u05d5\u05e8 \u05dc\u05e4\u05d7\u05d5\u05ea \u05d0\u05d9\u05e9 \u05e6\u05d5\u05d5\u05ea \u05d0\u05d7\u05d3"),e.abrupt("return");case 6:if(!O._id||!O.businessId){e.next=12;break}return e.next=9,Z({serviceId:O._id,service:O,serviceProviders:L});case 9:n=e.sent,e.next=15;break;case 12:return e.next=14,k({service:O,serviceProviders:L});case 14:n=e.sent;case 15:n&&n.data.success&&r(!0);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=(0,a.Z)(c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,P(O._id);case 3:(t=e.sent)&&(n=t.data)&&n.success&&(M(!1),i(!1),r(!0));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function Q(){return(null===Y||void 0===Y?void 0:Y.plan)===g.advanced.plan||(null===Y||void 0===Y?void 0:Y.plan)===g.advancedOnSale.plan||(null===Y||void 0===Y?void 0:Y.plan)===g.unlimited.plan||(null===Y||void 0===Y?void 0:Y.isTrial)}function X(e){return e.map((function(e){return N(N({},e),{},{isSelected:!0})}))}return(0,y.jsx)(y.Fragment,{children:s?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{className:"opacity-25 fixed inset-0 z-40 bg-black overflow-auto w-full h-full",onClick:function(){i(!1),_(!1)}}),(0,y.jsx)("div",{className:"overflow-x-hidden overflow-y-auto h-full fixed w-full top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 outline-none focus:outline-none ",style:{zIndex:100},children:(0,y.jsx)("div",{className:"my-6 sm:my-16 px-2 sm:mx-auto w-full md:max-w-lg",onClick:function(){return U(!1)},children:(0,y.jsxs)("div",{className:" border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none",children:[(0,y.jsxs)("div",{className:"flex item-center justify-between p-5 border-b border-solid border-blueGray-200 rounded-t",children:[(0,y.jsx)("h3",{className:"text-xl md:text-2xl font-semibold",children:O._id?"\u05e2\u05e8\u
105d9\u05db\u05ea \u05e9\u05d9\u05e8\u05d5\u05ea":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e9\u05d9\u05e8\u05d5\u05ea"}),(0,y.jsx)("button",{className:"p-1 border-0 text-black text-3xl leading-none font-semibold outline-none focus:outline-none",onClick:function(){return i(!1)},children:(0,y.jsx)(o.nfZ,{size:21})})]}),(0,y.jsxs)("div",{className:"relative p-4 flex-auto",children:[!Q()&&(0,y.jsxs)("div",{className:"flex text-sm text-gray-600 mb-4 bg-green-100 p-3 rounded",children:[(0,y.jsx)("span",{className:"ml-2",children:(0,y.jsx)(b.kUi,{})}),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:"ml-1",children:"\u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05e9\u05d9\u05d9\u05da \u05d0\u05ea \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea \u05dc\u05d0\u05d9\u05e9 \u05e6\u05d5\u05d5\u05ea \u05de\u05e1\u05d5\u05d9\u05dd \u05d9\u05e9 \u05dc\u05e9\u05d3\u05e8\u05d2 \u05d0\u05ea \u05d4\u05d7\u05d1\u05d9\u05dc\u05d4"}),(0,y.jsx)("span",{className:"underline hover:text-gray-800 transition-all",children:(0,y.jsx)(j.default,{href:"/app/account/upgrade/",className:"",children:"\u05dc\u05d7\u05e6\u05d5 \u05db\u05d0\u05df"})})]})]}),(0,y.jsxs)("form",{className:"bg-white space-y-4",onSubmit:K,children:[(0,y.jsxs)("div",{className:"form-control",children:[(0,y.jsx)("label",{className:"label ",children:(0,y.jsx)("span",{className:"label-text md:text-base text-gray-800",children:"\u05e9\u05dd \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea"})}),(0,y.jsx)("input",{type:"text",value:O.name,onChange:function(e){D(N(N({},O),{},{name:e.target.value}))},name:"name",required:!0,placeholder:"\u05dc\u05d3\u05d5\u05d2\u05de\u05d0: \u05ea\u05e1\u05e4\u05d5\u05e8\u05ea + \u05d6\u05e7\u05df",className:"border px-3 h-12 bg-white text-sm"})]}),(0,y.jsxs)("div",{className:"form-control",children:[(0,y.jsx)("label",{className:"label ",children:(0,y.jsx)("span",{className:"label-text md:text-base text-gray-800",children:"\u05ea\u05d9\u05d0\u05d5\u05e8 \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea"})}),(0,y.jsx)("input",{type:"text",value:O.description,onChange:function(e){D(N(N({},O),{},{description:e.target.value}))},name:"name",placeholder:"\u05dc\u05d3\u05d5\u05d2\u05de\u05d0: \u05d7\u05e4\u05d9\u05e4\u05d4, \u05ea\u05e1\u05e4\u05d5\u05e8\u05ea \u05de\u05e7\u05e6\u05d5\u05e2\u05d9\u05ea \u05d5\u05e2\u05d9\u05e6\u05d5\u05d1 \u05d4\u05d6\u05e7\u05df.",className:"border px-3 h-12 bg-white text-sm"})]}),Q()&&(0,y.jsxs)("div",{className:"form-control",children:[(0,y.jsx)("label",{className:"label",children:(0,y.jsx)("span",{className:"label-text md:text-base text-gray-800",children:"\u05d1\u05d7\u05d9\u05e8\u05ea \u05d0\u05d9\u05e9 \u05e6\u05d5\u05d5\u05ea"})}),(0,y.jsxs)("div",{className:"select select-bordered bg-white border border-gray-200 font-normal items-center relative",onClick:function(e){e.stopPropagation(),U((function(e){return!e}))},children:[(0,y.jsx)("div",{children:null!==L&&void 0!==L&&L.length?"".concat(L.filter((function(e){return e.isSelected})).length," \u05d0\u05e0\u05e9\u05d9 \u05e6\u05d5\u05d5\u05ea \u05e0\u05d1\u05d7\u05e8\u05d5"):"\u05d1\u05d7\u05d9\u05e8\u05ea \u05d0\u05d9\u05e9 \u05e6\u05d5\u05d5\u05ea"}),G&&(0,y.jsx)("ul",{onClick:function(e){return e.stopPropagation()},className:"absolute right-0 select-bordered bg-white w-full max-h-52 overflow-y-auto",style:{boxShadow:"0px 0px 1px 0px black",top:"100%"},onTouchStart:function(e){return e.stopPropagation()},children:L.map((function(e){return(0,y.jsx)("li",{className:"hover:bg-gray-100 flex py-1",children:(0,y.jsxs)("label",{className:"cursor-pointer mr-3 flex items-center",style:{flexGrow:"1"},children:[(0,y.jsx)("input",{type:"checkbox",checked:e.isSelected,onChange:function(t){return function(e,t){e.stopPropagation(),F((function(e){return e.map((function(e){return e._id===t?N(N({},e),{},{isSelected:!e.isSelected}):e}))}))}(t,e._id)},className:"ml-2"}),"".concat(e.firstName," ").concat(e.lastName)]})},e._id)}))})]})]}),(0,y.jsxs)("div",{className:"flex flex-row justify-between items-center",children:[(0,y.jsxs)("div",{className:"form-control w-full ml-1",children:[(0,y.jsx)("label",{className:"label ",children:(0,y.jsxs)("span",{className:"label-text md:text-base text-gray-800",children:["\u05de\u05e9\u05da \u05d4\u05e9\u05d9\u05e8\u
105d5\u05ea ",(0,y.jsx)("span",{className:"text-gray-400 text-xs",children:"(\u05d1\u05d3\u05e7\u05d5\u05ea)"})]})}),(0,y.jsx)(u.Z,{value:O.length,steps:5,changeHandler:function(e){D(N(N({},O),{},{length:e}))}}),(0,y.jsx)("div",{className:"text-gray-400 text-sm mt-2 flex justify-center",children:(0,y.jsx)("div",{className:"ml-1",children:p().timeConvert(O.length)})})]}),(0,y.jsxs)("div",{className:"form-control w-full mr-1",children:[(0,y.jsx)("label",{className:"label ",children:(0,y.jsx)("span",{className:"label-text md:text-base text-gray-800",children:"\u05e2\u05dc\u05d5\u05ea \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea"})}),(0,y.jsx)(u.Z,{value:O.price,changeHandler:function(e){D(N(N({},O),{},{price:e}))}}),(0,y.jsxs)("div",{className:"text-gray-400 text-sm mt-2 flex justify-center",children:[(0,y.jsx)("div",{className:"ml-1",children:O.startingPrice?"\u05d4\u05d7\u05dc \u05de-".concat(O.price):O.price}),(0,y.jsx)("div",{children:"\u20aa"})]})]})]}),(0,y.jsxs)("div",{className:"form-control",children:[(0,y.jsx)("label",{className:"label ",children:(0,y.jsx)("span",{className:"label-text md:text-base text-gray-800",children:"\u05de\u05d7\u05d9\u05e8 \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea \u05d4\u05d9\u05e0\u05d5"})}),(0,y.jsxs)("select",{value:O.startingPrice,className:"select select-bordered bg-white border border-gray-200 font-normal",onChange:W,required:!0,children:[(0,y.jsxs)("option",{value:"false",children:["\u05de\u05d7\u05d9\u05e8 \u05e7\u05d1\u05d5\u05e2 - \u20aa",O.price]}),(0,y.jsxs)("option",{value:"true",children:["\u05d4\u05d7\u05dc \u05de-\u20aa",O.price]})]}),d&&d.name&&(0,y.jsxs)(y.Fragment,{children:[z?(0,y.jsx)("button",{type:"button",onClick:$,disabled:R,className:"hover:opacity-90 flex items-center justify-center disabled:opacity-75 bg-red-500 w-full p-2 rounded text-white mt-3 h-10",children:(0,y.jsx)(f.Z,{size:24,spin:R,children:"\u05dc\u05d7\u05e6\u05d5 \u05e9\u05d5\u05d1 \u05dc\u05d0\u05d9\u05e9\u05d5\u05e8 \u05de\u05d7\u05d9\u05e7\u05d4"})}):(0,y.jsx)("button",{type:"button",onClick:function(){return _(!0)},disabled:R,className:"hover:opacity-90 flex items-center justify-center disabled:opacity-75 bg-white border-red-500 border w-full p-2 rounded text-red-500 mt-3 h-10",children:"\u05de\u05d7\u05d9\u05e7\u05ea \u05e9\u05d9\u05e8\u05d5\u05ea"}),(0,y.jsx)("p",{className:"text-center tracking-tight text-sm pt-2 text-red-500 px-3",children:"\u05de\u05d7\u05d9\u05e7\u05ea \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea \u05d0\u05d9\u05e0\u05d4 \u05e0\u05d9\u05ea\u05e0\u05ea \u05dc\u05e9\u05d7\u05d6\u05d5\u05e8. \u05e0\u05ea\u05d5\u05e0\u05d9 \u05d4\u05e1\u05d8\u05d8\u05d9\u05e1\u05d8\u05d9\u05e7\u05d4 \u05d9\u05d9\u05e9\u05de\u05e8\u05d5 \u05d1\u05de\u05e2\u05e8\u05db\u05ea."})]})]}),(0,y.jsxs)("div",{className:"flex items-center border-t border-solid pt-4 rounded-b",children:[(0,y.jsx)("button",{className:"flex justify-center items-center w-24 disabled:bg-blue-100 h-12 hover:bg-blue-400 bg-blue-500 border-blue-500 border text-white font-bold uppercase text-sm px-8 py-3 rounded outline-none",type:"submit",children:S?(0,y.jsx)(x.frZ,{className:"mx-auto animate-spin",size:30}):(0,y.jsx)("span",{children:"\u05e9\u05de\u05d9\u05e8\u05d4"})}),(0,y.jsx)("button",{className:"text-gray-700 border border-gray-400 hover:opacity-75 h-12 background-transparent font-bold uppercase px-6 py-3 text-sm outline-none rounded focus:outline-none mr-1",type:"button",onClick:function(){i(!1),D(A),_(!1)},children:"\u05d1\u05d9\u05d8\u05d5\u05dc"})]})]})]})]})})})]}):null})}},66480:function(e,t,r){"use strict";r.d(t,{Z:function(){return b}});var n=r(92809),s=r(67294),a=r(84823),i=r.n(a),c=r(80008),l=r.n(c),o=r(85893);var u=function(e){var t=e.onChange,r=e.value,n=e.options,s=e.isDisabled;return(0,o.jsx)("div",{className:"w-full md:w-1/2",children:(0,o.jsx)("select",{onChange:t,value:r,disabled:s,className:"select select-bordered bg-white border border-gray-300 select-md w-full border px-3 h-12 font-medium bg-white w-full",children:n.map((function(e){return(0,o.jsx)("option",{className:"text-center",value:e.value,children:e.text},e.text)}))})})};
1var d=function(e){var t=e.title,r=e.children,n=e.onChange,s=e.value,a=e.options,i=e.isDisabled;return(0,o.jsx)("div",{className:"border text-sm rounded-sm p-3 ".concat(i?"opacity-50":""),children:(0,o.jsxs)("div",{className:"md:space-x-5 md:space-x-reverse flex md:justify-between items-start md:items-center flex-col md:flex-row space-y-3 md:space-y-0",children:[(0,o.jsxs)("div",{className:"md:w-1/2 space-y-1",children:[(0,o.jsx)("label",{className:"font-bold",children:(0,o.jsx)("div",{className:"label-text md:text-base text-gray-800",children:t})}),(0,o.jsx)("p",{className:"text-sm md:text-sm text-gray-700",children:r})]}),(0,o.jsx)(u,{onChange:n,value:s,options:a,isDisabled:i})]})})},p=r(17018),m=r(51727);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){(0,n.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=function(e){var t=e.open,r=e.setOpen,n=e.setTimeSettings;return(0,o.jsxs)(m.Z,{open:t,setOpen:r,children:[(0,o.jsx)("div",{className:"mb-4",children:"\u05d4\u05ea\u05d5\u05e8\u05d9\u05dd \u05e9\u05e0\u05de\u05e6\u05d0\u05d9\u05dd \u05db\u05e8\u05d2\u05e2 \u05d1\u05d4\u05de\u05ea\u05e0\u05d4 \u05d9\u05d0\u05d5\u05e9\u05e8\u05d5 \u05d1\u05d0\u05d5\u05e4\u05df \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9. \u05dc\u05d4\u05de\u05e9\u05d9\u05da?"}),(0,o.jsxs)("div",{className:"bg-gray-50 flex flex-row w-full gap-3 justify-end",children:[(0,o.jsx)("button",{type:"button",className:"w-1/4 items-center inline-flex justify-center rounded-md border h-10 border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 sm:text-sm",onClick:function(){return r(!1)},children:"\u05d1\u05d9\u05d8\u05d5\u05dc"}),(0,o.jsx)("button",{type:"button",className:"w-1/4 inline-flex justify-center text-center disabled:opacity-50 rounded-md border h-10 flex items-center border-transparent shadow-sm px-10 py-2 bg-green-600 text-base font-medium text-white hover:bg-green-700 sm:text-sm",onClick:function(){n((function(e){return f(f({},e),{},{limits:f(f({},e.limits),{},{approveAppointmentsManually:!1})})})),r(!1)},children:"\u05d4\u05de\u05e9\u05da"})]})]})};function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){(0,n.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=function(e){var t=e.timeSettings,r=e.setTimeSettings,n={reminderTimes:[{value:2,text:"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd"},{value:3,text:"3 \u05e9\u05e2\u05d5\u05ea"},{value:4,text:"4 \u05e9\u05e2\u05d5\u05ea"},{value:5,text:"5 \u05e9\u05e2\u05d5\u05ea"},{value:6,text:"6 \u05e9\u05e2\u05d5\u05ea"},{value:7,text:"7 \u05e9\u05e2\u05d5\u05ea"},{value:8,text:"8 \u05e9\u05e2\u05d5\u05ea"},{value:9,text:"9 \u05e9\u05e2\u05d5\u05ea"},{value:10,text:"10 \u05e9\u05e2\u05d5\u05ea"},{value:11,text:"11 \u05e9\u05e2\u05d5\u05ea"},{value:12,text:"12 \u05e9\u05e2\u05d5\u05ea"},{value:24,text:"24 \u05e9\u05e2\u05d5\u05ea"},{value:36,text:"36 \u05e9\u05e2\u05d5\u05ea"},{value:48,text:"48 \u05e9\u05e2\u05d5\u05ea"}],minTimeBeforeBooking:[{value:15,text:"15 \u05d3\u05e7\u05d5\u05ea"},{value:30,text:"30 \u05d3\u05e7\u05d5\u05ea"},{value:45,text:"45 \u05d3\u05e7\u05d5\u05ea"},{value:60,text:"\u05e9\u05e2\u05d4"},{value:75,text:"\u05e9\u05e2\u05d4 \u05d5\u05e8\u05d1\u05e2"},{value:90,text:"\u05e9\u05e2\u05d4 \u05d5\u05d7\u05e6\u05d9"},{value:120,text:"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd"},{value:135,text:"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd \u05d5\u05e8\u05d1\u05e2"},{value:150,text:"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd \u05d5\u05d7\u05e6\u05d9"},{value:180,text:"\u05e9\u05dc\u05d5\u05e9 \u05e9\u05e2\u05d5\u05ea"},{value:360,text:"6 \u05e9\u05e2\u05d5\u05ea"},{value:720,text:"12 \u05e9\u05e2\u05d5\u05ea"},{value:1440,text:"24 \u05e9\u05e2\u05d5\u05ea"},{value:2880,text:"48 \u05e9\u05e2\u05d5\u05ea"},{value:4320,text:"72 \u05e9\u05e2\u05d5\u05ea"}],bookEvery:[{value:5,text:"5 \u05d3\u05e7\u05d5\u05ea"},{value:10,text:"10 \u05d3\u05e7\u05d5\u05ea"},{value:15,text:"15 \u05d3\u05e7\u05d5\u05ea"},{value:20,text:"20 \u05d3\u05e7\u05d5\u05ea"},{value:25,text:"25 \u05d3\u05e7\u05d5\u05ea"},{value:30,text:"30 \u05d3\u05e7\u05d5\u05ea"},{value:45,text:"45 \u05d3\u05e7\u05d5\u05ea"},{value:60,text:"\u05e9\u05e2\u05d4"},{value:75,text:"\u05e9\u05e2\u05d4 \u05d5\u05e8\u05d1\u05e2"},{value:90,text:"\u05e9\u05e2\u05d4 \u05d5\u05d7\u05e6\u05d9"},{value:120,text:"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd"},{value:135,text:"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd \u05d5\u05e8\u05d1\u05e2"},{value:150,text:"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd \u05d5\u05d7\u05e6\u05d9"},{value:180,text:"\u05e9\u05dc\u05d5\u05e9 \u05e9\u05e2\u05d5\u05ea"}],futureBookings:[{value:24,text:"\u05d9\u05d5\u05dd"},{value:48,text:"\u05d9\u05d5\u05de\u05d9\u05d9\u05dd"},{value:72,text:"\u05e9\u05dc\u05d5\u05e9\u05d4 \u05d9\u05de\u05d9\u05dd"},{value:96,text:"\u05d0\u05e8\u05d1\u05e2\u05d4 \u05d9\u05de\u05d9\u05dd"},{value:120,text:"\u05d7\u05de\u05d9\u05e9\u05d4 \u05d9\u05de\u05d9\u05dd"},{value:168,text:"\u05e9\u05d1\u05d5\u05e2"},{value:336,text:"\u05e9\u05d1\u05d5\u05e2\u05d9\u05d9\u05dd"},{value:504,text:"3 \u05e9\u05d1\u05d5\u05e2\u05d5\u05ea"},{value:720,text:"\u05d7\u05d5\u05d3\u05e9"},{value:1008,text:"\u05d7\u05d5\u05d3\u05e9 \u05d5\u05d7\u05e6\u05d9"},{value:1344,text:"\u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd"},{value:2160,text:"3 \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},{value:4320,text:"6 \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},{value:27e3,text:"\u05dc\u05dc\u05d0 \u05d4\u05d2\u05d1\u05dc\u05d4"}]}
1,a=(0,s.useState)(n.bookEvery.filter((function(e){return e.value===t.limits.bookEvery}))[0]||n.bookEvery[1]),c=a[0],u=a[1],m=(0,s.useState)(n.futureBookings.filter((function(e){return e.value===t.limits.futureBookings}))[0]||n.futureBookings[8]),x=m[0],f=m[1],h=(0,s.useState)(n.minTimeBeforeBooking.filter((function(e){return e.value===t.limits.minTimeBeforeBooking}))[0]||n.minTimeBeforeBooking[0]),b=h[0],j=h[1],y=(0,s.useState)(n.reminderTimes.filter((function(e){return e.value===t.limits.reminderTime}))[0]||n.reminderTimes[n.reminderTimes.length-1]),w=y[0],N=y[1],k=(0,s.useState)(!1),Z=k[0],S=k[1];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"border text-sm rounded-sm p-3",children:[(0,o.jsxs)("div",{className:"flex md:justify-between items-start md:items-center flex-col md:flex-row space-y-3 md:space-y-0 md:space-x-5 md:space-x-reverse",children:[(0,o.jsxs)("div",{className:"md:w-1/2 space-y-1",children:[(0,o.jsxs)("label",{className:"font-bold flex items-center",children:[(0,o.jsx)("div",{className:"label-text md:text-base text-gray-800",children:"\u05e0\u05d9\u05d4\u05d5\u05dc \u05d6\u05de\u05e0\u05d9\u05dd \u05d7\u05db\u05dd"}),(0,o.jsx)("span",{className:"inline-flex items-center justify-center px-2 py-0.5 mr-2 text-xs font-bold leading-none text-white bg-green-400 rounded-full",children:"\u05de\u05d5\u05de\u05dc\u05e5 \u05de\u05d0\u05d5\u05d3"})]}),(0,o.jsx)("p",{className:"text-sm md:text-sm text-gray-700",children:"\u05d4\u05de\u05e2\u05e8\u05db\u05ea \u05ea\u05e0\u05d4\u05dc \u05d0\u05ea \u05d4\u05d9\u05d5\u05de\u05df \u05e9\u05dc\u05db\u05dd \u05d1\u05e6\u05d5\u05e8\u05d4 \u05d7\u05db\u05de\u05d4 \u05d5\u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea \u05d5\u05ea\u05ea\u05d7\u05e9\u05d1 \u05d1\u05d0\u05d5\u05e8\u05da \u05db\u05dc \u05e9\u05d9\u05e8\u05d5\u05ea, \u05d1\u05db\u05d3\u05d9 \u05e9\u05ea\u05d5\u05db\u05dc\u05d5 \u05dc\u05e7\u05d1\u05dc \u05db\u05de\u05d4 \u05e9\u05d9\u05d5\u05ea\u05e8 \u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05d1\u05de\u05d4\u05dc\u05da \u05d4\u05d9\u05d5\u05dd."})]}),(0,o.jsx)("div",{className:"w-full md:w-1/2",children:(0,o.jsxs)("select",{className:"select select-bordered bg-white border border-gray-300 select-md w-full border px-3 h-12 font-medium bg-white w-full",onChange:function(e){var t=e.target.value;r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{smartTimeOptimization:"true"===t})})}))},value:t.limits.smartTimeOptimization,children:[(0,o.jsx)("option",{className:"text-center",value:!0,children:"\u2705 \u05e4\u05e2\u05d9\u05dc (\u05de\u05d5\u05de\u05dc\u05e5 \u05de\u05d0\u05d5\u05d3)"}),(0,o.jsx)("option",{className:"text-center",value:!1,children:"\u274c \u05dc\u05d0 \u05e4\u05e2\u05d9\u05dc"})]})})]}),(0,o.jsxs)("div",{className:"mt-5 ".concat(t.limits.smartTimeOptimization?"opacity-50":"opacity-100"),children:[(0,o.jsx)("div",{className:"border-r-2 bg-gray-50",children:(0,o.jsx)("div",{className:"border text-sm rounded-sm p-3",children:(0,o.jsxs)("div",{className:"md:space-x-5 md:space-x-reverse flex md:justify-between items-start md:items-center flex-col md:flex-row space-y-3 md:space-y-0",children:[(0,o.jsxs)("div",{className:"md:w-1/2 space-y-1",children:[(0,o.jsx)("label",{className:"font-bold",children:(0,o.jsx)("div",{className:"label-text md:text-base text-gray-800",children:"\u05e7\u05d1\u05d9\u05e2\u05ea \u05ea\u05d5\u05e8"})}),(0,o.jsxs)("div",{className:"text-sm md:text-sm text-gray-700",children:["\u05e0\u05d9\u05ea\u05df \u05dc\u05e7\u05d1\u05d5\u05e2 \u05ea\u05d5\u05e8 \u05db\u05dc ",(0,o.jsx)("strong",{className:"underline",children:i().timeConvert(c.value)}),(0,o.jsxs)("div",{className:"space-x-1 space-x-reverse",children:[(0,o.jsx)("span",{children:"\u05dc\u05d3\u05d5\u05d2\u05de\u05d0:"}),(0,o.jsx)("span",{className:"bg-yellow-100 p-0.5 text-xs rounded font-medium text-yellow-600",children:l()("1970-01-01T08:00").add(3*c.value,"minutes").format("hh:mm")}),(0,o.jsx)("span",{className:"bg-yellow-100 p-0.5 text-xs rounded font-medium text-yellow-600",children:l()("1970-01-01T08:00").add(2*c.value,"minutes").format("hh:mm")}
1),(0,o.jsx)("span",{className:"bg-yellow-100 p-0.5 text-xs rounded font-medium text-yellow-600",children:l()("1970-01-01T08:00").add(c.value,"minutes").format("hh:mm")}),(0,o.jsx)("span",{className:"bg-yellow-100 p-0.5 text-xs rounded font-medium text-yellow-600",children:l()("1970-01-01T08:00").format("hh:mm")})]})]})]}),(0,o.jsx)("div",{className:"w-full md:w-1/2",children:(0,o.jsx)("select",{disabled:t.limits.smartTimeOptimization,className:"select select-bordered bg-white border border-gray-300 select-md w-full border px-3 font-medium h-12 bg-white w-full",onChange:function(e){var t=e.target.value;n.bookEvery.map((function(e){e.value==t&&u(e)})),r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{bookEvery:parseInt(t)})})}))},value:c.value,children:n.bookEvery.map((function(e){return(0,o.jsx)("option",{className:"text-center",value:e.value,children:i().timeConvert(e.value)},e.text)}))})})]})})}),(0,o.jsx)("div",{className:"border-r-2 bg-gray-50",children:(0,o.jsx)("div",{className:"border text-sm rounded-sm p-3",children:(0,o.jsxs)("div",{className:"md:space-x-5 md:space-x-reverse flex md:justify-between items-start md:items-center flex-col md:flex-row space-y-3 md:space-y-0",children:[(0,o.jsxs)("div",{className:"md:w-1/2 space-y-1",children:[(0,o.jsx)("label",{className:"font-bold flex items-center",children:(0,o.jsx)("div",{className:"label-text md:text-base text-gray-800",children:"\u05d4\u05ea\u05e2\u05dc\u05de\u05d5\u05ea \u05de\u05de\u05e9\u05da \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea"})}),(0,o.jsxs)("p",{className:"text-sm md:text-sm text-gray-700",children:["\u05d4\u05d0\u05dd \u05dc\u05d0\u05e4\u05e9\u05e8 \u05e7\u05d1\u05dc\u05ea \u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e0\u05d5\u05e1\u05e4\u05d9\u05dd \u05d1\u05d9\u05df \u05dc\u05d1\u05d9\u05df? \u05dc\u05d3\u05d5\u05d2\u05de\u05d0: \u05dc\u05e7\u05d5\u05d7\u05d4 \u05de\u05d2\u05d9\u05e2\u05d4 \u05d1\u05e9\u05e2\u05d4 09:00 \u05dc\u05d8\u05d9\u05e4\u05d5\u05dc \u05e2\u05d3 12:00, \u05d0\u05da \u05ea\u05d5\u05db\u05dc\u05d5 \u05dc\u05e7\u05d1\u05dc \u05dc\u05e7\u05d5\u05d7\u05d4 \u05e0\u05d5\u05e1\u05e4\u05ea \u05d1\u05e9\u05e2\u05d4 ",(0,o.jsx)("span",{className:"bg-yellow-100 p-0.5 text-xs rounded font-medium text-yellow-600",children:l()("1970-01-01T09:00").add(c.value,"minutes").format("hh:mm")}),"."]})]}),(0,o.jsx)("div",{className:"w-full md:w-1/2",children:(0,o.jsxs)("select",{disabled:t.limits.smartTimeOptimization,className:"select select-bordered bg-white border border-gray-300 select-md w-full border px-3 h-12 font-medium bg-white w-full",onChange:function(e){var t=e.target.value;r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{ignoreServiceLength:"true"===t})})}))},value:t.limits.ignoreServiceLength,children:[(0,o.jsx)("option",{className:"text-center",value:!1,children:"\u2705 \u05d0\u05dc \u05ea\u05ea\u05e2\u05dc\u05dd (\u05de\u05d5\u05de\u05dc\u05e5)"}),(0,o.jsx)("option",{className:"text-center",value:!0,children:"\u274c \u05d4\u05ea\u05e2\u05dc\u05dd"})]})})]})})})]})]}),(0,o.jsx)(d,{title:"\u05d4\u05e4\u05e1\u05e7\u05d4 \u05d1\u05d9\u05df \u05ea\u05d5\u05e8 \u05dc\u05ea\u05d5\u05e8",value:t.limits.breakBetweenAppointments,onChange:function(e){var n=e.target;t.limits.smartTimeOptimization&&r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{breakBetweenAppointments:+n.value})})}))},options:(0,p.getOptionsForBreak)(n.bookEvery),isDisabled:!t.limits.smartTimeOptimization,children:t.limits.breakBetweenAppointments?(0,o.jsxs)(o.Fragment,{children:["\u05ea\u05d5\u05e8\u05d9\u05dd \u05d9\u05d9\u05e7\u05d1\u05e2\u05d5 \u05e2\u05dd \u05d4\u05e4\u05e1\u05e7\u05d4 \u05e9\u05dc ",(0,o.jsx)("strong",{className:"underline",children:t.limits.breakBetweenAppointments})," \u05d3\u05e7\u05d5\u05ea."]}):(0,o.jsx)(o.Fragment,{children:"\u05d4\u05ea\u05d5\u05e8\u05d9\u05dd \u05d9\u05d9\u05e7\u05d1\u05e2\u05d5 \u05dc\u05dc\u05d0 \u05d4\u05e4\u05e1\u05e7\u05d4 \u05d1\u05d9\u05e0\u05d9\u05d4\u05dd."})}),(0,o.jsx)("div",{className:"border text-sm rounded-sm p-3",children:(0,o.jsxs)("div",{className:"md:space-x-5 md:space-x-reverse flex md:justify-between items-start md:items-center flex-col md:flex-row space-y-3 md:space-y-0",children:[(0,o.jsxs)("div",{className:"md:w-1/2 space-y-1",children:[(0,o.jsx)("label",{className:"font-bold",children:(0,o.jsx)("div",{className:"label-text md:text-base text-gray-800",children:"\u05ea\u05d5\u05e8 \u05e2\u05ea\u05d9\u05d3\u05d9"})}),(0,o.jsxs)("p",{className:"text-sm md:text-sm text-gray-700",children:["\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05d9\u05db\u05d5\u05dc\u05d9\u05dd \u05dc\u05e7\u05d1\u05d5\u05e2 \u05ea\u05d5\u05e8 \u05e2\u05d3 ",(0,o.jsx)("strong",{className:"underline",children:x.text})," \u05e7\u05d3\u05d9\u05de\u05d4."]})]}),(0,o.jsx)("div",{className:"w-full md:w-1/2",children:(0,o.jsx)("select",{className:"select select-bordered bg-white border border-gray-300 select-md w-full border px-3 h-12 font-medium bg-white w-full",onCh
1ange:function(e){var t=parseInt(e.target.value);n.futureBookings.map((function(e){e.value===t&&f(e)})),r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{futureBookings:t})})}))},value:x.value,children:n.futureBookings.map((function(e){return(0,o.jsx)("option",{className:"text-center",value:e.value,children:e.text},e.text)}))})})]})}),(0,o.jsx)("div",{className:"border text-sm rounded-sm p-3",children:(0,o.jsxs)("div",{className:"md:space-x-5 md:space-x-reverse flex md:justify-between items-start md:items-center flex-col md:flex-row space-y-3 md:space-y-0",children:[(0,o.jsxs)("div",{className:"md:w-1/2 space-y-1",children:[(0,o.jsx)("label",{className:"font-bold",children:(0,o.jsx)("div",{className:"label-text md:text-base text-gray-800",children:"\u05de\u05e2\u05db\u05e9\u05d9\u05d5 \u05dc\u05e2\u05db\u05e9\u05d9\u05d5?"})}),(0,o.jsxs)("p",{className:"text-sm md:text-sm text-gray-700",children:["\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e6\u05e8\u05d9\u05db\u05d9\u05dd \u05dc\u05e7\u05d1\u05d5\u05e2 \u05ea\u05d5\u05e8 \u05de\u05d9\u05e0\u05d9\u05de\u05d5\u05dd ",(0,o.jsx)("strong",{className:"underline",children:b.text})," \u05de\u05e8\u05d0\u05e9."]})]}),(0,o.jsx)("div",{className:"w-full md:w-1/2",children:(0,o.jsx)("select",{className:"select select-bordered bg-white border border-gray-300 select-md w-full border px-3 h-12 font-medium bg-white w-full",onChange:function(e){var t=parseInt(e.target.value);n.minTimeBeforeBooking.map((function(e){e.value===t&&j(e)})),r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{minTimeBeforeBooking:t})})}))},value:b.value,children:n.minTimeBeforeBooking.map((function(e){return(0,o.jsx)("option",{className:"text-center",value:e.value,children:e.text},e.text)}))})})]})}),(0,o.jsx)("div",{className:"border text-sm rounded-sm p-3",children:(0,o.jsxs)("div",{className:"flex md:justify-between items-start md:items-center flex-col md:flex-row space-y-3 md:space-y-0 md:space-x-5 md:space-x-reverse",children:[(0,o.jsxs)("div",{className:"md:w-1/2 space-y-1",children:[(0,o.jsx)("label",{className:"font-bold flex items-center",children:(0,o.jsx)("div",{className:"label-text md:text-base text-gray-800",children:"\u05ea\u05d5\u05e8\u05d9\u05dd \u05de\u05e8\u05d5\u05d1\u05d9\u05dd"})}),(0,o.jsx)("p",{className:"text-sm md:text-sm text-gray-700",children:"\u05d4\u05d0\u05dd \u05dc\u05d0\u05e4\u05e9\u05e8 \u05dc\u05dc\u05e7\u05d5\u05d7 \u05dc\u05e7\u05d1\u05d5\u05e2 \u05d9\u05d5\u05ea\u05e8 \u05de\u05ea\u05d5\u05e8 \u05d0\u05d7\u05d3, \u05d1\u05de\u05d9\u05d3\u05d4 \u05d5\u05db\u05d1\u05e8 \u05d9\u05e9 \u05dc\u05d5 \u05ea\u05d5\u05e8 \u05e2\u05ea\u05d9\u05d3\u05d9?"})]}),(0,o.jsx)("div",{className:"w-full md:w-1/2",children:(0,o.jsxs)("select",{className:"select select-bordered bg-white border border-gray-300 select-md w-full border px-3 h-12 font-medium bg-white w-full",onChange:function(e){var t=e.target.value;r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{allowMultipleBookings:"true"===t})})}))},value:t.limits.allowMultipleBookings,children:[(0,o.jsx)("option",{className:"text-center",value:!1,children:"\u274c \u05d0\u05dc \u05ea\u05d0\u05e4\u05e9\u05e8"}),(0,o.jsx)("option",{className:"text-center",value:!0,children:"\u2705 \u05d0\u05e4\u05e9\u05e8"})]})})]})}),(0,o.jsx)("div",{className:"border text-sm rounded-sm p-3",children:(0,o.jsxs)("div",{className:"md:space-x-5 md:space-x-reverse flex md:justify-between items-start md:items-center flex-col md:flex-row space-y-3 md:space-y-0",children:[(0,o.jsxs)("div",{className:"md:w-1/2 space-y-1",children:[(0,o.jsxs)("label",{className:"font-bold flex items-center",children:[(0,o.jsx)("div",{className:"label-text md:text-base text-gray-800",children:"\u05de\u05ea\u05d9 \u05dc\u05e9\u05dc\u05d5\u05d7 \u05ea\u05d6\u05db\u05d5\u05e8\u05ea?"}),(0,o.jsx)("span",{className:"inline-flex items-center justify-center px-2 py-0.5 mr-2 text-xs font-bold leading-none text-white bg-blue-400 rounded-full",children:"\u05d7\u05d3\u05e9"})]}),(0,o.jsxs)("p",{className:"text-sm md:text-sm text-gray-700",children:["\u05d0\u05e0\u05d9 \u05e8\u
105d5\u05e6\u05d4 \u05e9\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05d9\u05e7\u05d1\u05dc\u05d5 \u05ea\u05d6\u05db\u05d5\u05e8\u05ea \u05d5\u05d1\u05e7\u05e9\u05d4 \u05dc\u05d0\u05e9\u05e8 \u05d4\u05d2\u05e2\u05d4 \u05db- ",(0,o.jsx)("strong",{className:"underline",children:w.text})," \u05dc\u05e4\u05e0\u05d9 \u05d4\u05ea\u05d5\u05e8."]})]}),(0,o.jsx)("div",{className:"w-full md:w-1/2",children:(0,o.jsx)("select",{className:"select select-bordered bg-white border border-gray-300 select-md w-full border px-3 h-12 font-medium bg-white w-full",onChange:function(e){var t=parseInt(e.target.value);n.reminderTimes.map((function(e){e.value===t&&N(e)})),r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{reminderTime:t})})}))},value:w.value,children:n.reminderTimes.map((function(e){return(0,o.jsx)("option",{className:"text-center",value:e.value,children:e.text},e.text)}))})})]})}),(0,o.jsx)(d,{title:"\u05d0\u05d9\u05e9\u05d5\u05e8 \u05ea\u05d5\u05e8\u05d9\u05dd \u05d9\u05d3\u05e0\u05d9",value:t.limits.approveAppointmentsManually,onChange:function(e){var n=e.target.value;t.limits.approveAppointmentsManually&&"false"===n?S(!0):r((function(e){return g(g({},e),{},{limits:g(g({},e.limits),{},{approveAppointmentsManually:"true"===n})})}))},options:[{value:!1,text:"\u274c \u05dc\u05d0 \u05e4\u05e2\u05d9\u05dc"},{value:!0,text:"\u2705 \u05e4\u05e2\u05d9\u05dc"}],children:"\u05d4\u05d0\u05dd \u05ea\u05e8\u05e6\u05d5 \u05dc\u05d0\u05e9\u05e8 \u05ea\u05d5\u05e8\u05d9\u05dd \u05d9\u05d3\u05e0\u05d9\u05ea \u05dc\u05e4\u05e0\u05d9 \u05e9\u05d4\u05dd \u05e0\u05db\u05e0\u05e1\u05d9\u05dd \u05dc\u05d9\u05d5\u05de\u05df \u05e9\u05dc\u05db\u05dd?"}),(0,o.jsx)(d,{title:"\u05e9\u05dc\u05d9\u05d7\u05ea \u05d4\u05d5\u05d3\u05e2\u05d4 \u05d1\u05e1\u05d9\u05d5\u05dd \u05ea\u05d5\u05e8",value:t.sendMessageAfterAppointment,onChange:function(e){var t=e.target.value;r((function(e){return g(g({},e),{},{sendMessageAfterAppointment:"true"===t})}))},options:[{value:!1,text:"\u274c \u05d0\u05dc \u05ea\u05e9\u05dc\u05d7"},{value:!0,text:"\u2705 \u05e9\u05dc\u05d7"}],children:"\u05d4\u05d0\u05dd \u05ea\u05e8\u05e6\u05d5 \u05dc\u05e9\u05dc\u05d5\u05d7 \u05d4\u05d5\u05d3\u05e2\u05d4 \u05dc\u05dc\u05e7\u05d5\u05d7 \u05d1\u05e1\u05d9\u05d5\u05dd \u05d4\u05ea\u05d5\u05e8 \u05dc\u05e7\u05d1\u05d9\u05e2\u05ea \u05ea\u05d5\u05e8 \u05d7\u05d3\u05e9?"}),(0,o.jsx)(v,{open:Z,setOpen:S,setTimeSettings:r})]})}},23083:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(92809),s=r(67294),a=r(85893);var i=function(e){var t=e.option,r=e.defaultValue,n=e.onTimeSelect,i=e.startTime,c=(0,s.useState)(r),l=c[0],o=c[1],u={hours:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],minutes:["00","05","10","15","20","25","30","35","40","45","50","55"]},d=[];return u.hours.map((function(e){u.minutes.map((function(t){d.push("".concat(e,":").concat(t))}))})),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"relative w-full md:w-20 ml-2 md:ml-0 cursor-pointer",children:[(0,a.jsx)("select",{onChange:function(e){var r=e.target.value;o(r),i?t.startTime=r:t.endTime=r,n(t)},className:"bg-white block w-full cursor-pointer appearance-none border border-gray-200 text-gray-700 p-1 md:pr-2 rounded leading-tight focus:outline-none sm:hover:border-gray-500 focus:border-gray-500",value:l,children:d.map((function(e){return(0,a.jsx)("option",{className:"text-right",value:e,children:e},e)}))}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center px-2 text-gray-700",children:(0,a.jsx)("svg",{className:"fill-current h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{d:"M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"})})})]})})},c=r(84823),l=r.n(c);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?o(Object(r),!0).forEach((function(t){(0,n.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=function(e){var t=e.timeSettings,r=e.setTimeSettings,n=[{day:1,active:!0,startTime:"08:00",endTime:"17:00"},{day:2,active:!0,startTime:"08:00",endTime:"17:00"},{day:3,active:!0,startTime:"08:00",endTime:"17:00"},{day:4,active:!0,startTime:"08:00",endTime:"17:00"},{day:5,active:!0,startTime:"08:00",endTime:"17:00"},{day:6,active:!0,startTime:"08:00",endTime:"13:00"},{day:7,active:!1,startTime:"08:00",endTime:"17:00"}],c=(0,s.useState)(t.availability.length>0?t.availability:n),o=c[0],d=c[1];function p(e){r((function(t){return u(u({},t),{},{availability:e})}))}(0,s.useEffect)((function(){p(t.availability.length>0?t.availability:n)}),[]);var m=function(e){var t=o.map((function(t){return t.day===e.day?e:t}));d(t),p(t)};return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"border text-sm rounded-sm",children:[(0,a.jsxs)("div",{className:"grid grid-cols-4 bg-gray-100 mb-1  font-medium",children:[(0,a.jsx)("div",{className:"h-8 flex items-center justify-center",children:"\u05d9\u05d5\u05dd"}),(0,a.jsx)("div",{className:"h-8 flex items-center justify-center",children:"\u05e4\u05ea\u05d5\u05d7?"}),(0,a.jsx)("div",{className:"h-8 flex items-center justify-center",children:"\u05e4\u05ea\u05d9\u05d7\u05d4"}),(0,a.jsx)("div",{className:"h-8 flex items-center justify-center",children:"\u05e1\u05d2\u05d9\u05e8\u05d4"})]}),(0,a.jsx)("div",{className:"space-y-2 text-sm",children:o.map((function(e){return(0,a.jsxs)("div",{className:"grid grid-cols-4 ".concat(!e.active&&"bg-gray-200 opacity-50"),children:[(0,a.jsx)("div",{className:"h-8 flex items-center justify-center text-right text-sm",children:l().getDayName(e.day)}),(0,a.jsx)("div",{className:"h-8 flex items-center justify-center ",children:(0,a.jsx)("div",{className:"direction-ltr form-control",children:(0,a.jsxs)("label",{className:"cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:e.active,onChange:function(){return function(e){var t=o.map((function(t){return t.day===e?u(u({},t),{},{active:!t.active}):t}));d(t),p(t)}(e.day)},className:"toggle toggle-accent "}),(0,a.jsx)("span",{className:"toggle-mark bg-gray-400"})]})})}),(0,a.jsx)("div",{className:"h-8 flex items-center justify-center text-sm text-center",children:e.active?(0,a.jsx)(i,{defaultValue:e.startTime,onTimeSelect:m,option:e,startTime:!0}):"\u05e1\u05d2\u05d5\u05e8"}),(0,a.jsx)("div",{className:"h-8 flex items-center justify-center text-sm text-center",children:e.active?(0,a.jsx)(i,{defaultValue:e.endTime,onTimeSelect:m,option:e}):"\u05e1\u05d2\u05d5\u05e8"})]},e.day)}))})]})})}},79977:function(e,t,r){"use strict";r(67294);var n=r(85893);t.Z=function(){return(0,n.jsxs)("div",{className:"animate-pulse divide-y",children:[(0,n.jsxs)("div",{className:"flex items-center w-full px-4 py-3",children:[(0,n.jsx)("div",{className:"inline-block h-full rounded-full bg-white flex-shrink-0",children:(0,n.jsx)("div",{className:"w-8 h-8 bg-gray-200 rounded-full"})}),(0,n.jsx)("div",{className:"mr-4",children:(0,n.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,n.jsx)("div",{className:"h-3 bg-gray-200 rounded-full w-36"}),(0,n.jsx)("div",{className:"text-gray-400 font-medium tracking-tight text-sm",children:(0,n.jsx)("div",{className:"h-2 bg-gray-200 rounded-full w-24"})})]})})]}),(0,n.jsxs)("div",{className:"flex items-center w-full px-4 py-3",children:[(0,n.jsx)("div",{className:"inline-block h-full rounded-full bg-white flex-shrink-0",children:(0,n.jsx)("div",{className:"w-8 h-8 bg-gray-200 rounded-full"})}),(0,n.jsx)("div",{className:"mr-4",children:(0,n.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,n.jsx)("div",{className:"h-3 bg-gray-200 rounded-full w-36"}),(0,n.jsx)("div",{className:"text-gray-400 font-medium tracking-tight text-sm",children:(0,n.jsx)("div",{className:"h-2 bg-gray-200 rounded-full w-24"})})]})})]}),(0,n.jsxs)("div",{className:"flex items-center w-full px-4 py-3",children:[(0,n.jsx)("div",{className:"inline-block h-full rounded-full bg-white flex-shrink-0",children:(0,n.jsx)("div",{className:"w-8 h-8 bg-gray-200 rounded-full"})}),(0,n.jsx)("div",{className:"mr-4",children:(0,n.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,n.jsx)("div",{className:"h-3 bg-gray-200 rounded-full w-36"}),(0,n.jsx)("div",{className:"text-gray-400 font-medium tracking-tight text-sm",children:(0,n.jsx)("div",{className:"h-2 bg-gray-200 rounded-full w-24"})})]})})]})]})}},28133:function(e,t,r){"use strict";r(67294);var n=r(93181),s=r(85893);t.Z=function(e){var t=e.children,r=e.spin,a=e.size;return(0,s.jsx)("span",{className:"flex justify-center items-center",children:r?(0,s.jsx)(n.frZ,{className:"animate-spin",size:a||20}):(0,s.jsx)("span",{children:t})})}},51727:function(e,t,r){"use strict";var n=r(67294),s=r(73949),a=r(33297),i=r(85893);t.Z=function(e){var t=e.open,r=e.setOpen,c=e.children;return(0,i.jsx)(s.u.Root,{show:t,as:n.Fragment,children:(0,i.jsx)(a.V,{as:"div",static:!0,className:"fixed inset-0 z-50 overflow-y-auto flex justify-center items-center",open:t,onClose:r,children:(0,i.jsxs)("div",{className:"flex items-end justify-center pt-4 px-4 pb-20 text-center sm:block sm:p-0 w-full max-w-md",children:[(0,i.jsx)(s.u.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,i.jsx)(a.V.Overlay,{className:"fixed inset-0 bg-black bg-opacity-75 transition-opacity"})}),(0,i.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"\u200b"}),(0,i.jsx)(s.u.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,i.jsx)("div",{className:"inline-block align-bottom bg-white rounded-lg overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle w-full",children:(0,i.jsx)("div",{className:"bg-white px-4 py-5 sm:p-6 w-full",children:(0,i.jsx)("div",{className:"relative bg-white rounded w-full mx-auto text-right",children:c})})})})]})})})}},62836:function(e,t,r){"use strict";var n=r(67294),s=r(52091),a=r(85893);t.Z=function(e){var t=e.value,r=e.changeHandler,i=e.steps,c=(0,n.use
1State)(t),l=c[0],o=c[1];return(0,n.useEffect)((function(){o(t)}),[t]),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("button",{className:"btn btn-square btn-md rounded-l-none",onClick:function(e){e.preventDefault();var t=parseInt(l+=i||1);o(t),r(t)},children:(0,a.jsx)(s.wEH,{})}),(0,a.jsx)("input",{type:"text",pattern:"\\d*",onChange:function(e){if(""!=e.target.value&&e.target.value){if(!isNaN(e.target.value)){var n=parseInt(e.target.value);o(n),r(n)}}else o(t),r(t)},value:l||25,className:"border-t direction-ltr border-b border-gray-300 w-full rounded-none text-center text-base"}),(0,a.jsx)("button",{className:"btn btn-square btn-md rounded-r-none",onClick:function(e){e.preventDefault();var t=parseInt(l-=i||1);o(t),r(t)},children:(0,a.jsx)(s.iFH,{})})]})})}},29703:function(e,t,r){"use strict";r.d(t,{u:function(){return b},E:function(){return j}});var n=r(30266),s=r(809),a=r.n(s),i=r(67294),c=r(51721),l=r(28739),o=r(96486),u=r.n(o),d=r(53254),p=r(85893),m=d.ERRORS.INVALID_PHONE,x=d.ERRORS.ALREADY_EXISTS,f=d.ERRORS.PAYMENT_ALREADY_COMPLETE,v=d.ERRORS.INVALID_EMAIL,h=d.ERRORS.EMPTY_NAME,g=(0,i.createContext)({});c.ZP.interceptors.request.use((function(e){return console.log("Axios Request:",e.method,e.url,e.data),e}),(function(e){return Promise.reject(e)})),c.ZP.interceptors.response.use((function(e){return console.log("Axios Response:",e.config.url,e.status,e.statusText,e.data),e}),(function(e){return console.log("Axios Error:",e),Promise.reject(e)}));var b=function(e){var t=e.children,r=(0,i.useState)(!1),s=r[0],o=r[1],d=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.details,n=t.timeSettings,o(!0),e.prev=2,e.next=5,c.ZP.post("/api/business/",{details:r,timeSettings:n});case 5:e.sent,o(!1),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(2),console.log("failed to update business",e.t0.toString(),e.t0),l.Am.error("\u05e2\u05d3\u05db\u05d5\u05df \u05e4\u05e8\u
105d8\u05d9 \u05d4\u05e2\u05e1\u05e7 \u05e0\u05db\u05e9\u05dc. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4."),o(!1);case 14:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/services/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get services",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.service,n=t.serviceProviders,o(!0),e.prev=2,e.next=5,c.ZP.post("/api/business/services/",{service:r,serviceProviders:n});case 5:return s=e.sent,o(!1),e.abrupt("return",s);case 10:e.prev=10,e.t0=e.catch(2),console.log("failed to add service",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05d5\u05e1\u05e4\u05ea \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4."),o(!1);case 15:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.serviceId,e.prev=1,e.next=4,c.ZP.delete("/api/business/services/".concat(r,"/"));case 4:return n=e.sent,e.abrupt("return",n);case 8:e.prev=8,e.t0=e.catch(1),console.log("failed to delete service",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05de\u05d7\u05d9\u05e7\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.serviceId,n=t.service,s=t.serviceProviders,o(!0),e.prev=2,e.next=5,c.ZP.post("/api/business/services/".concat(r,"/"),{service:n,serviceProviders:s});case 5:return i=e.sent,o(!1),e.abrupt("return",i);case 10:e.prev=10,e.t0=e.catch(2),console.log("failed to update service",e.t0.toString(),e.t0),l.Am.error("\u05e2\u05d3\u05db\u05d5\u05df \u05d4\u05e9\u05d9\u05e8\u05d5\u05ea \u05e0\u05db\u05e9\u05dc. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4."),o(!1);case 15:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/wizardComplete/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to complete wizard",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),k=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.group,n=t.day,s=t.serviceProvider,e.prev=1,e.next=4,c.ZP.get("/api/business/appointments/?group=".concat(r).concat(n?"&day="+n:"").concat(s?"&serviceProvider="+s:""));case 4:return i=e.sent,e.abrupt("return",i);case 8:e.prev=8,e.t0=e.catch(1),console.log("failed to get appointments",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),Z=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business".concat(t));case 3:return r=e.sent,e.abrupt("return",u().get(r,"data.events.docs",[]));case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get events",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,n.Z)(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/pendingAppointments/");case 3:return t=e.sent,r=t.data,e.abrupt("return",r);case 8:throw e.prev=8,e.t0=e.catch(0),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business".concat(t));case 3:return r=e.sent,e.abrupt("return",u().get(r,"data",[]));case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get product updates",e.t0.toString(),e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/stats/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get stats",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get stats",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api".concat(t));case 3:return r=e.sent,e.abrupt("return",u().get(r,"data",[]));case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get search results",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/customers/totalCustomers/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get total customers",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/customers/".concat(t,"/"));case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:throw e.prev=8,e.t0=e.catch(0),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s,i,o,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/customers/".concat(t,"/"),r);case 3:return n=e.sent,e.abrupt("return",n);case 7:e.prev=7,e.t0=e.catch(0),i="\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.",400===(null===(s=e.t0.response)||void 0===s?void 0:s.status)&&((null===(o=e.t0.response)||void 0===o?void 0:o.data)===h?i="\u05d0\u05e0\u05d0 \u05d4\u05d6\u05d9\u05e0\u05d5 \u05e9\u05dd \u05de\u05dc\u05d0":(null===(u=e.t0.response)||void 0===u?void 0:u.data)===v&&(i="\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05de\u05d9\u05d9\u05dc \u05dc\u05d0 \u05ea\u05e7\u05e0\u05d9\u05ea")),l.Am.error(i);case 12:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}(),z=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.delete("/api/business/customers/".concat(t,"/"));case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to delete customer",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.start,n=t.end,e.prev=1,e.next=4,c.ZP.get("/api/business/stats/total/?start=".concat(r,"&end=").concat(n));case 4:return s=e.sent,i=s.data,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(1),e.t0;case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/settings/updateBusinessDetail
1s/",t);case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),n="\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.","invalid phone"===e.t0.response.data.error&&(n="\u05de\u05e1\u05f3 \u05d4\u05d8\u05dc\u05e4\u05d5\u05df \u05e9\u05d4\u05d5\u05d6\u05df \u05d0\u05d9\u05e0\u05d5 \u05ea\u05e7\u05d9\u05df"),console.log("failed to save details",e.t0.toString(),e.t0),l.Am.error(n);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/settings/updateGeneralSettings/",t);case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:e.prev=8,e.t0=e.catch(0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/settings/updateSocialLinks/",t);case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to save socialLinks",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),B=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/settings/updateTimeSettings/",t);case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:e.prev=8,e.t0=e.catch(0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.serviceProviderId,n=t.available,e.prev=1,e.next=4,c.ZP.post("/api/business/staff/toggleAvailability/",{serviceProviderId:r,available:n});case 4:return s=e.sent,e.abrupt("return",s);case 8:e.prev=8,e.t0=e.catch(1),console.log("failed to save toggleAvailability",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.serviceId,n=t.available,e.prev=1,e.next=4,c.ZP.post("/api/business/services/toggleAvailability/",{serviceId:r,available:n});case 4:return s=e.sent,e.abrupt("return",s);case 8:e.prev=8,e.t0=e.catch(1),console.log("failed to save toggleServiceAvailability",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),H=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i,o,u,d,p;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.firstName,n=t.lastName,s=t.email,i=t.phone,e.prev=1,e.next=4,c.ZP.post("/api/business/staff/",{firstName:r,lastName:n,email:s,phone:i});case 4:return o=e.sent,e.abrupt("return",o);case 8:e.prev=8,e.t0=e.catch(1),console.log("failed to addServiceProvider",e.t0.toString(),e.t0),d="\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.",400===(null===e.t0||void 0===e.t0||null===(u=e.t0.response)||void 0===u?void 0:u.status)&&((p=e.t0.response.data)===m?d="\u05de\u05e1\u05e4\u05e8 \u05d4\u05d8\u05dc\u05e4\u05d5\u05df \u05e9\u05d4\u05d5\u05d6\u05df \u05dc\u05d0 \u05ea\u05e7\u05d9\u05df":p===x&&(d="\u05d0\u05d9\u05e9 \u05d4\u05e6\u05d5\u05d5\u05ea \u05db\u05d1\u05e8 \u05e8\u
105e9\u05d5\u05dd \u05d1\u05e6\u05d5\u05d5\u05ea")),l.Am.error(d);case 14:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i,o,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.customer,e.prev=1,e.next=4,c.ZP.put("/api/business/customers/",r);case 4:return n=e.sent,e.abrupt("return",n);case 8:e.prev=8,e.t0=e.catch(1),i="\u05d0\u05d5\u05e4\u05e1... \u05d1\u05d3\u05e7\u05d5 \u05e9\u05db\u05dc \u05d4\u05e4\u05e8\u05d8\u05d9\u05dd (\u05d5\u05d4\u05d8\u05dc\u05e4\u05d5\u05df) \u05e9\u05d4\u05d6\u05e0\u05ea\u05dd \u05ea\u05e7\u05d9\u05e0\u05d9\u05dd \u05d5\u05e0\u05e1\u05d5 \u05e9\u05e0\u05d9\u05ea",400===(null===(s=e.t0.response)||void 0===s?void 0:s.status)&&((null===(o=e.t0.response)||void 0===o?void 0:o.data)===m?i="\u05de\u05e1\u05e4\u05e8 \u05d4\u05d8\u05dc\u05e4\u05d5\u05df \u05e9\u05d4\u05d5\u05d6\u05df \u05d0\u05d9\u05e0\u05d5 \u05ea\u05e7\u05d9\u05df":(null===(u=e.t0.response)||void 0===u?void 0:u.data)===v&&(i="\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05de\u05d9\u05d9\u05dc \u05dc\u05d0 \u05ea\u05e7\u05e0\u05d9\u05ea")),l.Am.error(i);case 13:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i,l,o,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.day,n=t.serviceProviderId,s=t.serviceLength,i=t.currentDateTime,e.prev=1,l={day:r,serviceProviderId:n,serviceLength:s},i&&(l.currentDateTime=i),e.next=6,c.ZP.post("/api/business/calendar/checkAvailability/",l);case 6:return o=e.sent,u=o.data,e.abrupt("return",u);case 11:throw e.prev=11,e.t0=e.catch(1),"\u05e0\u05e8\u05d0\u05d4 \u05e9\u05de\u05e9\u05d4\u05d5 \u05d4\u05e9\u05ea\u05d1\u05e9, \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4";case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}(),q=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.put("/api/business/appointments/",t);case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:e.prev=8,e.t0=e.catch(0),console.log("failed to book manual appointment",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/appointments/".concat(t,"/cancel/"));case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to cancel appointment",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),V=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/appointments/".concat(t,"/resendDetails/"));case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to resend appointment details",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),W=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/appointments/".concat(t,"/"),r);case 3:return n=e.sent,s=n.data,e.abrupt("return",s);case 8:e.prev=8,e.t0=e.catch(0),console.log("failed to update appointment",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,r){return e.apply(this,arguments)}}(),K=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.delete("/api/business/appointments/".concat(t,"/"));case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to delete appointment",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),e.prev=1,e.next=4,c.ZP.get("/api/business".concat(t));case 4:return r=e.sent,e.abrupt("return",r);case 8:e.prev=8,e.t0=e.catch(1),console.log("failed to get daysWithAppointments",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.put("/api/business/availability/",t);case 3:return r=e.sent,e.abrupt("return",r);case 7:if(e.prev=7,e.t0=e.catch(0),console.log("failed to add availability",e.t0.toString(),e.t0),400!==(null===e.t0||void 0===e.t0||null===(n=e.t0.response)||void 0===n?void 0:n.status)){e.next=14;break}throw e.t0.response.data;case 14:l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 15:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),X=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/availability/".concat(t._id,"/"),t);case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to update availability",e.t0.toString(),e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/availability/".concat("holiday"===t?"?type=".concat(t,"&serviceProviderId=").concat(r):""));case 3:return n=e.sent,e.abrupt("return",u().get(n,"data",[]));case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get availability",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}(),ee=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/availability/",{availabilityId:t});case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to toggle availability",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),te=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.delete("/api/business/availability/".concat(t));case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to delete availability",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),re=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r||(r=t),e.prev=1,e.next=4,c.ZP.get("https://www.hebcal.com/hebcal/?v=1&cfg=json&maj=on&mod=on&lg=h&start=".concat(t,"&end=").concat(r));case 4:if(!(n=e.sent)||!n.data){e.next=7;break}return e.abrupt("return",u().get(n,"data.items",[]));case 7:return e.abrupt("return",[]);case 10:e.prev=10,e.t0=e.catch(1),console.log("failed to getPublicHolidays",e.t0.toString(),e.t0),r&&l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 14:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(t,r){return e.apply(this,arguments)}}(),ne=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/marketing/publicMessage/",t);case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:e.prev=8,e.t0=e.catch(0),console.log("failed to save marketing options",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),se=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/marketing/popup/",t);case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:e.prev=8,e.t0=e.catch(0),console.log("failed to save marketing options",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/marketing/happyBirthdayMessage/",{shouldActivate:t});case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:e.prev=8,e.t0=e.catch(0),console.log("failed to save marketing options",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/billing/plan/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get account details",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.put("/api/business/marketing/smsCampaigns/",t);case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to send bulk messages",e.t0.toString()),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/marketing/smsCampaigns/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get campaigns",e.t0.toString()),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.planName,n=t.upgrade,s=t.changeCard,i=t.hasDebt,e.prev=1,e.next=4,c.ZP.post("/api/business/billing/selectPlan/",{planName:r,upgrade:n,changeCard:s,hasDebt:i});case 4:return o=e.sent,e.abrupt("return",o);case 8:e.prev=8,e.t0=e.catch(1),console.log("failed to get checkout URL",e.t0.toString()),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/billing/plan/cancel/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to getPlanCancelDetails",e.t0.toString()),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),de=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.newPlan,n=t.isDowngrading,e.prev=1,e.next=4,c.ZP.post("/api/business/billing/plan/upgrade/",{newPlan:r,isDowngrading:n});case 4:return s=e.sent,e.abrupt("return",s);case 8:e.prev=8,e.t0=e.catch(1),console.log("failed to get checkout URL",e.t0.toString()),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),pe=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/billing/plan/cancel/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to executePlanCancel",e.t0.toString()),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),me=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/services/".concat(t,"/archive/"));case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to archive service",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),xe=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next
1){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/staff/".concat(t,"/"));case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get service provider details",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s,i,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/staff/".concat(t,"/"),r);case 3:return n=e.sent,s=n.data,e.abrupt("return",s);case 8:throw e.prev=8,e.t0=e.catch(0),l="\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.",400===(null===e.t0||void 0===e.t0||null===(i=e.t0.response)||void 0===i?void 0:i.status)&&(l="\u05d4\u05e4\u05e8\u
105d8\u05d9\u05dd \u05e9\u05d4\u05d5\u05d6\u05e0\u05d5 \u05dc\u05d0 \u05ea\u05e7\u05d9\u05e0\u05d9\u05dd, \u05d0\u05e0\u05d0 \u05d1\u05d3\u05e7\u05d5 \u05d0\u05d5\u05ea\u05dd \u05d5\u05e0\u05e1\u05d5 \u05e9\u05e0\u05d9\u05ea"),l;case 13:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,r){return e.apply(this,arguments)}}(),ve=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/staff/".concat(t,"/archive/"));case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to archive service provider",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),he=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/services/updateOrder/",t);case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to update service order",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),ge=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/stats/reports/exportTaxReports/",t);case 3:return r=e.sent,e.abrupt("return",r);case 7:return e.prev=7,e.t0=e.catch(0),console.log("failed to exportTaxReports",e.t0.toString(),e.t0),e.abrupt("return",e.t0.response&&e.t0.response.data.error?e.t0.response.data:{error:e.t0});case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),be=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/stats/reports/exportAppointmentsReports/",t);case 3:return r=e.sent,e.abrupt("return",r);case 7:return e.prev=7,e.t0=e.catch(0),console.log("failed to exportAppointmentsReports",e.t0.toString(),e.t0),e.abrupt("return",e.t0.response&&e.t0.response.data.error?e.t0.response.data:{error:e.t0});case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),je=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/stats/reports/exportCustomersReports/",{});case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),console.log("failed to exportCustomersReports",e.t0.toString(),e.t0),e.abrupt("return",e.t0.response&&e.t0.response.data.error?e.t0.response.data:{error:e.t0});case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/billing/invoices/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get invoices",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),we=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/billing/debtDetails/");case 3:return t=e.sent,e.abrupt("return",t);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get debt details",e.t0.toString(),e.t0),l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d4 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),Ne=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/availability/holidayAvailabilities",t);case 3:return r=e.sent,e.abrupt("return",r);case 7:if(e.prev=7,e.t0=e.catch(0),console.log("failed to update service provider details",e.t0.toString(),e.t0),400!==(null===e.t0||void 0===e.t0||null===(n=e.t0.response)||void 0===n?void 0:n.status)){e.next=14;break}throw new Error("\u05d0\u05d5\u05e4\u05e1... \u05e0\u05e8\u05d0\u05d4 \u05e9\u05e9\u05e2\u05ea \u05d4\u05d4\u05ea\u05d7\u05dc\u05d4 \u05e9\u05d1\u05d7\u05e8\u05ea\u05dd \u05d4\u05d9\u05d0 *\u05d0\u05d7\u05e8\u05d9* \u05e9\u05e2\u05ea \u05d4\u05e1\u05d9\u05d5\u05dd (\u05d5\u05dc\u05d0 \u05d4\u05d4\u05d9\u05e4\u05da). \u05d1\u05e6\u05e2\u05d5 \u05d0\u05ea \u05d4\u05e9\u05d9\u05e0\u05d5\u05d9 \u05d5\u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1");case 14:l.Am.error("\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 15:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),ke=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/availability/holidayAvailabilities/?selectedDate=".concat(t));case 3:return r=e.sent,e.abrupt("return",r.data);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get holiday availability",e.t0.toString(),e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),Ze=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/smsMessage/?shipmentId=".concat(t));case 3:return r=e.sent,e.abrupt("return",r.data);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to get holiday availability",e.t0.toString(),e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),Se=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],e.prev=1,e.next=4,c.ZP.post("/api/business/messages/",{message:t,tagIds:r});case 4:return n=e.sent,e.abrupt("return",n.data);case 8:if(e.prev=8,e.t0=e.catch(1),400!==(null===e.t0||void 0===e.t0||null===(s=e.t0.response)||void 0===s?void 0:s.status)){e.next=14;break}throw e.t0.response.data;case 14:throw"\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.";case 15:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),Pe=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i,l=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>1&&void 0!==l[1]&&l[1],e.prev=1,e.next=4,c.ZP.put("/api/business/groups/singleGroup/",{group:t,approved:r});case 4:return n=e.sent,s=n.data,e.abrupt("return",s);case 9:if(e.prev=9,e.t0=e.catch(1),400!==(null===e.t0||void 0===e.t0||null===(i=e.t0.response)||void 0===i?void 0:i.status)){e.next=15;break}throw e.t0.response.data;case 15:throw"\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.";case 16:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),Ce=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],e.prev=1,e.next=4,c.ZP.put("/api/business/groups/recurringGroup/",{group:t,approvedEvents:r});case 4:return n=e.sent,s=n.data,e.abrupt("return",s);case 9:throw e.prev=9,e.t0=e.catch(1),"\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.";case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),Ae=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i,l=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>1&&void 0!==l[1]&&l[1],e.prev=1,e.next=4,c.ZP.post("/api/business/groups/singleGroup/",{group:t,approved:r});case 4:return n=e.sent,s=n.data,e.abrupt("return",s);case 9:if(e.prev=9,e.t0=e.catch(1),400!==(null===e.t0||void 0===e.t0||null===(i=e.t0.response)||void 0===i?void 0:i.status)){e.next=15;break}throw e.t0.response.data;case 15:throw"\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.";case 16:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),Te=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],e.prev=1,e.next=4,c.ZP.post("/api/business/groups/recurringGroup/",{group:t,approvedEvents:r});case 4:return n=e.sent,s=n.data,e.abrupt("return",s);case 9:throw e.prev=9,e.t0=e.catch(1),"\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.";case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),Oe=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/groups/".concat(t,"/informRegisteredCustomers/?seriesId=").concat(r));case 3:return n=e.sent,s=n.data,l.Am.success("\u05d4\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05e2\u05d5\u05d3\u05db\u05e0\u05d5 \u05d1\u05d4\u05e6\u05dc\u05d7\u05d4"),e.abrupt("return",s);case 9:e.prev=9,e.t0=e.catch(0),l.Am.error("\u05e9\u05dc\u05d9\u05d7\u05ea \u05d4\u05d4\u05d5\u05d3\u05e2\u05d5\u05ea \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.");case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,r){return e.apply(this,arguments)}}(),De=function(){var e=(0,n.Z)(a().mark((function e(t,r){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.delete("/api/business/groups/".concat(t,"/?seriesId=").concat(r));case 3:e.next=8;break;case 5:throw e.prev=5,e.t0=e.catch(0),"\u05dc\u05d0 \u05d4\u05e6\u05dc\u05d7\u05e0\u05d5 \u05dc\u05d1\u05d8\u05dc \u05d0\u05ea \u05d4\u05e9\u05d9\u05e2\u05d5\u05e8. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4";case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t,r){return e.apply(this,arguments)}}(),Ee=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/groups/".concat(r,"/register"),{customerId:t});case 3:return n=e.sent,s=n.data,e.abrupt("return",s);case 8:throw e.prev=8,e.t0=e.catch(0),console.log("err:",e.t0),"\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.";case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,r){return e.apply(this,arguments)}}(),ze=function(){var e=(0,n.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/groups/".concat(t,"/resendDetails/"));case 3:e.next=9;break;case 5:throw e.prev=5,e.t0=e.catch(0),console.log("Failed to resend group details",e.t0.toString(),e.t0),e.t0.response.data;case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}(),_e=function(){var e=(0,n.Z)(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/staff/");case 3:return t=e.sent,r=t.data,e.abrupt("return",r);case 8:e.prev=8,e.t0=e.catch(0),console.log("ex:",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),Ie=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s,i,l,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/appointments/".concat(t,"/payment"),{appointmentId:t,paymentDetails:r});case 3:return n=e.sent,s=n.data,e.abrupt("return",s);case 8:throw e.prev=8,e.t0=e.catch(0),console.log("err:",e.t0),o="\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.",400===(null===(i=e.t0.response)||void 0===i?void 0:i.status)&&(null===(l=e.t0.response)||void 0===l?void 0:l.data)===f&&(o="\u05d4\u05dc\u05e7\u05d5\u05d7 \u05db\u05d1\u05e8 \u05d7\u05d5\u05d9\u05d1 \u05e2\u05dc \u05ea\u05d5\u05e8 \u05d6\u05d4 \u05d1\u05e2\u05d1\u05e8"),o;case 14:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,r){return e.apply(this,arguments)}}(),Re=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/marketing/customTextMessage",{message:t,type:r});case 3:return n=e.sent,s=n.data,e.abrupt("return",s);case 8:if(e.prev=8,e.t0=e.catch(0),400!==(null===(i=e.t0.response)||void 0===i?void 0:i.status)){e.next=12;break}throw"\u05d9\u05e9 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05db\u05dc \u05d4\u05e4\u05e8\u
105de\u05d8\u05e8\u05d9\u05dd \u05dc\u05d4\u05d5\u05d3\u05e2\u05d4";case 12:throw"\u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e0\u05db\u05e9\u05dc\u05d4. \u05e0\u05e1\u05d5 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8 \u05d0\u05d5 \u05e4\u05e0\u05d5 \u05dc\u05ea\u05de\u05d9\u05db\u05d4.";case 13:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,r){return e.apply(this,arguments)}}(),Me=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.appointmentId,n=t.shouldApprove,e.prev=1,e.next=4,c.ZP.put("/api/business/appointments/".concat(r,"/updateBusinessApprovalStatus"),{shouldApprove:n});case 4:return s=e.sent,i=s.data,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(1),e.t0;case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),Be=function(){var e=(0,n.Z)(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/googleCalendar/oauth/");case 3:return t=e.sent,r=t.data,e.abrupt("return",r);case 8:throw e.prev=8,e.t0=e.catch(0),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),Le=function(){var e=(0,n.Z)(a().mark((function e(){var t,r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/googleCalendar/sync/");case 3:return t=e.sent,r=t.data,e.abrupt("return",r);case 8:if(e.prev=8,e.t0=e.catch(0),400!==(null===(n=e.t0.response)||void 0===n?void 0:n.status)){e.next=14;break}throw"authError";case 14:throw"serverError";case 15:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),Fe=function(){var e=(0,n.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/googleCalendar/cancelSync/");case 3:e.next=8;break;case 5:throw e.prev=5,e.t0=e.catch(0),e.t0;case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),He=function(){var e=(0,n.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/marketing/termsAndConditions/",t);case 3:e.next=8;break;case 5:throw e.prev=5,e.t0=e.catch(0),e.t0;case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}(),Ge=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.usedOnly,n=void 0!==r&&r,e.prev=1,e.next=4,c.ZP.get("/api/business/customerTags/?usedOnly=".concat(n));case 4:return s=e.sent,i=s.data,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(1),e.t0;case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),Ue=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.put("/api/business/customerTags/",{title:t});case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:throw e.prev=8,e.t0=e.catch(0),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),qe=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("updateCustomerTag",t,r),e.prev=1,e.next=4,c.ZP.post("/api/business/customerTags/".concat(t,"/"),{title:r});case 4:return n=e.sent,s=n.data,e.abrupt("return",s);case 9:throw e.prev=9,e.t0=e.catch(1),e.t0;case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t,r){return e.apply(this,arguments)}}(),Ye=function(){var e=(0,n.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.delete("/api/business/customerTags/".concat(t,"/"));case 3:e.next=8;break;case 5:throw e.prev=5,e.t0=e.catch(0),e.t0;case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}(),Ve=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.appointmentId,n=t.attendedStatus,e.prev=1,e.next=4,c.ZP.post("/api/business/appointments/".concat(r,"/updateAttendedStatus"),{attendedStatus:n});case 4:e.next=9;break;case 6:throw e.prev=6,e.t0=e.catch(1),e.t0;case 9:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}(),We=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,s,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.startDate,n=t.endDate,e.prev=1,e.next=4,c.ZP.post("/api/business/stats/reports/exportAttendedReport",{startDate:r,endDate:n});case 4:return s=e.sent,i=s.data,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(1),e.t0;case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),Ke=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.appointmentId,n=t.attendanceComment,e.prev=1,e.next=4,c.ZP.post("/api/business/appointments/".concat(r,"/attendanceComment"),{attendanceComment:n});case 4:e.next=9;break;case 6:throw e.prev=6,e.t0=e.catch(1),e.t0;case 9:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}(),$e=function(){var e=(0,n.Z)(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.get("/api/business/licenseAgreement/");case 3:return t=e.sent,r=t.data,e.abrupt("return",r);case 8:throw e.prev=8,e.t0=e.catch(0),console.log("failed to get license agreement status",e.t0.toString(),e.t0),e.t0;case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),Qe=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/business/licenseAgreement/",{agreementVersion:t});case 3:return r=e.sent,n=r.data,e.abrupt("return",n);case 8:throw e.prev=8,e.t0=e.catch(0),console.log("failed to accept license agreement",e.t0.toString(),e.t0),e.t0;case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}();return(0,p.jsx)(g.Provider,{value:{getLicenseAgreementStatus:$e,acceptLicenseAgreement:Qe,updateBusiness:d,addNewService:j,get
1Services:b,deleteService:y,updateService:w,setWizardComplete:N,getWorkEvents:k,getEventsFeed:Z,getStatsBox:C,getBusinessDetails:A,searchCustomers:T,getTotalCustomers:O,getCustomer:D,updateCustomer:E,deleteCustomer:z,getTotalStats:_,saveBusinessDetails:I,updatePublicMessage:ne,saveGeneralSettings:R,updateSocialLinks:M,updateTimeSettings:B,toggleServiceProviderAvailability:L,toggleServiceAvailability:F,addServiceProvider:H,createNewCustomer:G,getBusinessAvailableTimes:U,addManualAppointment:q,getDaysWithWork:$,cancelAppointment:Y,updateAppointment:W,deletePastAppointment:K,getProductUpdates:P,addAvailability:Q,updateAvailability:X,getAvailabilities:J,toggleAvailabilityStatus:ee,deleteAvailability:te,getPublicHolidays:re,getSubscriptionInfo:ie,updateOrder:he,getServiceProvider:xe,archiveServiceProvider:ve,updateServiceProvider:fe,loading:s,sendBulkMessages:ce,getSMSCampaigns:le,getPlanCheckoutURL:oe,executePlanUpgrade:de,archiveService:me,exportTaxReports:ge,exportAppointmentsReports:be,exportCustomersReports:je,getBusinessInvoices:ye,getPlanCancelDetails:ue,executePlanCancel:pe,resendAppointmentDetails:V,getDebtDetails:we,saveHolidayAvailabilities:Ne,getHolidayAvailability:ke,getSmsReminder:Ze,sendMessageToCustomers:Se,getServiceProviders:_e,updateCustomPopup:se,addSingleGroup:Pe,addRecurringGroup:Ce,cancelGroup:De,addCustomerToGroup:Ee,resendGroupDetails:ze,updateSingleGroup:Ae,updateRecurringGroup:Te,informRegisteredCustomersOnGroupUpdate:Oe,updateHappyBirthdaySetting:ae,handleAppointmentPayment:Ie,updateCustomTextMessage:Re,updateBusinessApprovalStatus:Me,getPendingAppointments:S,getOauthUrl:Be,syncGoogleCalendar:Le,cancelGoogleCalendarSync:Fe,saveTermsAndConditions:He,getCustomerTags:Ge,createCustomerTag:Ue,updateCustomerTag:qe,deleteCustomerTag:Ye,updateAttendedStatus:Ve,exportAttendedReport:We,saveAttendanceComment:Ke},children:t})},j=function(){return(0,i.useContext)(g)}},25135:function(e,t,r){"use strict";r.d(t,{H:function(){return m},a:function(){return x}});var n=r(30266),s=r(809),a=r.n(s),i=r(67294),c=r(11163),l=r(51721),o=r(57378),u=r(28739),d=r(85893),p=(0,i.createContext)({}),m=function(e){var t=e.children,r="/app/login";"/app/signup"===(0,c.useRouter)().pathname&&(r=null);var s=(0,o.Z)({redirectTo:r}),m=s.user,x=s.mutateUser,f=(0,i.useState)(null),v=f[0],h=f[1],g=(0,i.useState)(!1),b=g[0],j=g[1];(0,i.useEffect)((function(){m&&m.isLoggedIn&&h(m)}),[]);var y=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.ZP.post("/api/auth/login/",{phone:t});case 3:return r=e.sent,e.abrupt("return",r);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to login",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,n.Z)(a().mark((function e(t){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(!0),e.prev=1,e.next=4,l.ZP.post("/api/auth/signup/",t);case 4:if(!(r=e.sent).data){e.next=12;break}if(!r.data.sentCode){e.next=11;break}return j(!1),e.abrupt("return",!0);case 11:r.data.exists&&u.Am.error("\u05de\u05e1\u05f3 \u05d4\u05d8\u05dc\u05e4\u05d5\u05df \u05e9\u05d4\u05d5\u05d6\u05df \u05db\u05d1\u05e8 \u05de\u05e9\u05d5\u05d9\u05d9\u05da \u05dc\u05d7\u05e9\u05d1\u05d5\u05df \u05e2\u05e1\u05e7\u05d9 \u05d0\u05d7\u05e8.");case 12:j(!1),e.next=20;break;case 15:e.prev=15,e.t0=e.catch(1),console.log("signup failed",e.t0),u.Am.error("\u05d0\u05d5\u05e4\u05e1....\u05d1\u05d3\u05e7\u05d5 \u05e9\u05db\u05dc \u05d4\u05e4\u05e8\u
105d8\u05d9\u05dd \u05e9\u05d4\u05d6\u05e0\u05ea\u05dd \u05ea\u05e7\u05d9\u05e0\u05d9\u05dd \u05d5\u05e0\u05e1\u05d5 \u05e9\u05e0\u05d9\u05ea."),j(!1);case 20:case"end":return e.stop()}}),e,null,[[1,15]])})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(!0),e.prev=1,e.next=4,l.ZP.post("/api/auth/verifySMS/",{phone:t,smsCode:r});case 4:if(!(n=e.sent).data||!n.data._id){e.next=10;break}return s=n.data,h(s),e.next=10,x(s);case 10:e.next=17;break;case 12:e.prev=12,e.t0=e.catch(1),console.log("login failed",e.t0),u.Am.error("\u05d4\u05e7\u05d5\u05d3 \u05e9\u05d4\u05d5\u05d6\u05df \u05d0\u05d9\u05e0\u05d5 \u05ea\u05d5\u05d0\u05dd \u05dc\u05e7\u05d5\u05d3 \u05e9\u05e9\u05dc\u05d7\u05e0\u05d5 \u05dc\u05da."),j(!1);case 17:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t,r){return e.apply(this,arguments)}}(),k=function(){var e=(0,n.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.ZP.post("/api/auth/logout/",{});case 3:if(!(t=e.sent).data||!1!==t.data.isLoggedIn){e.next=10;break}return console.log("logged out!"),c.default.replace("/app/login"),h({}),e.next=10,x({});case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.log("logout failed",e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}();return(0,d.jsx)(p.Provider,{value:{isAuthenticated:!!m||!!v,user:m,userSession:v,loading:b,doLogin:y,doSignup:w,doSMSVerification:N,doLogout:k},children:t})},x=function(){return(0,i.useContext)(p)}},49346:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(79056),s=r(67294);function a(e){var t=(0,s.useState)(!1),r=t[0],a=t[1];return(0,s.useEffect)((function(){var t=new IntersectionObserver((function(e){var t=(0,n.default)(e,1)[0];return a(t.isIntersecting)}));return t.observe(e.current),function(){t.disconnect()}}),[]),r}},48166:function(e){e.exports={free:{name:"Free (\u05d4\u05d7\u05d9\u05e0\u05de\u05d9\u05ea)",plan:"free",hebrew:"\u05d4\u05d7\u05d9\u05e0\u05de\u05d9\u05ea",title:"",price:0,appointments:10,customers:10,smsCredits:50},small:{name:"Small (\u05d4\u05e7\u05d8\u05e0\u05d4)",plan:"small",hebrew:"\u05d4\u05e7\u05d8\u05e0\u05d4",title:"\u05dc\u05e2\u05e1\u05e7\u05d9\u05dd \u05e6\u05d5\u05de\u05d7\u05d9\u05dd \ud83c\udf31",price:59,appointments:25,customers:200,smsCredits:100,extraSMS:.08},basic:{name:"Basic (\u05d4\u05d1\u05e1\u05d9\u05e1\u05d9\u05ea)",plan:"basic",hebrew:"\u05d4\u05d1\u05e1\u05d9\u05e1\u05d9\u05ea",title:"\u05dc\u05e2\u05e1\u05e7\u05d9\u05dd \u05e9\u05de\u05de\u05e8\u05d9\u05d0\u05d9\u05dd \ud83d\udcc8",price:99,appointments:50,customers:5e3,smsCredits:200,extraSMS:.08},advanced:{name:"Advanced (\u05d4\u05de\u05ea\u05e7\u05d3\u05de\u05ea)",plan:"advanced",hebrew:"\u05d4\u05de\u05ea\u05e7\u05d3\u05de\u05ea",title:"\u05dc\u05e2\u05e1\u05e7\u05d9\u05dd \u05de\u05ea\u05e7\u05d3\u05de\u05d9\u05dd \ud83d\udcaa",price:149,appointments:100,customers:5e3,smsCredits:300,extraSMS:.08},advancedOnSale:{name:"Advanced (\u05d4\u05de\u05ea\u05e7\u05d3\u05de\u05ea)",plan:"advancedOnSale",hebrew:"\u05d4\u05de\u05ea\u05e7\u05d3\u05de\u05ea",title:"\u05dc\u05e2\u05e1\u05e7\u05d9\u05dd \u05de\u05ea\u05e7\u05d3\u05de\u05d9\u05dd \ud83d\udcaa",price:89,appointments:100,customers:5e3,smsCredits:300,extraSMS:.08},unlimited:{name:"Unlimited (\u05dc\u05dc\u05d0 \u05d4\u05d2\u05d1\u05dc\u05d4)",plan:"unlimited",hebrew:"\u05dc\u05dc\u05d0 \u05d4\u05d2\u05d1\u05dc\u05d4",title:"\u05d4\u05d1\u05d7\u05d9\u05e8\u05d4 \u05e9\u05dc \u05d4\u05d2\u05d3\u05d5\u05dc\u05d9\u05dd \ud83d\ude80",price:199,appointments:5e3,customers:5e3,smsCredits:2e3,extraSMS:.08}}},17018:function(e,t,r){"use strict";var n=r(62426)(r(30381));e.exports={getCancellationText:function(e,t){var r=t?"":"\u05d4\u05ea\u05d5\u05e8 \u05d1\u05d5\u05d8\u05dc";return e.isAutoCancelled?r="\u05d4\u05ea\u05d5\u05e8 \u05d4\u05ea\u05d1\u05d8\u05dc \u05e2\u05e7\u05d1 \u05d0\u05d9 \u05d0\u05d9\u05e9\u05d5\u05e8 \u05d4\u05d2\u05e2\u05d4":e.hasOwnProperty("isManualCancelled")&&(r=e.isManualCancelled?"\u05d4\u05ea\u05d5\u05e8 \u05d1\u05d5\u05d8\u05dc \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05e2\u05e1\u05e7":t?"\u05d1\u05d9\u05d8\u05dc\u05ea \u05d0\u05ea \u05d4\u05ea\u05d5\u05e8":"\u05d4\u05ea\u05d5\u05e8 \u05d1\u05d5\u05d8\u05dc \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05dc\u05e7\u05d5\u05d7"),r},getTimeSettings:function(e){var t=_.get(e,"business.timeSettings",{});return"breakBetweenAppointments"in t.limits||(t.limits.breakBetweenAppointments=0),"approveAppointmentsManually"in t.limits||(t.limits.approveAppointmentsManually=!1),t},getOptionsForBreak:function(e){var t=e.slice(0,3).concat(e[5]);return t.unshift({value:0,text:"\u05d0\u05dc \u05ea\u05e7\u05d1\u05e2 \u05d4\u05e4\u05e1\u05e7\u05d4"}),t},getLinkToGoogleCalendar:function(e){var t=e.formattedDate,r=e.serviceLength,s=e.serviceName,a=e.pageId,i=e.location,c=e.businessName,l=(0,n.default)(t),o=l.clone().add(r,"minutes"),u="".concat(s),d="\u05ea\u05d5\u05e8 \u05d0\u05e6\u05dc ".concat(c,".\n:\u05dc\u05e4\u05e8\u
105d8\u05d9 \u05d4\u05ea\u05d5\u05e8 https://zmantov.co.il/c/").concat(a);return"https://calendar.google.com/calendar/render?action=TEMPLATE&dates=".concat(l.format("YYYYMMDDTHHmmss"),"/").concat(o.format("YYYYMMDDTHHmmss"),"&details=").concat(encodeURIComponent(d),"&location=").concat(encodeURIComponent(i),"&text=").concat(encodeURIComponent(u))},getDisabledDays:function(e){return e.reduce((function(e,t){var r=t.day,s=t.month,a=t.year;return t.times.length||e.push((0,n.default)({day:r,month:s-1,year:a}).format("YYYY-MM-DD")),e}),[])},getAvailableTimesInDay:function(e,t){var r=t.find((function(t){return t.day===e.date()&&t.month===e.month()+1&&t.year===e.year()}));return(null===r||void 0===r?void 0:r.times)||[]},getNextAvailableDay:function(e,t){return t.find((function(t){return t.day>e.date()&&t.times.length>0}))||null}}}}]);
2//# sourceMappingURL=1013-8d50688cef4286a9f0ad.js.map

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.