@sikka/hawa 0.0.35 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/hawa-publish-push.yml +2 -1
- package/README.md +11 -0
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +10 -9
- package/src/elements/DragDropImages.js +55 -72
- package/src/elements/HawaSelectInput.js +30 -0
- package/src/elements/HawaSnackbar.js +35 -3
- package/src/elements/PinInput.js +141 -0
- package/src/index.js +1 -0
- package/src/layout/HawaAppLayout.js +197 -173
- package/src/layout/HawaAppLayout2.js +260 -0
- package/src/styles.css +4 -0
- package/src/styles.scss +3 -1
- package/src/theme/HawaTheme.js +921 -0
- package/src/theme/index.js +2 -0
- package/src/util.js +11 -1
- package/storybook-static/0.a2c13f8ca8477800b11f.manager.bundle.js +2 -0
- package/storybook-static/{0.0d994c92.iframe.bundle.js.LICENSE.txt → 0.a2c13f8ca8477800b11f.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/0.d94b248f.iframe.bundle.js +3 -0
- package/storybook-static/{4.0fcda1281dc1961dbe94.manager.bundle.js.LICENSE.txt → 0.d94b248f.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/0.d94b248f.iframe.bundle.js.map +1 -0
- package/storybook-static/1.37f89487.iframe.bundle.js +1 -0
- package/storybook-static/1.d522251f2377f7751924.manager.bundle.js +1 -0
- package/storybook-static/{2.430bf1e3.iframe.bundle.js → 2.89943a03.iframe.bundle.js} +1 -1
- package/storybook-static/5.a331b0a36ded1c541923.manager.bundle.js +2 -0
- package/storybook-static/5.a331b0a36ded1c541923.manager.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/6.3a1fb0c3.iframe.bundle.js +3 -0
- package/storybook-static/6.3a1fb0c3.iframe.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/6.3a1fb0c3.iframe.bundle.js.map +1 -0
- package/storybook-static/6.aee6c4935c69d480fc0d.manager.bundle.js +1 -0
- package/storybook-static/7.5b8a4de4b5fa42d8de02.manager.bundle.js +1 -0
- package/storybook-static/7.f33530b1.iframe.bundle.js +1 -0
- package/storybook-static/8.a3dec9c37e8951a17939.manager.bundle.js +2 -0
- package/storybook-static/{6.a6d45262f7e98f3f18d3.manager.bundle.js.LICENSE.txt → 8.a3dec9c37e8951a17939.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/8.b569e86b.iframe.bundle.js +1 -0
- package/storybook-static/{8.76c3cbf398692028e834.manager.bundle.js → 9.d04fdaada645cd23cb4b.manager.bundle.js} +1 -1
- package/storybook-static/9.f9db5c90.iframe.bundle.js +3 -0
- package/storybook-static/{7.9ce807e3.iframe.bundle.js.LICENSE.txt → 9.f9db5c90.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/9.f9db5c90.iframe.bundle.js.map +1 -0
- package/storybook-static/iframe.html +19 -3
- package/storybook-static/index.html +2 -2
- package/storybook-static/main.2a7fa838.iframe.bundle.js +1 -0
- package/storybook-static/main.750dea0e0e515fd26844.manager.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.1bd817501fb34a0cb56b.manager.bundle.js +1 -0
- package/storybook-static/runtime~main.9be73be4.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.826e89a1.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.07e1611f.iframe.bundle.js.LICENSE.txt → vendors~main.826e89a1.iframe.bundle.js.LICENSE.txt} +15 -0
- package/storybook-static/vendors~main.826e89a1.iframe.bundle.js.map +1 -0
- package/storybook-static/vendors~main.ed8bc18573e141ab3b26.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.11281b487bf96f5ff19e.manager.bundle.js.LICENSE.txt → vendors~main.ed8bc18573e141ab3b26.manager.bundle.js.LICENSE.txt} +18 -18
- package/storybook-static/0.0d994c92.iframe.bundle.js +0 -3
- package/storybook-static/0.0d994c92.iframe.bundle.js.map +0 -1
- package/storybook-static/0.f47eb24a4893a96ec307.manager.bundle.js +0 -1
- package/storybook-static/1.aabc3f3a.iframe.bundle.js +0 -1
- package/storybook-static/4.0fcda1281dc1961dbe94.manager.bundle.js +0 -2
- package/storybook-static/5.63ab4f94d50a3acf080d.manager.bundle.js +0 -1
- package/storybook-static/6.13a534cb.iframe.bundle.js +0 -1
- package/storybook-static/6.a6d45262f7e98f3f18d3.manager.bundle.js +0 -2
- package/storybook-static/7.097710753af9a1c41b80.manager.bundle.js +0 -1
- package/storybook-static/7.9ce807e3.iframe.bundle.js +0 -3
- package/storybook-static/7.9ce807e3.iframe.bundle.js.map +0 -1
- package/storybook-static/8.1bf48ea7.iframe.bundle.js +0 -1
- package/storybook-static/main.6eab4ef6.iframe.bundle.js +0 -1
- package/storybook-static/main.9d5968bcf15d21f5487c.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.708d7ac1.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.c8dac23bc753439736f0.manager.bundle.js +0 -1
- package/storybook-static/vendors~main.07e1611f.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.07e1611f.iframe.bundle.js.map +0 -1
- package/storybook-static/vendors~main.11281b487bf96f5ff19e.manager.bundle.js +0 -2
package/README.md
CHANGED
|
@@ -47,3 +47,14 @@ npm run storybook
|
|
|
47
47
|
## License
|
|
48
48
|
|
|
49
49
|
MIT © [SIKKA SOFTWARE](https://sikka.sa)
|
|
50
|
+
|
|
51
|
+
<!--start: logo-->
|
|
52
|
+
<p align="center">
|
|
53
|
+
<a href="https://sikka.io">
|
|
54
|
+
<img width="44" alt="Sikka" src="https://i.postimg.cc/8cK4tnKQ/sikka-symbol-black.png">
|
|
55
|
+
</a>
|
|
56
|
+
</p>
|
|
57
|
+
<p align="center">
|
|
58
|
+
<sub>An open source project by <a href="https://sikka.io">Sikka</a></sub>
|
|
59
|
+
</p>
|
|
60
|
+
<!--end: logo-->
|
package/es/index.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t,{useState as r,useEffect as n}from"react";import i from"@mui/material/Button";import a from"@mui/material/Tooltip";import l from"prop-types";import{jsxs as o,jsx as s,Fragment as d}from"react/jsx-runtime";import c from"@mui/material/Snackbar";import u from"@mui/material/AlertTitle";import m from"@mui/material/Alert";import p from"@mui/material/FormControlLabel";import h from"@mui/material/Checkbox";import g from"@mui/material/Container";import f from"@mui/material/Typography";import v from"@mui/icons-material/CheckCircleOutlined";import x from"@mui/material/Chip";import y from"@mui/material/Input";import b from"@mui/material/InputLabel";import w from"@mui/material/Switch";import T from"@emotion/styled";import C from"@mui/material/Slider";import P from"@mui/material/Stack";import k from"@mui/icons-material/GitHub";import L from"@mui/icons-material/Twitter";import S from"@mui/icons-material/AccountBalanceWallet";import W from"@mui/material/Select";import O from"@mui/material/Table";import I from"@mui/material/TableBody";import A from"@mui/material/TableCell";import N from"@mui/material/TableContainer";import R from"@mui/material/TableHead";import q from"@mui/material/TableRow";import{Button as j,InputAdornment as z,IconButton as D,Container as B,Typography as E,Stack as M,useTheme as U}from"@mui/material";import{Search as _,MoreVert as G}from"@mui/icons-material";import $ from"@mui/icons-material/ExpandMore";import F from"@mui/material/Accordion";import V from"@mui/material/AccordionSummary";import Z from"@mui/material/AccordionDetails";import{useDropzone as H}from"react-dropzone";import X from"@mui/icons-material/Close";import{useForm as Y,FormProvider as J,Controller as K}from"react-hook-form";import Q from"@mui/material/InputAdornment";import ee from"@mui/icons-material/HttpsOutlined";import te from"@mui/icons-material/MailOutline";import re from"@mui/icons-material/PermIdentityOutlined";import ne from"@mui/material/Divider";import{styled as ie,useTheme as ae}from"@mui/material/styles";import le from"@mui/material/Box";import oe from"@mui/material/Drawer";import se from"@mui/material/AppBar";import de from"@mui/material/Toolbar";import ce from"@mui/material/List";import ue from"@mui/material/IconButton";import me from"@mui/icons-material/Menu";import pe from"@mui/icons-material/ChevronLeft";import he from"@mui/icons-material/ChevronRight";import ge from"@mui/material/ListItemButton";import fe from"@mui/material/ListItemText";import ve from"@mui/material/Avatar";import xe from"@mui/material/Menu";import ye from"@mui/material/MenuItem";import be from"@mui/material/Dialog";import we from"@mui/material/DialogActions";import Te from"@mui/material/DialogContent";import Ce from"@mui/material/DialogTitle";function Pe(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 ke(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach((function(t){Le(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Le(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Se(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function We(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],l=!0,o=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){o=!0,i=e}finally{try{l||null==r.return||r.return()}finally{if(o)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ie(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ie(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ae=function(e){return e.showText?o(i,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,s("div",{style:{width:10}}),e.buttonText]}):s(a,{title:e.buttonText,placement:"top",children:s(i,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};Ae.propTypes={buttonText:l.string,onClick:l.func,showText:l.bool};var Ne=function(e){return s(i,ke(ke({},e),{},{children:e.text}))},Re=function(e){return s(c,{open:e.open,onClose:e.handleClose,children:o(m,{icon:!1,severity:e.severity,children:[e.title&&s(u,{children:e.title}),e.text]})})},qe=function(e){return console.log("props : ",e),s(t.Fragment,{children:s(p,{label:e.label,control:s(h,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},je=function(e){var t=Oe(r(e.defaultValue),2),n=t[0],a=t[1];return s(g,{variant:e.location||"panelTabs",children:e.options.map((function(t,r){var l;return s(i,{onClick:function(){e.handleChange(t.value),a(t.value)},fullWidth:!0,variant:(null==n?void 0:n.toLowerCase())===(null===(l=t.value)||void 0===l?void 0:l.toLowerCase())?"selected":"unselected",children:t.label},r)}))})};je.propTypes={lang:l.string,options:l.arrayOf(l.shape({label:l.string,value:l.string})),defaultValue:l.string,handleChange:l.func,location:l.string};var ze=function(e){var t="ar"===e.lang;return o(g,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&o(g,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&s("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&s(g,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&s(g,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};ze.propTypes={lang:l.string,onCardClick:l.func};var De=function(e){var t,r,n="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},l={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},d={usd:n?"دولار":"$",sar:n?"ريال":"SAR"},c=n?e.features_ar:e.features,u=n?{left:10}:{right:10};return o(g,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:n?"rtl":"ltr"},children:[o(g,{variant:"plan-header",children:[e.discount&&s(x,{label:e.discount,variant:"standard",style:ke({maxWidth:"fit-content",position:"absolute",bottom:10},u),color:"success"}),s(f,{variant:"h3",fontWeight:500,children:n?e.title_ar:e.title}),s(f,{variant:"caption",children:n?e.subtitle_ar:e.subtitle}),s("br",{}),s(f,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?o("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[o("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,s("div",{style:{width:5}}),s(f,{children:d[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),s(f,{style:{fontSize:14,margin:5},children:n?a[e.cycleText]:l[e.cycleText]})]}):o("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[o("div",{style:{display:"flex",flexDirection:"row"},children:[s(f,{children:d[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),s("div",{style:{width:5}}),e.price]}),s(f,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:l[e.cycleText]})]})})]}),s("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==c?void 0:c.map((function(e){return o("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[s("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:s(v,{fontSize:"small"})}),s("div",{style:{width:10}}),s(f,{variant:"subtitle2",children:e})]})}))}),s(i,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};De.propTypes={lang:l.string,buttonText:l.string,selectedPlan:l.string,title:l.string,title_ar:l.string,subtitle:l.string,subtitle_ar:l.string,features:l.array,features_ar:l.array,currency:l.oneOf(["sar","usd"]),cycleText:l.oneOf(["monthly","3-months","6-months","annually"])};var Be=function(e){return s(f,ke(ke({},e),{},{children:e.children}))},Ee=function(e){return s("div",{style:e.inForm&&{width:"100%"},children:o("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&s(b,{children:e.label}),e.helperText&&s(f,{style:{marginBottom:!e.label&&10},variant:"validation",children:e.helperText})]}),s(y,ke({disableUnderline:!0},e))]})})},Me=function(e){return s(w,ke({},e))};var Ue="production"!==process.env.NODE_ENV?l.oneOfType([l.number,l.string,l.object,l.array]):{};function _e(){return _e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_e.apply(this,arguments)}function Ge(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function $e(e,t,r={clone:!0}){const n=r.clone?_e({},e):e;return Ge(e)&&Ge(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(Ge(t[i])&&i in e&&Ge(e[i])?n[i]=$e(e[i],t[i],r):n[i]=t[i])})),n}const Fe=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ve=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ze=[...Fe,...Ve];function He(e){return function(e,t,r,n){const i=(a=e,((l=t)&&"string"==typeof l?l.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),a):null)||r);var a,l;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function Xe(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}"production"===process.env.NODE_ENV||Fe.reduce(((e,t)=>(e[t]=Ue,e)),{}),"production"===process.env.NODE_ENV||Ve.reduce(((e,t)=>(e[t]=Ue,e)),{}),"production"===process.env.NODE_ENV||Ze.reduce(((e,t)=>(e[t]=Ue,e)),{});const Ye=["values","unit","step"];function Je(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=Xe(e,Ye),a=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>_e({},e,{[t.key]:t.val})),{})})(t),l=Object.keys(a);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(e,i){const a=l.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==a&&"number"==typeof t[l[a]]?t[l[a]]:i)-n/100}${r})`}return _e({keys:l,values:a,up:o,down:s,between:d,only:function(e){return l.indexOf(e)+1<l.length?d(e,l[l.indexOf(e)+1]):o(e)},not:function(e){const t=l.indexOf(e);return 0===t?o(l[1]):t===l.length-1?s(l[t]):d(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var Ke={borderRadius:4};const Qe=["breakpoints","palette","spacing","shape"];const et=e.createContext(null);"production"!==process.env.NODE_ENV&&(et.displayName="ThemeContext");var tt=et;function rt(t=null){const r=function(){const t=e.useContext(tt);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const nt=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,l=Xe(e,Qe),o=Je(r),s=function(e=8){if(e.mui)return e;const t=He({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(i);let d=$e({breakpoints:o,direction:"ltr",components:{},palette:_e({mode:"light"},n),spacing:s,shape:_e({},Ke,a)},l);return d=t.reduce(((e,t)=>$e(e,t)),d),d}();function it(e=nt){return rt(e)}var at,lt,ot=T.input(at||(at=We(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),st=T.input(lt||(lt=We(["\n max-width: 70px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),dt=function(e){var t=it();return o("div",{style:{display:"flex",flexDirection:"row"},children:[s(st,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),s("div",{style:{width:10}}),s(ot,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};dt.propTypes={color:l.string,handleChange:l.func};var ct=function(e){return o(P,{spacing:2,direction:"row",alignItems:"center",style:e.style,children:[e.startElement,s(C,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};ct.propTypes={startElement:l.element,endElement:l.element,handleChange:l.func};var ut=function(e){return o(g,{variant:"settingsRow",children:[s(Be,{children:e.settingsLabel}),"checkbox"===e.settingsType&&s(h,ke({},e)),"text"===e.settingsType&&s(Ee,ke({},e)),"boolean"===e.settingsType&&s(Me,ke({},e)),"range"===e.settingsType&&s(ct,ke({},e)),"color"===e.settingsType&&s(dt,ke({},e)),"radio"===e.settingsType&&s(je,ke({location:"inSettings"},e))]})};ut.propTypes={settingsLabel:l.string,settingsType:l.oneOf(["checkbox","text","radio","boolean","color"])};var mt=function(e){var t,r="ar"===e.lang,n="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":n=s("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":n=s(k,{});break;case"twitter":n=s(L,{});break;case"mada":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":n=s(S,{})}return o(i,ke(ke({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[n,s("div",{style:{width:10}}),s(f,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};mt.propTypes={lang:l.string,logo:l.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:l.string};var pt=function(e){return s(i,ke(ke({},e),{},{children:e.children}))},ht=function(e){return o("div",{style:{width:"100%"},children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[s(b,{children:e.label}),e.helperText&&s(f,{variant:"validation",children:e.helperText})]}),s(W,ke(ke({},e),{},{children:e.children}))]})},gt=function(e){var t=it();return console.log("theme is ",t),s("label",{children:s("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},ft=function(e){return s(b,{children:s("div",{style:{fontSize:15},children:e.label})})},vt=function(e){return o(m,{severity:e.severity,icon:e.hideIcon,children:[e.title&&s(u,{children:e.title}),e.text]})};vt.propTypes={severity:l.oneOf(["error","info","success","warning"]),title:l.string,text:l.string,hideIcon:l.bool};var xt=function(e){var t="ar"===e.lang;return s(N,{style:{direction:t?"rtl":"ltr"},children:o(O,{"aria-label":"a dense table",children:[s(R,{children:o(q,{children:[e.columns.map((function(e,r){return s(A,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&s(A,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),s(I,{children:e.rows?e.rows.map((function(r,n){return o(q,{children:[r.map((function(e,r){return s(A,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&s(A,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return s(j,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},n)})):s(q,{align:"center",children:s(A,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&s(q,{children:e.end.map((function(e,r){return s(A,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};xt.propTypes={handleActionClick:l.func,noDataText:l.string,lang:l.string,columns:l.array,rows:l.array,end:l.array};var yt=function(e){return s(Ee,ke({endAdornment:s(z,{position:"start",children:s(_,{})})},e))},bt=function(e){return o(F,{elevation:0,children:[s(V,{expandIcon:s($,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:s(f,{children:e.title})}),s(Z,{children:o(f,{children:[e.content," "]})})]})};bt.propTypes={title:l.string,content:l.string};var wt={display:"flex",flexDirection:"row",flexWrap:"wrap",marginTop:10},Tt=function(e){var t,i,a,l,d=e.texts,c=e.files,u=e.setFiles;e.itemId,e.setDeletedFiles,e.refetchSingleMenu;var m=e.maxFiles,p=Oe(r(0),2);p[0],p[1];var h=it(),g=H({multiple:!0,accept:"image/*",maxSize:5e6,maxFiles:m,onDrop:function(e){u(e.map((function(e,t){return Object.assign(e,{preview:URL.createObjectURL(e)})})))}}),f=g.getRootProps,v=g.getInputProps,x=g.fileRejections,y=g.acceptedFiles,b=g.isDragActive;n((function(){return function(){null==c||c.forEach((function(e){URL.revokeObjectURL(e.preview)}))}}),[c]),n((function(){var e;return null!==(e=c[0])&&void 0!==e&&e.hasOwnProperty("_id")&&(null==c||c.map((function(e,t){y.push({isFromDB:!0,_id:e._id,img_url:e.image_url})})),console.log("accepted files : ",y),u(y)),function(){y.splice(0,null==y?void 0:y.length)}}),[]);var w=x.map((function(e,t){return o("div",{children:[s("div",{children:e.file.name}),s("div",{children:e.errors[0].code})]},t)}));console.log(null===(t=x[0])||void 0===t||null===(i=t.errors[0])||void 0===i?void 0:i.code);var T=null==c?void 0:c.map((function(e,t){return o("div",{style:{position:"relative",margin:10},children:[s(D,{onClick:function(e){e.stopPropagation(),console.log("delete")},size:"small",variant:"contained",style:{position:"absolute",top:-10,right:-10,backgroundColor:h.primaryActionColor,color:"white",padding:3},children:s(X,{fontSize:"small"})}),s("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",height:100,width:100,backgroundImage:"url(".concat(e.preview,")"),backgroundSize:"cover",backgroundPosition:"center",border:"1px solid black"}},e.name)]})}));return o(B,ke(ke({variant:"drop-area"},f({style:{backgroundColor:b&&"white"}})),{},{children:[s("input",ke({},v())),s(E,{children:"Click here or drop files here to upload"}),s(E,{children:"Max file size is 5MB"}),T?s("aside",{style:wt,children:T}):null,"too-many-files"!==(null===(a=x[0])||void 0===a||null===(l=a.errors[0])||void 0===l?void 0:l.code)?s(vt,{text:d.tooManyFiles,severity:"error"}):w]}))},Ct=function(e){return o(M,{variant:"card",direction:"row",maxWidth:e.maxWidth,style:{paddingLeft:5},children:[s("div",{style:{display:"flex",alignItems:"center",borderRight:"1px solid grey",marginRight:20},children:s(G,{})}),s("div",{style:{width:"100%"},children:e.children})]})},Pt=function(e){var t=Y(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return s(g,{maxWidth:"sm",children:s(J,ke(ke({},t),{},{children:o("form",{onSubmit:n(e.handleUpdateProfile),children:[s(K,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return s(Ee,ke({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message},a))}}),s(K,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return s(Ee,ke({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),s(K,{control:a,name:"email",render:function(t){var n,i,a=t.field;return s(Ee,ke({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(K,{control:a,name:"password",render:function(t){var n,i,a=t.field;return s(Ee,ke({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.passwordRequiredText}}),s(K,{control:a,name:"confirmPassword",render:function(t){var n,i,a=t.field;return s(Ee,ke({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(i=r.confirmPassword)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.confirmPasswordRequiredText}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},kt=function(e){return o(g,{maxWidth:"sm",children:[e.children,s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},Lt=function(e){var t=Oe(r(!1),2),n=t[0],a=t[1],l=Y(),d=l.formState.errors,c=l.handleSubmit,u=l.control;return o(g,{maxWidth:"xs",variant:"auth",children:[n&&s(vt,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?s(Be,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):s(J,ke(ke({},l),{},{children:o("form",{onSubmit:c((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():a(!0)})),children:[s(K,{control:u,name:"password",render:function(t){var r,n,i=t.field;return s(Ee,ke({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=d.password)||void 0===n?void 0:n.message,startAdornment:s(Q,{position:"start",children:s(ee,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),s(K,{control:u,name:"confirmPassword",render:function(t){var r,n,i=t.field;return s(Ee,ke({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=d.confirmPassword)||void 0===n?void 0:n.message,startAdornment:s(Q,{position:"start",children:s(ee,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};Lt.propTypes={texts:l.shape({emailLabel:l.string,emailPlaceholder:l.string,emailRequiredText:l.string,passwordPlaceholder:l.string,updatePassword:l.string,passwordRequiredText:l.string,passwordLabel:l.string,confirmPasswordPlaceholder:l.string,confirmPasswordLabel:l.string,confirmPasswordRequiredText:l.string,passwordMatchError:l.string,forgotPasswordText:l.string,passwordChanged:l.string}),passwordChanged:l.bool,handleNewPassword:l.func};var St=function(e){var t=Y(),r=t.formState.errors,n=t.handleSubmit;t.register;var a=t.control;return s(g,{maxWidth:"xs",variant:"auth",children:e.sent?s(Be,{style:{textAlign:"center",margin:5},children:e.texts.emailSentText}):o("form",{onSubmit:n(e.handleResetPassword),children:[s(K,{control:a,name:"email",render:function(t){var n,i,a=t.field;return s(Ee,ke({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(Q,{position:"start",children:s(te,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};St.propTypes={texts:l.shape({emailLabel:l.string,emailPlaceholder:l.string,emailRequiredText:l.string,emailInvalidText:l.string,emailSentText:l.string,resetPassword:l.string}),sent:l.bool,handleResetPassword:l.func};var Wt=function(e){var t=Y(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return o(g,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&s(vt,{title:e.errorTitle,text:e.errorText,severity:"error"}),s(J,ke(ke({},t),{},{children:o("form",{onSubmit:n(e.handleSignUp),children:[s(K,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return s(Ee,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message,startAdornment:s(Q,{position:"start",children:s(re,{})})})},rules:{required:e.texts.fullNameRequiredText}}),s(K,{control:a,name:"email",render:function(t){var n,i,a=t.field;return s(Ee,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(Q,{position:"start",children:s(te,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(K,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return s(Ee,ke({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:s(Q,{position:"start",children:s(ee,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),s(i,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),o(f,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",s("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),s(ne,{}),o("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&s(mt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&s(mt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&s(mt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};Wt.propTypes={texts:l.shape({fullNameLabel:l.string,fullNamePlaceholder:l.string,fullNameRequiredText:l.string,emailLabel:l.string,emailPlaceholder:l.string,emailRequiredText:l.string,emailInvalidText:l.string,passwordLabel:l.string,passwordPlaceholder:l.string,passwordRequiredText:l.string,passwordTooShortText:l.string,forgotPasswordText:l.string,newUserText:l.string,signUpText:l.string,signInText:l.string,existingUserText:l.string,googleButtonLabel:l.string,githubButtonLabel:l.string,twitterButtonLabel:l.string}),viaGoogle:l.bool,viaGithub:l.bool,viaTwitter:l.bool,handleSignUp:l.func,handleRouteToSignIn:l.func,handleGoogleSignUp:l.func,handleGithubSignUp:l.func,handleTwitterSignUp:l.func};var Ot=function(e){var t=Y(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return o(g,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&s(vt,{title:e.errorTitle,text:e.errorText,severity:"error"}),o("form",{onSubmit:n(e.handleSignIn),children:[s(K,{control:a,name:"email",render:function(t){var n,i,a=t.field;return s(Ee,ke({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(Q,{position:"start",children:s(te,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(K,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return s(Ee,ke({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:s(Q,{position:"start",children:s(ee,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),s(f,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),o(f,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",s("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),s(ne,{}),o("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&s(mt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&s(mt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&s(mt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};Ot.propTypes={texts:l.shape({emailLabel:l.string,emailPlaceholder:l.string,emailRequiredText:l.string,emailInvalidText:l.string,passwordLabel:l.string,passwordPlaceholder:l.string,passwordRequiredText:l.string,forgotPasswordText:l.string,newUserText:l.string,signUpText:l.string,signInText:l.string,googleButtonLabel:l.string,githubButtonLabel:l.string,twitterButtonLabel:l.string}),viaGoogle:l.bool,viaGithub:l.bool,viaTwitter:l.bool,handleSignIn:l.func,handleRouteToSignUp:l.func,handleGoogleSignIn:l.func,handleGithubSignIn:l.func,handleTwitterSignIn:l.func};var It=function(e){return o(g,{maxWidth:"xs",children:[s(Be,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&s(mt,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&s(mt,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&s(mt,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&s(mt,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&s(mt,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&s(mt,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&s(mt,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};It.propTypes={viaMada:l.bool,viaWallet:l.bool,viaSTCPay:l.bool,viaPayPal:l.bool,viaApplePay:l.bool,viaCreditCard:l.bool,madaLabel:l.string,stcPayLabel:l.string,paypalLabel:l.string,walletLabel:l.string,applePayLabel:l.string,visaMasterLabel:l.string,handleMada:l.func,handleWallet:l.func,handleSTCPay:l.func,handlePayPal:l.func,handleApplePay:l.func,handleCreditCard:l.func};var At=function(e){var t,r=Y(),n=r.formState.errors,a=r.handleSubmit,l=r.control;return s(g,{maxWidth:"xs",children:o("form",{onSubmit:a(e.handle),children:[s(Ee,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message}),s(K,{control:l,name:"cardName",render:function(e){var t;return e.field,s(Ee,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(K,{control:l,name:"cardName",render:function(e){var t;return e.field,s(Ee,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(K,{control:l,name:"cardName",render:function(e){var t;return e.field,s(Ee,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},Nt=function(e){var t=Oe(r(0),2),n=t[0],a=t[1],l=Y(),d=l.formState.errors,c=l.handleSubmit,u=l.control;return o(g,{maxWidth:"xs",children:[o(f,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(n).toLocaleString("en")||"0",s(f,{children:e.currency||"SAR"})]}),s(J,ke(ke({},l),{},{children:o("form",{onSubmit:c(e.handleChargeWallet),children:[s(K,{control:u,name:"amount",render:function(t){var r,n,i=t.field;return s(Ee,ke(ke({fullWidth:!0,placeholder:e.texts.amountLabel,type:"number",value:null!==(r=i.value)&&void 0!==r?r:""},i),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){i.onChange(parseFloat(e.target.value)),a(e.target.value)},helperText:null===(n=d.amount)||void 0===n?void 0:n.message}))},rules:{required:e.texts.amountRequired}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.chargeWallet})]})}))]})};Nt.propTypes={texts:l.shape({amountLabel:l.string,chargeWallet:l.string,amountRequired:l.string}),handleChargeWallet:l.func,currency:l.string};var Rt=function(e){return o(g,{maxWidth:"xs",children:[s(f,{align:"center",children:"Wallet Balance"}),o(f,{align:"center",variant:"h1",children:[e.walletBalance||"0",s(f,{children:e.currency||"SAR"})]}),s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},qt=function(e){var t,r,n,a,l,d,c,u,m,p,h="ar"===e.lang,v=Y(),x=v.formState.errors,y=v.handleSubmit;v.register;var b=v.control,w={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return o(g,{maxWidth:"sm",style:{direction:h?"rtl":"ltr"},children:[s(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),s(xt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),s(ne,{variant:"middle"}),s(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),s(J,ke(ke({},v),{},{children:o("form",{onSubmit:y(e.handlePayNow),children:[o(g,{sx:w,children:[s(K,{control:b,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,i,a=t.field;return s(Ee,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(i=x.firstName)||void 0===i?void 0:i.message},a))}}),s("div",{style:{width:20}}),s(K,{control:b,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,i,a=t.field;return s(Ee,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(i=x.lastName)||void 0===i?void 0:i.message},a))}})]}),s(K,{control:b,name:"email",render:function(t){var r,n,i,a=t.field;return s(Ee,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(i=x.email)||void 0===i?void 0:i.message},a))},rules:{required:null===(n=e.texts)||void 0===n?void 0:n.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(a=e.texts)||void 0===a?void 0:a.emailInvalidText}}}),o(g,{sx:w,children:[s(K,{control:b,name:"streetAddress",rules:{required:null===(l=e.texts)||void 0===l?void 0:l.required},render:function(t){var r,n,i,a=t.field;return s(Ee,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(i=x.streetAddress)||void 0===i?void 0:i.message},a))}}),s("div",{style:{width:20}}),s(K,{control:b,name:"buildingNumber",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,i,a=t.field;return s(Ee,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(i=x.buildingNumber)||void 0===i?void 0:i.message},a))}})]}),o(g,{sx:w,children:[s(K,{control:b,name:"province",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,i,a=t.field;return s(Ee,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(i=x.province)||void 0===i?void 0:i.message},a))}}),s("div",{style:{width:20}}),s(K,{control:b,name:"city",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,i,a=t.field;return s(Ee,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(i=x.city)||void 0===i?void 0:i.message},a))}})]}),o(g,{sx:w,children:[s(K,{control:b,name:"zipCode",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,a=t.field;return s(Ee,ke({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(i=x.zipCode)||void 0===i?void 0:i.message},a))}}),s("div",{style:{width:20}}),s(K,{control:b,name:"country",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,a=t.field;return o(ht,ke(ke({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=a.value)&&void 0!==n?n:"",helperText:null===(i=x.country)||void 0===i?void 0:i.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},a),{},{children:[s("option",{}),e.countriesList.map((function(e,t){return s("option",{children:e},t)}))]}))}})]}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};qt.propTypes={texts:l.shape({orderDetails:l.string,billingAddress:l.string,payNow:l.string,emailLabel:l.string,emailRequiredText:l.string,emailInvalidText:l.string,firstNameLabel:l.string,required:l.string,lastNameLabel:l.string,streetAddressLabel:l.string,buildingNumberLabel:l.string,cityLabel:l.string,stateLabel:l.string,countryLabel:l.string,zipCodeLabel:l.string}),lang:l.string,countriesList:l.array,products:l.array,total:l.string,handlePayNow:l.func};var jt=function(e){var t="ar"===e.lang;return o("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[o(g,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[s(f,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),s(ne,{variant:"middle"}),o(f,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",s("strong",{children:e.userEmail})]}),s(f,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),s(f,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),s(ne,{variant:"middle"}),e.products&&o(d,{children:[s(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),s(xt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),s(ne,{variant:"middle"})]}),s(i,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),s(i,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),s(i,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),s(f,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),s("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:s(f,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};jt.propTypes={texts:l.shape({print:l.string,history:l.string,homePage:l.string,successMessage:l.string,orderDetails:l.string,fasterPaymentNote:l.string,billingAddress:l.string,payNow:l.string,yourOrderNumber:l.string,emailLabel:l.string,emailRequiredText:l.string,emailInvalidText:l.string,firstNameLabel:l.string,required:l.string,lastNameLabel:l.string,streetAddressLabel:l.string,buildingNumberLabel:l.string,cityLabel:l.string,stateLabel:l.string,countryLabel:l.string,zipCodeLabel:l.string,refundPolicy:l.string}),products:l.array,countriesList:l.array,lang:l.string,total:l.string,userEmail:l.string,orderNumber:l.string,confirmationTitle:l.string,handleHome:l.func,handlePrint:l.func,handleHistory:l.func,handleRefundPolicyLink:l.func};var zt=function(e){var t=Oe(r("sar"),2),n=t[0],i=t[1],a=Oe(r("monthly"),2),l=a[0],d=a[1];return o(g,{style:{width:"fit-content"},variant:"plain",children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:10},children:[s(je,{location:"inPricing",handleChange:function(e){return d(e)},defaultValue:"monthly",options:[{label:"Monthly",value:"monthly"},{label:"3 Months",value:"3-months"},{label:"6 Months",value:"6-months"},{label:"Annually",value:"annually"}]}),s(je,{location:"inPricing",handleChange:function(e){i(e)},defaultValue:"sar",options:[{label:"USD",value:"usd"},{label:"SAR",value:"sar"}]})]}),s(g,{variant:"pricing",children:e.plans.map((function(t){return s(De,ke(ke({lang:e.lang},t),{},{currency:n,cycleText:l}))}))})]})};zt.propTypes={plans:l.arrayOf(l.shape({title:l.string,title_ar:l.string,subtitle:l.string,subtitle_ar:l.string,price:l.number,currency:l.string,cycleText:l.string,buttonText:l.string,features:l.array,features_ar:l.array,selectedPlan:l.bool})),lang:l.string};var Dt=function(e){return s("div",{children:e.children})},Bt=function(e){var t=U();return s(xe,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return o(ye,{onClick:e.action,children:[e.icon&&s(e.icon,{}),e.icon&&s("div",{style:{width:10}}),s(f,{textAlign:"center",children:e.label})]},e.label)}))})};Bt.propTypes={anchor:l.any,handleClose:l.func,menuItems:l.arrayOf(l.shape({icon:l.element,label:l.string,action:l.func}))};var Et=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},Mt=function(e){return Le({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(8)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},Ut=ie("div")((function(e){var t=e.theme;return ke({display:"flex",alignItems:"center",justifyContent:"rtl"===e.direction?"flex-start":"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),_t=ie(se,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open,n=e.direction;return ke({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:"rtl"===n?0:240,marginRight:"rtl"===n?240:0,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),Gt=ie(oe,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ke(ke({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&ke(ke({},Et(t)),{},{"& .MuiDrawer-paper":Et(t)})),!r&&ke(ke({},Mt(t)),{},{"& .MuiDrawer-paper":Mt(t)}))}));function $t(e){var r=ae(),n=Oe(t.useState(!0),2),i=n[0],l=n[1],d="ar"===e.lang,c=Oe(t.useState(null),2);c[0],c[1];var u=Oe(t.useState(null),2),m=u[0],p=u[1];return o(le,{sx:{display:"flex",direction:d?"rtl":"ltr"},children:[s(_t,{variant:"appbar",position:"fixed",open:i,direction:d?"rtl":"ltr",children:o(de,{variant:"appbar",sx:{paddingLeft:{xs:3},paddingRight:{xs:3}},children:[s(ue,{color:"inherit","aria-label":"open drawer",onClick:function(){return l(!0)},edge:"start",s:!0,sx:ke({marginRight:5},i&&{display:"none"}),children:s(me,{})}),o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[s(f,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),o(le,{children:[s(a,{title:"Open settings",children:s(ue,{onClick:function(e){return p(e.currentTarget)},sx:{p:0},size:"small",children:s(ve,{})})}),s(Bt,{menuItems:e.accountMenu,anchor:m,handleClose:function(){return p(null)}})]})]})]})}),o(Gt,{variant:"permanent",open:i,children:[o(Ut,{direction:d?"rtl":"ltr",children:[e.logo,s(ue,{onClick:function(){return l(!1)},children:"rtl"===r.direction?s(he,{}):s(pe,{})})]}),s(ne,{}),s(ce,{children:e.pages.map((function(t,r){var n,l;return s(a,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:i?0:1}},children:o(ge,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(l=t.slug)||void 0===l?void 0:l.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:i?"initial":"center",px:2.5},children:[s(t.icon,{}),s("div",{style:{width:20}}),s(fe,{primary:t.text,sx:{opacity:i?1:0}})]},t.text)},r)}))})]}),o(le,{sx:{flexGrow:1,p:3},children:[s(Ut,{}),e.children]})]})}var Ft=["children","onClose","hideClose"],Vt=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=Se(e,Ft);return o(Ce,ke(ke({sx:{m:0,p:2}},i),{},{children:[t,n?null:s(ue,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:s(X,{})})]}))};function Zt(e){var t=Oe(r(!1),2);return t[0],t[1],o(be,ke(ke({},e),{},{variant:"main",children:[s(Vt,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),s(Te,{children:e.children}),s(we,{children:e.actions})]}))}var Ht=function(e){var r=U(),n=Oe(t.useState(null),2),l=n[0],d=n[1],c=Oe(t.useState(null),2),u=c[0],m=c[1],p=function(){return d(null)};return console.log("theme is ",r),s(se,{position:"static",variant:"appbar",children:s(g,{variant:"appbar",children:o(de,{disableGutters:!0,children:[s(le,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.logo}),o(le,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[s(ue,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:function(e){return d(e.currentTarget)},color:"inherit",children:s(me,{})}),s(Bt,{anchor:l,handleClose:p,menuItems:e.pages})]}),s(le,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:e.logo}),s(le,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.pages.map((function(e){return s(i,{onClick:p,sx:{my:2,display:"block"},children:e.label},e)}))}),o(le,{sx:{flexGrow:0},children:[s(a,{title:"Open settings",children:s(ue,{onClick:function(e){return m(e.currentTarget)},sx:{p:0},children:s(ve,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),s(Bt,{anchor:u,handleClose:function(e){return m(null)},menuItems:e.accountMenu})]})]})})})};Ht.propTypes={pages:l.arrayOf(l.shape({icon:l.element,label:l.string,action:l.func})),accountMenu:l.arrayOf(l.shape({icon:l.element,label:l.string,action:l.func}))};var Xt=function(e){var r=Oe(t.useState(null),2),n=r[0],i=r[1];return o(B,ke(ke({variant:"page-controls"},e),{},{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[s(j,{variant:"layout",onClick:e.backAction,children:e.backText}),s(M,{direction:"row",spacing:1,sx:{display:{xs:"none",md:"flex"}},children:e.actionButtons.map((function(e){return s(j,{variant:"layout",children:e.label})}))}),o(M,{direction:"row",spacing:1,sx:{display:{xs:"flex",md:"none"}},children:[s(j,{variant:"layout",onClick:function(e){return i(e.currentTarget)},children:s(me,{})}),s(Bt,{handleClose:function(e){return i(null)},anchor:n,menuItems:e.actionButtons})]})]}))};Xt.propTypes={backText:l.string,backAction:l.func,actionButtons:l.arrayOf(l.shape({label:l.string,action:l.func}))};export{Ne as ActionButton,Ae as AdaptiveButton,Dt as Box,Nt as ChargeWalletForm,qt as CheckoutForm,jt as ConfirmationPage,At as CreditCardForm,Tt as DragDropImages,Ct as DraggableCard,bt as HawaAccordian,vt as HawaAlert,Ht as HawaAppBar,$t as HawaAppLayout,pt as HawaButton,qe as HawaCheckbox,dt as HawaColorPicker,Zt as HawaDialog,ft as HawaInputLabel,ze as HawaItemCard,mt as HawaLogoButton,Xt as HawaPageControls,De as HawaPricingCard,je as HawaRadio,ct as HawaRange,yt as HawaSearchBar,ht as HawaSelect,ut as HawaSettingsRow,Re as HawaSnackbar,xt as HawaTable,gt as HawaTextArea,Ee as HawaTextField,Be as HawaTypography,Lt as NewPasswordForm,Rt as PayWithWallet,zt as PricingPlans,St as ResetPasswordForm,It as SelectPayment,Ot as SignInForm,Wt as SignUpForm,Pt as UserProfileForm,kt as UserSettingsForm};
|
|
1
|
+
import*as e from"react";import t,{useState as r,useEffect as n}from"react";import i from"@mui/material/Button";import o from"@mui/material/Tooltip";import a from"prop-types";import{jsxs as l,jsx as s,Fragment as d}from"react/jsx-runtime";import c from"@mui/material/Snackbar";import u from"@mui/material/AlertTitle";import p from"@mui/material/Alert";import{IconButton as m,Button as h,InputAdornment as g,Container as f,Typography as v,Stack as b,useTheme as y,createTheme as x,lighten as w,darken as C}from"@mui/material";import T from"@mui/icons-material/Close";import k from"@mui/material/FormControlLabel";import R from"@mui/material/Checkbox";import L from"@mui/material/Container";import M from"@mui/material/Typography";import S from"@mui/icons-material/CheckCircleOutlined";import P from"@mui/material/Chip";import O from"@mui/material/Input";import B from"@mui/material/InputLabel";import I from"@mui/material/Switch";import W from"@emotion/styled";import A from"@mui/material/Slider";import D from"@mui/material/Stack";import N from"@mui/icons-material/GitHub";import j from"@mui/icons-material/Twitter";import q from"@mui/icons-material/AccountBalanceWallet";import z from"@mui/material/Select";import E from"@mui/material/Table";import F from"@mui/material/TableBody";import U from"@mui/material/TableCell";import G from"@mui/material/TableContainer";import $ from"@mui/material/TableHead";import _ from"@mui/material/TableRow";import{Search as V,MoreVert as Z}from"@mui/icons-material";import H from"@mui/icons-material/ExpandMore";import Y from"@mui/material/Accordion";import X from"@mui/material/AccordionSummary";import J from"@mui/material/AccordionDetails";import{useDropzone as K}from"react-dropzone";import{useForm as Q,FormProvider as ee,Controller as te}from"react-hook-form";import re from"@mui/material/InputAdornment";import ne from"@mui/icons-material/HttpsOutlined";import ie from"@mui/icons-material/MailOutline";import oe from"@mui/icons-material/PermIdentityOutlined";import ae from"@mui/material/Divider";import{styled as le,useTheme as se}from"@mui/material/styles";import de from"@mui/material/Box";import ce from"@mui/material/Drawer";import ue from"@mui/material/CssBaseline";import pe from"@mui/material/AppBar";import me from"@mui/material/Toolbar";import he from"@mui/material/List";import ge from"@mui/material/IconButton";import fe from"@mui/icons-material/Menu";import ve from"@mui/icons-material/ChevronLeft";import be from"@mui/icons-material/ChevronRight";import ye from"@mui/material/ListItem";import xe from"@mui/material/ListItemIcon";import we from"@mui/material/ListItemText";import Ce from"@mui/icons-material/MoveToInbox";import Te from"@mui/icons-material/Mail";import ke from"@mui/material/Dialog";import Re from"@mui/material/DialogActions";import Le from"@mui/material/DialogContent";import Me from"@mui/material/DialogTitle";import Se from"@mui/material/Avatar";import Pe from"@mui/material/Menu";import Oe from"@mui/material/MenuItem";function Be(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 Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(r),!0).forEach((function(t){We(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function We(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ae(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function De(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var qe=function(e){return e.showText?l(i,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,s("div",{style:{width:10}}),e.buttonText]}):s(o,{title:e.buttonText,placement:"top",children:s(i,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};qe.propTypes={buttonText:a.string,onClick:a.func,showText:a.bool};var ze=function(e){return s(i,Ie(Ie({},e),{},{children:e.text}))},Ee=function(e){var t=Ne(r({vertical:"",horizontal:""}),2),i=t[0],o=t[1];return n((function(){if(e.position){var t=e.position.split("-");o({vertical:t[0],horizontal:t[1]})}}),[e.position]),s(c,{open:e.open,autoHideDuration:e.autoHide?e.duration:null,onClose:e.handleClose,anchorOrigin:i,action:s(d,{children:s(m,{"aria-label":"close",style:{color:"black"},sx:{p:.5},onClick:e.handleClose,children:s(T,{})})}),children:l(p,{icon:!1,severity:e.severity,onClose:e.isClosable?e.handleClose:null,children:[e.title&&s(u,{children:e.title}),e.text]})})},Fe=function(e){return console.log("props : ",e),s(t.Fragment,{children:s(k,{label:e.label,control:s(R,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},Ue=function(e){var t=Ne(r(e.defaultValue),2),n=t[0],o=t[1];return s(L,{variant:e.location||"panelTabs",children:e.options.map((function(t,r){var a;return s(i,{onClick:function(){e.handleChange(t.value),o(t.value)},fullWidth:!0,variant:(null==n?void 0:n.toLowerCase())===(null===(a=t.value)||void 0===a?void 0:a.toLowerCase())?"selected":"unselected",children:t.label},r)}))})};Ue.propTypes={lang:a.string,options:a.arrayOf(a.shape({label:a.string,value:a.string})),defaultValue:a.string,handleChange:a.func,location:a.string};var Ge=function(e){var t="ar"===e.lang;return l(L,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l(L,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&s("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&s(L,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&s(L,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};Ge.propTypes={lang:a.string,onCardClick:a.func};var $e=function(e){var t,r,n="ar"===e.lang,o={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},a={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},d={usd:n?"دولار":"$",sar:n?"ريال":"SAR"},c=n?e.features_ar:e.features,u=n?{left:10}:{right:10};return l(L,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:n?"rtl":"ltr"},children:[l(L,{variant:"plan-header",children:[e.discount&&s(P,{label:e.discount,variant:"standard",style:Ie({maxWidth:"fit-content",position:"absolute",bottom:10},u),color:"success"}),s(M,{variant:"h3",fontWeight:500,children:n?e.title_ar:e.title}),s(M,{variant:"caption",children:n?e.subtitle_ar:e.subtitle}),s("br",{}),s(M,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,s("div",{style:{width:5}}),s(M,{children:d[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),s(M,{style:{fontSize:14,margin:5},children:n?o[e.cycleText]:a[e.cycleText]})]}):l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[s(M,{children:d[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),s("div",{style:{width:5}}),e.price]}),s(M,{style:{fontSize:14,margin:5},children:"ar"===e.lang?o[e.cycleText]:a[e.cycleText]})]})})]}),s("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==c?void 0:c.map((function(e){return l("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[s("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:s(S,{fontSize:"small"})}),s("div",{style:{width:10}}),s(M,{variant:"subtitle2",children:e})]})}))}),s(i,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};$e.propTypes={lang:a.string,buttonText:a.string,selectedPlan:a.string,title:a.string,title_ar:a.string,subtitle:a.string,subtitle_ar:a.string,features:a.array,features_ar:a.array,currency:a.oneOf(["sar","usd"]),cycleText:a.oneOf(["monthly","3-months","6-months","annually"])};var _e=function(e){return s(M,Ie(Ie({},e),{},{children:e.children}))},Ve=function(e){return s("div",{style:e.inForm&&{width:"100%"},children:l("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&s(B,{children:e.label}),e.helperText&&s(M,{style:{marginBottom:!e.label&&10},variant:"validation",children:e.helperText})]}),s(O,Ie({disableUnderline:!0},e))]})})},Ze=function(e){return s(I,Ie({},e))};var He="production"!==process.env.NODE_ENV?a.oneOfType([a.number,a.string,a.object,a.array]):{};function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ye.apply(this,arguments)}function Xe(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function Je(e,t,r={clone:!0}){const n=r.clone?Ye({},e):e;return Xe(e)&&Xe(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(Xe(t[i])&&i in e&&Xe(e[i])?n[i]=Je(e[i],t[i],r):n[i]=t[i])})),n}const Ke=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Qe=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],et=[...Ke,...Qe];function tt(e){return function(e,t,r,n){const i=(o=e,((a=t)&&"string"==typeof a?a.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),o):null)||r);var o,a;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function rt(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}"production"===process.env.NODE_ENV||Ke.reduce(((e,t)=>(e[t]=He,e)),{}),"production"===process.env.NODE_ENV||Qe.reduce(((e,t)=>(e[t]=He,e)),{}),"production"===process.env.NODE_ENV||et.reduce(((e,t)=>(e[t]=He,e)),{});const nt=["values","unit","step"];function it(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=rt(e,nt),o=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Ye({},e,{[t.key]:t.val})),{})})(t),a=Object.keys(o);function l(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-n/100}${r})`}return Ye({keys:a,values:o,up:l,down:s,between:d,only:function(e){return a.indexOf(e)+1<a.length?d(e,a[a.indexOf(e)+1]):l(e)},not:function(e){const t=a.indexOf(e);return 0===t?l(a[1]):t===a.length-1?s(a[t]):d(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var ot={borderRadius:4};const at=["breakpoints","palette","spacing","shape"];const lt=e.createContext(null);"production"!==process.env.NODE_ENV&&(lt.displayName="ThemeContext");var st=lt;function dt(t=null){const r=function(){const t=e.useContext(st);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const ct=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:o={}}=e,a=rt(e,at),l=it(r),s=function(e=8){if(e.mui)return e;const t=tt({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(i);let d=Je({breakpoints:l,direction:"ltr",components:{},palette:Ye({mode:"light"},n),spacing:s,shape:Ye({},ot,o)},a);return d=t.reduce(((e,t)=>Je(e,t)),d),d}();function ut(e=ct){return dt(e)}var pt,mt,ht=W.input(pt||(pt=De(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),gt=W.input(mt||(mt=De(["\n max-width: 70px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),ft=function(e){var t=ut();return l("div",{style:{display:"flex",flexDirection:"row"},children:[s(gt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),s("div",{style:{width:10}}),s(ht,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};ft.propTypes={color:a.string,handleChange:a.func};var vt=function(e){return l(D,{spacing:2,direction:"row",alignItems:"center",style:e.style,children:[e.startElement,s(A,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};vt.propTypes={startElement:a.element,endElement:a.element,handleChange:a.func};var bt=function(e){return l(L,{variant:"settingsRow",children:[s(_e,{children:e.settingsLabel}),"checkbox"===e.settingsType&&s(R,Ie({},e)),"text"===e.settingsType&&s(Ve,Ie({},e)),"boolean"===e.settingsType&&s(Ze,Ie({},e)),"range"===e.settingsType&&s(vt,Ie({},e)),"color"===e.settingsType&&s(ft,Ie({},e)),"radio"===e.settingsType&&s(Ue,Ie({location:"inSettings"},e))]})};bt.propTypes={settingsLabel:a.string,settingsType:a.oneOf(["checkbox","text","radio","boolean","color"])};var yt=function(e){var t,r="ar"===e.lang,n="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":n=s("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":n=s(N,{});break;case"twitter":n=s(j,{});break;case"mada":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":n=s(q,{})}return l(i,Ie(Ie({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[n,s("div",{style:{width:10}}),s(M,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};yt.propTypes={lang:a.string,logo:a.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:a.string};var xt=function(e){return s(i,Ie(Ie({},e),{},{children:e.children}))},wt=function(e){return l("div",{style:{width:"100%"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[s(B,{children:e.label}),e.helperText&&s(M,{variant:"validation",children:e.helperText})]}),s(z,Ie(Ie({},e),{},{children:e.children}))]})},Ct=function(e){var t=ut();return console.log("theme is ",t),s("label",{children:s("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},Tt=function(e){return s(B,{children:s("div",{style:{fontSize:15},children:e.label})})},kt=function(e){return l(p,{severity:e.severity,icon:e.hideIcon,children:[e.title&&s(u,{children:e.title}),e.text]})};kt.propTypes={severity:a.oneOf(["error","info","success","warning"]),title:a.string,text:a.string,hideIcon:a.bool};var Rt=function(e){var t="ar"===e.lang;return s(G,{style:{direction:t?"rtl":"ltr"},children:l(E,{"aria-label":"a dense table",children:[s($,{children:l(_,{children:[e.columns.map((function(e,r){return s(U,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&s(U,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),s(F,{children:e.rows?e.rows.map((function(r,n){return l(_,{children:[r.map((function(e,r){return s(U,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&s(U,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return s(h,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},n)})):s(_,{align:"center",children:s(U,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&s(_,{children:e.end.map((function(e,r){return s(U,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};Rt.propTypes={handleActionClick:a.func,noDataText:a.string,lang:a.string,columns:a.array,rows:a.array,end:a.array};var Lt=function(e){return s(Ve,Ie({endAdornment:s(g,{position:"start",children:s(V,{})})},e))},Mt=function(e){return l(Y,{elevation:0,children:[s(X,{expandIcon:s(H,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:s(M,{children:e.title})}),s(J,{children:l(M,{children:[e.content," "]})})]})};Mt.propTypes={title:a.string,content:a.string};var St={display:"flex",flexDirection:"row",flexWrap:"wrap",marginTop:10},Pt=function(e){var t,i,o,a,d=e.texts,c=e.files,u=e.setFiles;e.setDeletedFiles;var p=e.maxFiles,g=e.accept;e.onAcceptedFiles;var b=e.showPreview,y=e.onDeleteFile,x=e.onClearFiles,w=e.maxSize;e.errorMessages;var C=Ne(r(0),2),k=C[0],R=C[1],L=Ne(r(0),2),M=L[0],S=L[1],P=ut(),O=K({multiple:!0,accept:g,maxSize:w,maxFiles:p,onDrop:function(e){u(e.map((function(e,t){return Object.assign(e,{preview:URL.createObjectURL(e)})})))}}),B=O.getRootProps,I=O.getInputProps,W=O.fileRejections,A=O.acceptedFiles,D=O.isDragActive;n((function(){return function(){null==c||c.forEach((function(e){URL.revokeObjectURL(e.preview)}))}}),[c]),n((function(){u(A)}),[A,k]),x=function(){A.length=0,A.splice(0,A.length),u([])},n((function(){if(w>0){var e=Math.floor(Math.log(w)/Math.log(1024));S(parseFloat((w/Math.pow(1024,e)).toFixed(2))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][e])}}),[w]);var N=W.map((function(e,t){return l("div",{children:[s("div",{children:e.file.name}),s("div",{children:e.errors[0].code})]},t)})),j=null==c?void 0:c.map((function(e,t){return l("div",{style:{position:"relative",margin:10},children:[s(m,{onClick:function(t){t.stopPropagation(),A.splice(A.indexOf(e),1),R(Math.random),y(e)},size:"small",variant:"contained",style:{position:"absolute",top:-10,right:-10,backgroundColor:P.primaryActionColor,color:"white",padding:3},children:s(T,{fontSize:"small"})}),s("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",height:100,width:100,backgroundImage:"url(".concat(e.preview,")"),backgroundSize:"cover",backgroundPosition:"center",border:"1px solid black"}},e.name)]})}));return console.log("error",W),l(f,Ie(Ie({variant:"drop-area"},B({style:{backgroundColor:D&&"white"}})),{},{children:[s("input",Ie({},I())),s(v,{children:"Click here or drop files here to upload"}),l(v,{children:["Max file size is ",M]}),A.length>0&&s(h,{style:{color:"black"},onClick:function(e){e.stopPropagation(),x()},children:"Clear All"}),j&&b?s("aside",{style:St,children:j}):null,"too-many-files"===(null===(t=W[0])||void 0===t||null===(i=t.errors[0])||void 0===i?void 0:i.code)?s(kt,{text:d.tooManyFiles,severity:"error"}):"file-too-large"===(null===(o=W[0])||void 0===o||null===(a=o.errors[0])||void 0===a?void 0:a.code)?s(kt,{text:d.fileTooLarge,severity:"error"}):N]}))},Ot=function(e){return l(b,{variant:"card",direction:"row",maxWidth:e.maxWidth,style:{paddingLeft:5},children:[s("div",{style:{display:"flex",alignItems:"center",borderRight:"1px solid grey",marginRight:20},children:s(Z,{})}),s("div",{style:{width:"100%"},children:e.children})]})},Bt=function(e){var t=Q(),r=t.formState.errors,n=t.handleSubmit,o=t.control;return s(L,{maxWidth:"sm",children:s(ee,Ie(Ie({},t),{},{children:l("form",{onSubmit:n(e.handleUpdateProfile),children:[s(te,{control:o,name:"fullName",render:function(t){var n,i,o=t.field;return s(Ve,Ie({fullWidth:!0,type:"text",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message},o))}}),s(te,{control:o,name:"phoneNumber",render:function(e){var t=e.field;return s(Ve,Ie({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),s(te,{control:o,name:"email",render:function(t){var n,i,o=t.field;return s(Ve,Ie({fullWidth:!0,type:"text",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder},o))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(te,{control:o,name:"password",render:function(t){var n,i,o=t.field;return s(Ve,Ie({fullWidth:!0,type:"password",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message},o))},rules:{required:e.texts.passwordRequiredText}}),s(te,{control:o,name:"confirmPassword",render:function(t){var n,i,o=t.field;return s(Ve,Ie({fullWidth:!0,type:"password",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(i=r.confirmPassword)||void 0===i?void 0:i.message},o))},rules:{required:e.texts.confirmPasswordRequiredText}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},It=function(e){return l(L,{maxWidth:"sm",children:[e.children,s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},Wt=function(e){var t=Ne(r(!1),2),n=t[0],o=t[1],a=Q(),d=a.formState.errors,c=a.handleSubmit,u=a.control;return l(L,{maxWidth:"xs",variant:"auth",children:[n&&s(kt,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?s(_e,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):s(ee,Ie(Ie({},a),{},{children:l("form",{onSubmit:c((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():o(!0)})),children:[s(te,{control:u,name:"password",render:function(t){var r,n,i=t.field;return s(Ve,Ie({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=d.password)||void 0===n?void 0:n.message,startAdornment:s(re,{position:"start",children:s(ne,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),s(te,{control:u,name:"confirmPassword",render:function(t){var r,n,i=t.field;return s(Ve,Ie({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=d.confirmPassword)||void 0===n?void 0:n.message,startAdornment:s(re,{position:"start",children:s(ne,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};Wt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,passwordPlaceholder:a.string,updatePassword:a.string,passwordRequiredText:a.string,passwordLabel:a.string,confirmPasswordPlaceholder:a.string,confirmPasswordLabel:a.string,confirmPasswordRequiredText:a.string,passwordMatchError:a.string,forgotPasswordText:a.string,passwordChanged:a.string}),passwordChanged:a.bool,handleNewPassword:a.func};var At=function(e){var t=Q(),r=t.formState.errors,n=t.handleSubmit;t.register;var o=t.control;return s(L,{maxWidth:"xs",variant:"auth",children:e.sent?s(_e,{style:{textAlign:"center",margin:5},children:e.texts.emailSentText}):l("form",{onSubmit:n(e.handleResetPassword),children:[s(te,{control:o,name:"email",render:function(t){var n,i,o=t.field;return s(Ve,Ie({fullWidth:!0,type:"text",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(re,{position:"start",children:s(ie,{})})},o))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};At.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,emailSentText:a.string,resetPassword:a.string}),sent:a.bool,handleResetPassword:a.func};var Dt=function(e){var t=Q(),r=t.formState.errors,n=t.handleSubmit,o=t.control;return l(L,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&s(kt,{title:e.errorTitle,text:e.errorText,severity:"error"}),s(ee,Ie(Ie({},t),{},{children:l("form",{onSubmit:n(e.handleSignUp),children:[s(te,{control:o,name:"fullName",render:function(t){var n,i,o=t.field;return s(Ve,{fullWidth:!0,type:"text",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message,startAdornment:s(re,{position:"start",children:s(oe,{})})})},rules:{required:e.texts.fullNameRequiredText}}),s(te,{control:o,name:"email",render:function(t){var n,i,o=t.field;return s(Ve,{fullWidth:!0,type:"text",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(re,{position:"start",children:s(ie,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(te,{control:o,name:"password",render:function(t){var n,i,o,a=t.field;return s(Ve,Ie({fullWidth:!0,type:"password",defaultValue:null!==(n=a.value)&&void 0!==n?n:"",value:null!==(i=a.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(o=r.password)||void 0===o?void 0:o.message,startAdornment:s(re,{position:"start",children:s(ne,{})})},a))},rules:{required:e.texts.passwordRequiredText}}),s(i,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l(M,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",s("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),s(ae,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&s(yt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&s(yt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&s(yt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};Dt.propTypes={texts:a.shape({fullNameLabel:a.string,fullNamePlaceholder:a.string,fullNameRequiredText:a.string,emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,passwordTooShortText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,existingUserText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignUp:a.func,handleRouteToSignIn:a.func,handleGoogleSignUp:a.func,handleGithubSignUp:a.func,handleTwitterSignUp:a.func};var Nt=function(e){var t=Q(),r=t.formState.errors,n=t.handleSubmit,o=t.control;return l(L,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&s(kt,{title:e.errorTitle,text:e.errorText,severity:"error"}),l("form",{onSubmit:n(e.handleSignIn),children:[s(te,{control:o,name:"email",render:function(t){var n,i,o=t.field;return s(Ve,Ie({fullWidth:!0,type:"text",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(re,{position:"start",children:s(ie,{})})},o))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(te,{control:o,name:"password",render:function(t){var n,i,o,a=t.field;return s(Ve,Ie({fullWidth:!0,type:"password",defaultValue:null!==(n=a.value)&&void 0!==n?n:"",value:null!==(i=a.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(o=r.password)||void 0===o?void 0:o.message,startAdornment:s(re,{position:"start",children:s(ne,{})})},a))},rules:{required:e.texts.passwordRequiredText}}),s(M,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l(M,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",s("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),s(ae,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&s(yt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&s(yt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&s(yt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};Nt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignIn:a.func,handleRouteToSignUp:a.func,handleGoogleSignIn:a.func,handleGithubSignIn:a.func,handleTwitterSignIn:a.func};var jt=function(e){return l(L,{maxWidth:"xs",children:[s(_e,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&s(yt,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&s(yt,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&s(yt,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&s(yt,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&s(yt,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&s(yt,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&s(yt,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};jt.propTypes={viaMada:a.bool,viaWallet:a.bool,viaSTCPay:a.bool,viaPayPal:a.bool,viaApplePay:a.bool,viaCreditCard:a.bool,madaLabel:a.string,stcPayLabel:a.string,paypalLabel:a.string,walletLabel:a.string,applePayLabel:a.string,visaMasterLabel:a.string,handleMada:a.func,handleWallet:a.func,handleSTCPay:a.func,handlePayPal:a.func,handleApplePay:a.func,handleCreditCard:a.func};var qt=function(e){var t,r=Q(),n=r.formState.errors,o=r.handleSubmit,a=r.control;return s(L,{maxWidth:"xs",children:l("form",{onSubmit:o(e.handle),children:[s(Ve,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message}),s(te,{control:a,name:"cardName",render:function(e){var t;return e.field,s(Ve,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(te,{control:a,name:"cardName",render:function(e){var t;return e.field,s(Ve,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(te,{control:a,name:"cardName",render:function(e){var t;return e.field,s(Ve,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},zt=function(e){var t=Ne(r(0),2),n=t[0],o=t[1],a=Q(),d=a.formState.errors,c=a.handleSubmit,u=a.control;return l(L,{maxWidth:"xs",children:[l(M,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(n).toLocaleString("en")||"0",s(M,{children:e.currency||"SAR"})]}),s(ee,Ie(Ie({},a),{},{children:l("form",{onSubmit:c(e.handleChargeWallet),children:[s(te,{control:u,name:"amount",render:function(t){var r,n,i=t.field;return s(Ve,Ie(Ie({fullWidth:!0,placeholder:e.texts.amountLabel,type:"number",value:null!==(r=i.value)&&void 0!==r?r:""},i),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){i.onChange(parseFloat(e.target.value)),o(e.target.value)},helperText:null===(n=d.amount)||void 0===n?void 0:n.message}))},rules:{required:e.texts.amountRequired}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.chargeWallet})]})}))]})};zt.propTypes={texts:a.shape({amountLabel:a.string,chargeWallet:a.string,amountRequired:a.string}),handleChargeWallet:a.func,currency:a.string};var Et=function(e){return l(L,{maxWidth:"xs",children:[s(M,{align:"center",children:"Wallet Balance"}),l(M,{align:"center",variant:"h1",children:[e.walletBalance||"0",s(M,{children:e.currency||"SAR"})]}),s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},Ft=function(e){var t,r,n,o,a,d,c,u,p,m,h="ar"===e.lang,g=Q(),f=g.formState.errors,v=g.handleSubmit;g.register;var b=g.control,y={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l(L,{maxWidth:"sm",style:{direction:h?"rtl":"ltr"},children:[s(M,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),s(Rt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),s(ae,{variant:"middle"}),s(M,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),s(ee,Ie(Ie({},g),{},{children:l("form",{onSubmit:v(e.handlePayNow),children:[l(L,{sx:y,children:[s(te,{control:b,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,i,o=t.field;return s(Ve,Ie({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=o.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(i=f.firstName)||void 0===i?void 0:i.message},o))}}),s("div",{style:{width:20}}),s(te,{control:b,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,i,o=t.field;return s(Ve,Ie({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=o.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(i=f.lastName)||void 0===i?void 0:i.message},o))}})]}),s(te,{control:b,name:"email",render:function(t){var r,n,i,o=t.field;return s(Ve,Ie({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=o.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(i=f.email)||void 0===i?void 0:i.message},o))},rules:{required:null===(n=e.texts)||void 0===n?void 0:n.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(o=e.texts)||void 0===o?void 0:o.emailInvalidText}}}),l(L,{sx:y,children:[s(te,{control:b,name:"streetAddress",rules:{required:null===(a=e.texts)||void 0===a?void 0:a.required},render:function(t){var r,n,i,o=t.field;return s(Ve,Ie({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=o.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(i=f.streetAddress)||void 0===i?void 0:i.message},o))}}),s("div",{style:{width:20}}),s(te,{control:b,name:"buildingNumber",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,i,o=t.field;return s(Ve,Ie({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=o.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(i=f.buildingNumber)||void 0===i?void 0:i.message},o))}})]}),l(L,{sx:y,children:[s(te,{control:b,name:"province",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,i,o=t.field;return s(Ve,Ie({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=o.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(i=f.province)||void 0===i?void 0:i.message},o))}}),s("div",{style:{width:20}}),s(te,{control:b,name:"city",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,i,o=t.field;return s(Ve,Ie({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=o.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(i=f.city)||void 0===i?void 0:i.message},o))}})]}),l(L,{sx:y,children:[s(te,{control:b,name:"zipCode",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,o=t.field;return s(Ve,Ie({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=o.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(i=f.zipCode)||void 0===i?void 0:i.message},o))}}),s("div",{style:{width:20}}),s(te,{control:b,name:"country",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,o=t.field;return l(wt,Ie(Ie({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=o.value)&&void 0!==n?n:"",helperText:null===(i=f.country)||void 0===i?void 0:i.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},o),{},{children:[s("option",{}),e.countriesList.map((function(e,t){return s("option",{children:e},t)}))]}))}})]}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};Ft.propTypes={texts:a.shape({orderDetails:a.string,billingAddress:a.string,payNow:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string}),lang:a.string,countriesList:a.array,products:a.array,total:a.string,handlePayNow:a.func};var Ut=function(e){var t="ar"===e.lang;return l("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l(L,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[s(M,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),s(ae,{variant:"middle"}),l(M,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",s("strong",{children:e.userEmail})]}),s(M,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),s(M,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),s(ae,{variant:"middle"}),e.products&&l(d,{children:[s(M,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),s(Rt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),s(ae,{variant:"middle"})]}),s(i,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),s(i,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),s(i,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),s(M,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),s("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:s(M,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};Ut.propTypes={texts:a.shape({print:a.string,history:a.string,homePage:a.string,successMessage:a.string,orderDetails:a.string,fasterPaymentNote:a.string,billingAddress:a.string,payNow:a.string,yourOrderNumber:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string,refundPolicy:a.string}),products:a.array,countriesList:a.array,lang:a.string,total:a.string,userEmail:a.string,orderNumber:a.string,confirmationTitle:a.string,handleHome:a.func,handlePrint:a.func,handleHistory:a.func,handleRefundPolicyLink:a.func};var Gt=function(e){var t=Ne(r("sar"),2),n=t[0],i=t[1],o=Ne(r("monthly"),2),a=o[0],d=o[1];return l(L,{style:{width:"fit-content"},variant:"plain",children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:10},children:[s(Ue,{location:"inPricing",handleChange:function(e){return d(e)},defaultValue:"monthly",options:[{label:"Monthly",value:"monthly"},{label:"3 Months",value:"3-months"},{label:"6 Months",value:"6-months"},{label:"Annually",value:"annually"}]}),s(Ue,{location:"inPricing",handleChange:function(e){i(e)},defaultValue:"sar",options:[{label:"USD",value:"usd"},{label:"SAR",value:"sar"}]})]}),s(L,{variant:"pricing",children:e.plans.map((function(t){return s($e,Ie(Ie({lang:e.lang},t),{},{currency:n,cycleText:a}))}))})]})};Gt.propTypes={plans:a.arrayOf(a.shape({title:a.string,title_ar:a.string,subtitle:a.string,subtitle_ar:a.string,price:a.number,currency:a.string,cycleText:a.string,buttonText:a.string,features:a.array,features_ar:a.array,selectedPlan:a.bool})),lang:a.string};var $t=function(e){return s("div",{children:e.children})},_t=le("main",{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open,n=e.direction;return Ie({flexGrow:1,padding:t.spacing(3),transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),marginLeft:"rtl"===n?0:"-".concat(240,"px"),marginRight:"rtl"===n?"-".concat(240,"px"):0},r&&{transition:t.transitions.create("margin",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.enteringScreen}),marginLeft:"ltr"===n&&0,marginRight:"rtl"===n&&0})})),Vt=le(pe,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open,n=e.direction;return Ie({transition:t.transitions.create(["margin","width"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{width:"calc(100% - ".concat(240,"px)"),marginLeft:"rtl"===n?0:"".concat(240,"px"),marginRight:"rtl"===n?"".concat(240,"px"):0,transition:t.transitions.create(["margin","width"],{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.enteringScreen})})})),Zt=le("div")((function(e){var t=e.theme;return Ie(Ie({display:"flex",alignItems:"center",padding:t.spacing(0,1)},t.mixins.toolbar),{},{justifyContent:"flex-end"})})),Ht=function(t){var r=se(),n=Ne(e.useState(!1),2),i=n[0],o=n[1],a="ar"===t.lang,c=function(){o(!0)},u=function(){o(!1)};return l(de,{sx:{display:"flex"},children:[s(ue,{}),s(Vt,{position:"fixed",open:i,direction:a?"rtl":"ltr",style:{alignItems:a?"flex-end":"flex-start",justifyContent:"center"},children:s(me,{children:l(d,a?{children:[s(M,{variant:"h6",noWrap:!0,component:"div",children:"Persistent drawer"}),s(ge,{color:"inherit","aria-label":"open drawer",onClick:c,edge:a?"end":"start",sx:Ie({mr:2},i&&{display:"none"}),children:s(fe,{})})]}:{children:[s(ge,{color:"inherit","aria-label":"open drawer",onClick:c,edge:a?"end":"start",sx:Ie({marginRight:a?0:2,marginLeft:a?2:0},i&&{display:"none"}),children:s(fe,{})}),s(M,{variant:"h6",noWrap:!0,component:"div",children:"Persistent drawer"})]})})}),l(d,a?{children:[l(_t,{open:i,direction:a?"rtl":"ltr",children:[s(Zt,{}),t.children]}),l(ce,{sx:{width:240,flexShrink:0,"& .MuiDrawer-paper":{width:240,boxSizing:"border-box"}},variant:"persistent",anchor:a?"right":"left",open:i,children:[s(Zt,{children:s(ge,{onClick:u,children:"ltr"===r.direction?s(ve,{}):s(be,{})})}),s(ae,{}),s(he,{children:["Inbox","Starred","Send email","Drafts"].map((function(e,t){return l(ye,{button:!0,children:[s(xe,{children:s(t%2==0?Ce:Te,{})}),s(we,{primary:e})]},e)}))}),s(ae,{}),s(he,{children:["All mail","Trash","Spam"].map((function(e,t){return l(ye,{button:!0,children:[s(xe,{children:s(t%2==0?Ce:Te,{})}),s(we,{primary:e})]},e)}))})]})]}:{children:[l(ce,{sx:{width:240,flexShrink:0,"& .MuiDrawer-paper":{width:240,boxSizing:"border-box"}},variant:"persistent",anchor:a?"right":"left",open:i,children:[s(Zt,{children:s(ge,{onClick:u,children:"ltr"===r.direction?s(ve,{}):s(be,{})})}),s(ae,{}),s(he,{children:["Inbox","Starred","Send email","Drafts"].map((function(e,t){return l(ye,{button:!0,children:[s(xe,{children:s(t%2==0?Ce:Te,{})}),s(we,{primary:e})]},e)}))}),s(ae,{}),s(he,{children:["All mail","Trash","Spam"].map((function(e,t){return l(ye,{button:!0,children:[s(xe,{children:s(t%2==0?Ce:Te,{})}),s(we,{primary:e})]},e)}))})]}),l(_t,{open:i,direction:a?"rtl":"ltr",children:[s(Zt,{}),t.children]})]})]})},Yt=["children","onClose","hideClose"],Xt=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=Ae(e,Yt);return l(Me,Ie(Ie({sx:{m:0,p:2}},i),{},{children:[t,n?null:s(ge,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:s(T,{})})]}))};function Jt(e){var t=Ne(r(!1),2);return t[0],t[1],l(ke,Ie(Ie({},e),{},{variant:"main",children:[s(Xt,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),s(Le,{children:e.children}),s(Re,{children:e.actions})]}))}var Kt=function(e){var t=y();return s(Pe,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l(Oe,{onClick:e.action,children:[e.icon&&s(e.icon,{}),e.icon&&s("div",{style:{width:10}}),s(M,{textAlign:"center",children:e.label})]},e.label)}))})};Kt.propTypes={anchor:a.any,handleClose:a.func,menuItems:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func}))};var Qt=function(e){var r=y(),n=Ne(t.useState(null),2),a=n[0],d=n[1],c=Ne(t.useState(null),2),u=c[0],p=c[1],m=function(){return d(null)};return console.log("theme is ",r),s(pe,{position:"static",variant:"appbar",children:s(L,{variant:"appbar",children:l(me,{disableGutters:!0,children:[s(de,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.logo}),l(de,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[s(ge,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:function(e){return d(e.currentTarget)},color:"inherit",children:s(fe,{})}),s(Kt,{anchor:a,handleClose:m,menuItems:e.pages})]}),s(de,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:e.logo}),s(de,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.pages.map((function(e){return s(i,{onClick:m,sx:{my:2,display:"block"},children:e.label},e)}))}),l(de,{sx:{flexGrow:0},children:[s(o,{title:"Open settings",children:s(ge,{onClick:function(e){return p(e.currentTarget)},sx:{p:0},children:s(Se,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),s(Kt,{anchor:u,handleClose:function(e){return p(null)},menuItems:e.accountMenu})]})]})})})};Qt.propTypes={pages:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func})),accountMenu:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func}))};var er=function(e){var r=Ne(t.useState(null),2),n=r[0],i=r[1];return l(f,Ie(Ie({variant:"page-controls"},e),{},{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[s(h,{variant:"layout",onClick:e.backAction,children:e.backText}),s(b,{direction:"row",spacing:1,sx:{display:{xs:"none",md:"flex"}},children:e.actionButtons.map((function(e){return s(h,{variant:"layout",children:e.label})}))}),l(b,{direction:"row",spacing:1,sx:{display:{xs:"flex",md:"none"}},children:[s(h,{variant:"layout",onClick:function(e){return i(e.currentTarget)},children:s(fe,{})}),s(Kt,{handleClose:function(e){return i(null)},anchor:n,menuItems:e.actionButtons})]})]}))};er.propTypes={backText:a.string,backAction:a.func,actionButtons:a.arrayOf(a.shape({label:a.string,action:a.func}))};var tr=function(e,t,r,n,i){return x({typography:{fontFamily:["IBMPlex","Roboto"].join(",")},palette:{primary:{main:t}},components:{MuiStack:{variants:[{props:{variant:"card"},style:{backgroundColor:r,padding:15,borderRadius:e}}]},MuiChip:{styleOverrides:{root:{borderRadius:e}}},MuiSlider:{styleOverrides:{root:{marginRight:15,marginLeft:15,minWidth:50}}},MuiAccordion:{styleOverrides:{root:{borderRadius:"".concat(e,"px !important"),marginBottom:10,position:"unset","&.Mui-expanded":{marginBottom:10,marginTop:10}}}},MuiDivider:{styleOverrides:{root:{margin:20}}},MuiTableContainer:{styleOverrides:{root:{backgroundColor:"white",width:"100%",borderRadius:e,margin:0}}},MuiTableCell:{variants:[{props:{variant:"borderedLeft"},style:{borderLeft:"1px solid #dddddd"}},{props:{variant:"borderedRight"},style:{borderRight:"1px solid #dddddd"}}]},MuiTable:{styleOverrides:{root:{borderRadius:e}}},MuiInputLabel:{styleOverrides:{root:{marginBottom:10,marginTop:10,fontSize:15}}},MuiFormControl:{variants:[{props:{variant:"hawa"},style:{width:"100%"}}]},MuiTypography:{styleOverrides:{},variants:[{props:{variant:"validation"},style:{textAlign:"start",whiteSpace:"nowrap",fontFamily:i,color:"red",fontSize:13,marginTop:0}}]},MuiSelect:{styleOverrides:{root:{backgroundColor:"white",padding:"0px !important",paddingRight:10,paddingLeft:10,borderRadius:e,"&:hover":{outline:"1px solid ".concat(t)},"&:focus":{outline:"1px solid ".concat(t)}},input:{margin:0,border:"none",padding:10,":focus":{border:"none"}}}},MuiInput:{styleOverrides:{root:{backgroundColor:"white",paddingRight:10,paddingLeft:10,borderRadius:e,"&:hover":{outline:"1px solid ".concat(t)},"&:focus":{outline:"1px solid ".concat(t)}},input:{margin:0,border:"none",padding:10,":focus":{border:"none"}}},variants:[{props:{variant:"unscrollable"},style:{"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":{display:"none"},"& input[type=number]":{MozAppearance:"textfield"}}},{props:{variant:"pin"},style:{height:60,width:50,textAlign:"center","& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":{display:"none"},"& input[type=number]":{MozAppearance:"textfield"}}}]},MuiDialog:{styleOverrides:{paper:{borderRadius:e,backgroundColor:r,minWidth:300}}},MuiContainer:{styleOverrides:{root:{display:"flex",flexDirection:"column",backgroundColor:r,borderRadius:e,paddingLeft:20,paddingRight:20,padding:20}},variants:[{props:{variant:"drop-area"},style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:w(r,.3),border:"1px dashed",borderRadius:e,":-moz-drag-over":{backgroundColor:"green"}}},{props:{variant:"page-controls"},style:{background:"none",fontSize:"2rem",padding:"0px !important",marginBottom:10,borderRadius:e}},{props:{variant:"auth"},style:{backgroundColor:r,fontSize:"2rem",padding:20,borderRadius:e}},{props:{variant:"plain"},style:{background:"none"}},{props:{variant:"panelTabs"},style:{display:"flex",flexDirection:"row",width:"fit-content",justifyContent:"space-between",backgroundColor:r,alignItems:"center",paddingLeft:"10px !important",paddingRight:"10px !important",padding:10}},{props:{variant:"pricingTabs"},style:{display:"flex",flexDirection:"row",width:"fit-content",justifyContent:"space-between",backgroundColor:r,alignItems:"center",paddingLeft:"10px !important",paddingRight:"10px !important",padding:10}},{props:{variant:"inSettings"},style:{display:"flex",flexDirection:"row",width:"fit-content",height:50,marginRight:0,backgroundColor:"white",padding:5,paddingLeft:"5px !important",paddingRight:"5px !important"}},{props:{variant:"inPricing"},style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"fit-content",margin:0,height:50,marginRight:0,marginLeft:0,backgroundColor:r,padding:5,paddingLeft:"5px !important",paddingRight:"5px !important"}},{props:{variant:"settingsRow"},style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderRadius:e,backgroundColor:w(r,.4),height:70,marginTop:10,paddingLeft:"20px !important",paddingRight:"10px !important"}},{props:{variant:"plan-card"},style:{display:"flex",flexDirection:"column",borderRadius:e,border:"1px solid ".concat(r),backgroundColor:w(r,.4),margin:10,width:250,maxWidth:200,paddingLeft:"0px !important",paddingRight:"0px !important",padding:0}},{props:{variant:"selected-plan-card"},style:{display:"flex",flexDirection:"column",borderRadius:e,border:"1px solid ".concat(t),backgroundColor:w(t,.4),margin:10,width:250,maxWidth:200,paddingLeft:"0px !important",paddingRight:"0px !important",padding:0}},{props:{variant:"plan-header"},style:{display:"flex",flexDirection:"column",position:"relative",borderRadius:e,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid ".concat(r),backgroundColor:"white",margin:0,padding:20}},{props:{variant:"card-container"},style:{display:"flex",flexDirection:"column",borderRadius:e,border:"1px solid ".concat(r),margin:0,padding:"0px !important"}},{props:{variant:"card-header"},style:{display:"flex",flexDirection:"column",borderRadius:e,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid ".concat(r),backgroundColor:"white",margin:0,padding:"0px !important",paddingLeft:"20px !important",paddingRight:"20px !important"}},{props:{variant:"card-content"},style:{display:"flex",flexDirection:"column",borderRadius:e,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid ".concat(r),margin:0,padding:"0px !important",paddingLeft:"20px !important",paddingRight:"20px !important"}},{props:{variant:"card-actions"},style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",border:"1px solid ".concat(r),margin:0}},{props:{variant:"selected-plan-header"},style:{display:"flex",flexDirection:"column",borderRadius:e,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid ".concat(r),backgroundColor:"white",margin:0,padding:20}},{props:{variant:"pricing"},style:{display:"flex",flexDirection:"row",maxWidth:"max-content",width:"fit-content",padding:0,paddingLeft:"0px !important",paddingRight:"0px !important"}},{props:{variant:"appbar"},style:{boxShadow:"none",display:"flex",flexDirection:"column",backgroundColor:"none !important",background:"none !important",padding:"0px !important",paddingRight:"0px !important",paddingLeft:"0px !important"}}]},MuiSnackbar:{styleOverrides:{root:{borderWidth:10,borderRadius:e}}},MuiButton:{styleOverrides:{root:{textTransform:"uppercase",borderRadius:e,boxShadow:"none","&:hover":{boxShadow:"none"}},contained:{backgroundColor:t}},variants:[{props:{variant:"layout"},style:{backgroundColor:r,"&:hover":{backgroundColor:C(r,.3),color:"white"}}},{props:{variant:"color-picker"},style:function(t){var r=t.theme;return Ie({},{height:40,marginRight:5,marginLeft:5,backgroundColor:r.palette.error.main,color:n,borderRadius:e,"&:hover":{backgroundColor:C(r.palette.error.main,.5),color:"white"}})}},{props:{variant:"danger"},style:function(t){var r=t.theme;return Ie({},{backgroundColor:r.palette.error.main,color:n,borderRadius:e,"&:hover":{backgroundColor:C(r.palette.error.main,.5),color:"white"}})}},{props:{variant:"last"},style:{backgroundColor:t,color:n,marginTop:20,borderRadius:e,"&:hover":{backgroundColor:C(t,.5),color:"white"}}},{props:{variant:"withLogo"},style:{textTransform:"none",border:"1px solid ".concat(C(t,.1)),fontSize:"2rem",backgroundColor:"white",marginTop:10,padding:10,height:50,fontFamily:i,borderRadius:e}},{props:{variant:"selected"},style:{display:"flex",flexDirection:"row",width:"fit-content",backgroundColor:t,justifyContent:"space-between",alignItems:"center",margin:0,color:"white",borderRadius:e,"&:hover":{backgroundColor:C(t,.5),color:"white"}}},{props:{variant:"unselected"},style:{display:"flex",flexDirection:"row",width:"fit-content",background:"none",justifyContent:"space-between",alignItems:"center",margin:0,borderRadius:e}},{props:{variant:"adaptive-dark"},style:{backgroundColor:t,height:40,color:n,margin:0,borderRadius:e,"&:hover":{backgroundColor:C(t,.4)}}},{props:{variant:"adaptive-light"},style:{display:"flex",flexDirection:"row",width:"fit-content",backgroundColor:t,height:50,color:n,justifyContent:"space-between",alignItems:"center",margin:0,borderRadius:e,"&:hover":{backgroundColor:C(t,.4)}}}]},MuiSwitch:{styleOverrides:{root:{display:"flex",flexDirection:"row",alignItems:"center"},track:{backgroundColor:"grey",height:20,borderRadius:e},thumb:{borderRadius:e}}},MuiAlert:{styleOverrides:{root:{borderRadius:e,marginBottom:10},standardError:function(e){var t=e.theme;return Ie({},{backgroundColor:w(t.palette.error.main,.8),outline:"1px solid ".concat(C(t.palette.error.main,.1))})},standardInfo:function(e){var t=e.theme;return Ie({},{backgroundColor:w(t.palette.info.main,.8),outline:"1px solid ".concat(C(t.palette.info.main,.1))})},standardWarning:function(e){var t=e.theme;return Ie({},{backgroundColor:w(t.palette.warning.main,.8),outline:"1px solid ".concat(C(t.palette.warning.main,.1))})},standardSuccess:function(e){var t=e.theme;return Ie({},{backgroundColor:w(t.palette.success.main,.8),outline:"1px solid ".concat(C(t.palette.success.main,.1))})}},variants:[{props:{variant:"inContainer"},style:{color:"black",borderRadius:e}}]},MuiListItemButton:{styleOverrides:{root:{margin:5,borderRadius:e,"&:hover":{backgroundColor:t,color:"white"}}},variants:[{props:{variant:"clicked"},style:{backgroundColor:t,color:"white"}}]},MuiToolbar:{variants:[{props:{variant:"appbar"},style:{color:"black",height:60,backgroundColor:"white",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:0}}]},MuiAppBar:{styleOverrides:{root:{boxShadow:"none",color:"black"}},variants:[{props:{variant:"appbar"},style:{color:"black",margin:0,padding:0,background:"none"}}]},MuiTextField:{styleOverrides:{root:{backgroundColor:"white",paddingRight:10,paddingLeft:10,borderRadius:e,"&:hover":{outline:"1px solid ".concat(t)},"&:focus":{outline:"1px solid ".concat(t)}}},variants:[{props:{variant:"pinInput"},style:{height:60,width:50,textAlign:"center","& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":{display:"none"},"& input[type=number]":{MozAppearance:"textfield"}}}]}}})},rr=function(e,t,r,n,i,o){return e.allBorderRadius=t,e.primaryActionColor=r,e.primaryLayoutColor=n,e.primaryActionTextColor=i,e.mainFont=o,e.palette.primary.main=r,e.components.MuiStack.variants[0].style.borderRadius=t,e.components.MuiStack.variants[0].style.backgroundColor=n,e.components.MuiChip.styleOverrides.root.borderRadius=t,e.components.MuiAccordion.styleOverrides.root.borderRadius="".concat(t,"px !important"),e.components.MuiTableContainer.styleOverrides.root.borderRadius=t,e.components.MuiTable.styleOverrides.root.borderRadius=t,e.components.MuiTypography.variants[0].style.fontFamily=o,e.components.MuiSelect.styleOverrides.root.borderRadius=t,e.components.MuiSelect.styleOverrides.root["&:hover"].outline="1px solid ".concat(r),e.components.MuiSelect.styleOverrides.root["&:focus"].outline="1px solid ".concat(r),e.components.MuiInput.styleOverrides.root["&:hover"].outline="1px solid ".concat(r),e.components.MuiInput.styleOverrides.root["&:focus"].outline="1px solid ".concat(r),e.components.MuiDialog.styleOverrides.paper.borderRadius=t,e.components.MuiDialog.styleOverrides.paper.backgroundColor=n,e.components.MuiContainer.styleOverrides.root.backgroundColor=n,e.components.MuiContainer.styleOverrides.root.borderRadius=t,e.components.MuiContainer.variants[0].style.backgroundColor=w(n,.3),e.components.MuiContainer.variants[0].style.borderRadius=t,e.components.MuiContainer.variants[1].style.borderRadius=t,e.components.MuiContainer.variants[2].style.borderRadius=t,e.components.MuiContainer.variants[4].style.backgroundColor=n,e.components.MuiContainer.variants[5].style.backgroundColor=n,e.components.MuiContainer.variants[7].style.backgroundColor=n,e.components.MuiContainer.variants[8].style.backgroundColor=w(n,.4),e.components.MuiContainer.variants[8].style.borderRadius=t,e.components.MuiContainer.variants[9].style.borderRadius=t,e.components.MuiContainer.variants[9].style.border="1px solid ".concat(n),e.components.MuiContainer.variants[9].style.backgroundColor=w(n,.4),e.components.MuiContainer.variants[10].style.backgroundColor=w(r,.4),e.components.MuiContainer.variants[10].style.border="1px solid ".concat(r),e.components.MuiContainer.variants[10].style.borderRadius=t,e.components.MuiContainer.variants[11].style.borderRadius=t,e.components.MuiContainer.variants[11].style.border="1px solid ".concat(n),e.components.MuiContainer.variants[12].style.border="1px solid ".concat(n),e.components.MuiContainer.variants[12].style.borderRadius=t,e.components.MuiContainer.variants[13].style.borderRadius=t,e.components.MuiContainer.variants[13].style.border="1px solid ".concat(n),e.components.MuiContainer.variants[14].style.borderRadius=t,e.components.MuiContainer.variants[15].style.border="1px solid ".concat(n),e.components.MuiContainer.variants[16].style.border="1px solid ".concat(n),e.components.MuiContainer.variants[16].style.borderRadius=t,e.components.MuiSnackbar.styleOverrides.root.borderRadius=t,e.components.MuiButton.styleOverrides.root.borderRadius=t,e.components.MuiButton.styleOverrides.contained.backgroundColor=r,e.components.MuiButton.variants[0].style.backgroundColor=n,e.components.MuiButton.variants[0].style["&:hover"].backgroundColor=C(n,.3),e.components.MuiButton.variants[1].style=function(e){var r=e.theme;return Ie({},{height:40,marginRight:5,marginLeft:5,backgroundColor:r.palette.error.main,color:i,borderRadius:t,"&:hover":{backgroundColor:C(r.palette.error.main,.5),color:"white"}})},e.components.MuiButton.variants[2].style=function(e){var r=e.palette;return Ie({},{backgroundColor:r.error.main,color:i,borderRadius:t,"&:hover":{backgroundColor:C(r.error.main,.5),color:"white"}})},e.components.MuiButton.variants[3].style.backgroundColor=r,e.components.MuiButton.variants[3].style.color=i,e.components.MuiButton.variants[3].style.borderRadius=t,e.components.MuiButton.variants[3].style["&:hover"].backgroundColor=C(r,.5),e.components.MuiButton.variants[4].style.border="1px solid ".concat(C(r,.1)),e.components.MuiButton.variants[4].style.fontFamily=o,e.components.MuiButton.variants[4].style.borderRadius=t,e.components.MuiButton.variants[5].style.backgroundColor=r,e.components.MuiButton.variants[5].style.borderRadius=t,e.components.MuiButton.variants[5].style["&:hover"].backgroundColor=C(r,.5),e.components.MuiButton.variants[6].style.borderRadius=t,e.components.MuiButton.variants[7].style.backgroundColor=r,e.components.MuiButton.variants[7].style.color=i,e.components.MuiButton.variants[7].style.borderRadius=t,e.components.MuiButton.variants[7].style["&:hover"].backgroundColor=C(r,.4),e.components.MuiButton.variants[8].style.backgroundColor=r,e.components.MuiButton.variants[8].style.color=i,e.components.MuiButton.variants[8].style.borderRadius=t,e.components.MuiButton.variants[8].style["&:hover"].backgroundColor=C(r,.4),e.components.MuiSwitch.styleOverrides.track.borderRadius=t,e.components.MuiSwitch.styleOverrides.thumb.borderRadius=t,e.components.MuiAlert.styleOverrides.root.borderRadius=t,e.components.MuiAlert.variants[0].style.borderRadius=t,e.components.MuiListItemButton.styleOverrides.root.borderRadius=t,e.components.MuiListItemButton.styleOverrides.root["&:hover"].backgroundColor=r,e.components.MuiListItemButton.variants[0].style.backgroundColor=r,e};export{ze as ActionButton,qe as AdaptiveButton,$t as Box,zt as ChargeWalletForm,Ft as CheckoutForm,Ut as ConfirmationPage,tr as CreateHawaTheme,qt as CreditCardForm,Pt as DragDropImages,Ot as DraggableCard,Mt as HawaAccordian,kt as HawaAlert,Qt as HawaAppBar,Ht as HawaAppLayout,xt as HawaButton,Fe as HawaCheckbox,ft as HawaColorPicker,Jt as HawaDialog,Tt as HawaInputLabel,Ge as HawaItemCard,yt as HawaLogoButton,er as HawaPageControls,$e as HawaPricingCard,Ue as HawaRadio,vt as HawaRange,Lt as HawaSearchBar,wt as HawaSelect,bt as HawaSettingsRow,Ee as HawaSnackbar,Rt as HawaTable,Ct as HawaTextArea,Ve as HawaTextField,_e as HawaTypography,Wt as NewPasswordForm,Et as PayWithWallet,Gt as PricingPlans,At as ResetPasswordForm,jt as SelectPayment,Nt as SignInForm,Dt as SignUpForm,rr as UpdateHawaTheme,Bt as UserProfileForm,It as UserSettingsForm};
|