Comparing version 1.3.4 to 1.3.5
@@ -1,1 +0,1 @@ | ||
import*as e from"react";import{useState as t,useEffect as r,useRef as n,useCallback as l,memo as a}from"react";const o=new Map,i=({url:e,key:n,dependencyProps:l=[],credentials:a="same-origin",successCallback:i,errorCallback:c})=>{const[s,m]=t(),[d,u]=t(!1),[h,g]=t(""),[p,w]=t(0);r((()=>{const t=new AbortController;if(!n||!o.has(n))return u(!0),fetch(e,{credentials:a,signal:t.signal}).then((async e=>{const t=await e.json();if(!e.ok)throw new Error(t.message||"Errro while fetching!");m(t),n&&o.set(n,JSON.stringify(t)),i&&i(t)})).catch((e=>{if(!(e instanceof DOMException&&"AbortError"===e.name)){const t=e instanceof Error?e.message:"Something went wrong!";g(t),c&&c(t)}})).finally((()=>u(!1))),()=>{t.abort()};m(JSON.parse(o.get(n)))}),[p,...l]);return{data:s,loading:d,error:h,refetch:()=>{n&&o.delete(n),w((e=>e+1))},clearCache:()=>{n&&o.delete(n)}}},c=({url:e,method:l="POST",credentials:a="same-origin",key:i,successCallback:c,errorCallback:s})=>{const[m,d]=t(),[u,h]=t(!1),[g,p]=t(""),w=n(null),v=async t=>{h(!0),p(""),w.current&&w.current.abort(),w.current=new AbortController;const r=w.current.signal;try{const n={method:l,headers:{"Content-Type":"application/json"},credentials:a,signal:r};t&&(n.body=JSON.stringify({...t}));const s=await fetch(e,n);if(!s.ok){const e=await s.json();throw new Error(e?.message||"Error while fetching!")}const m=await s.json();i&&o.delete(i),d(m),c&&c(m)}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return;{const r=e instanceof Error?e.message:"Something went wrong!";p(r),s&&s(r,t)}}finally{h(!1)}};return r((()=>()=>{w.current&&w.current.abort()}),[]),{data:m,loading:u,error:g,trigger:v}},s="at least 8 characters",m="a number",d="a special",u="a capital",h="a lowercase",g=e=>/\d/.test(e),p=e=>/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(e),w=e=>/[A-Z]/.test(e),v=e=>/[a-z]/.test(e),f=e=>/\S+@\S+\.\S+/.test(e),E=e=>/^[a-zA-Z0-9]+$/.test(e),y=e=>{try{return new URL(e),!0}catch(e){return!1}},b=e=>/^\d{10}$/.test(e),C=e=>/^\d{4}-\d{2}-\d{2}$/.test(e),x=e=>/^\d{2}:\d{2}$/.test(e),k=e=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(e),M=(e,t,r)=>{const n=new Date(e),l=new Date(t),a=new Date(r);return l<=n&&n<=a},A=(e,r=5,n=10)=>{const l="multiple"===e?[]:null,a="multiple"===e?[]:null,[o,i]=t(null),[c,s]=t(l),[m,d]=t(a);return{file:c,preview:m,error:o,changeHandler:t=>{if(t.target.files){if("single"===e){const e=t.target.files[0];if(t.target.files.length>1)return i("Cannot upload more than 1 file, please select type as 'Multiple'");if(e.size>1048576*r)return i("File size too large");const n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{d(n.result)},s(e)}if("multiple"===e){const e=Array.from(t.target.files);if(n&&e.length>n)return i(`Maximum ${n} files allowed`);for(const t of e){if(t.size>1048576*r)return void i("File size too large");const e=new FileReader;e.readAsDataURL(t),e.onloadend=()=>{d((t=>Array.isArray(t)?[...t,e.result]:[e.result]))},s((e=>Array.isArray(e)?[...e,t]:[t]))}}}},clear:()=>{s(l),d(a),i(null)}}},L=()=>{const[e,r]=t(""),[n,l]=t("");return{error:e,value:n,changeHandler:e=>{const t=e.target.value;l(t);const n=[];t.length<8&&n.push(s),g(t)||n.push(m),p(t)||n.push(d),w(t)||n.push(u),v(t)||n.push(h),r(n.length>0?`Password must include ${n.join(", ")} character`:"")},clear:()=>{l(""),r("")}}},z=(e,r=()=>{})=>{const[n,l]=t(e),[a,o]=t("");return{value:n,changeHandler:e=>{let t;t="number"==typeof n?Number(e.target.value):e.target.value,l(t);const a=r(t);o(a?a.errorMessage:"")},error:a,clear:()=>{l(e),o("")}}},R=({title:r="Confirm Delete",subtitle:l="Are you sure you want to delete?",confirmHandler:a})=>{const o=n(null),[i,c]=t(!1),s=()=>c(!1),m=e=>{if(!o.current)return;const t=o.current?.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&s()},d=()=>{s(),a()};return{ConfirmModal:({containerStyles:t={},noBtnStyles:n={},yesBtnStyles:a={},subtitleStyles:c={},titleStyles:u={},containerClassName:h})=>e.createElement("section",{onKeyDown:e=>e.preventDefault(),onClick:m,style:{display:i?"block":"none",height:"100vh",width:"100%",position:"fixed",top:0,left:0}},e.createElement("article",{style:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0.8)",backdropFilter:"blur(2px)"}}),e.createElement("div",{className:`_6pp-confirm-modal ${h}`,style:{width:"20rem",backgroundColor:"white",padding:"1rem",borderRadius:"0.25rem",border:"none",position:"fixed",top:"50%",left:"50%",zIndex:20,transform:"translate(-50%,-50%)",...t},ref:o},e.createElement("h5",{style:{fontFamily:"sans-serif",textTransform:"uppercase",...u}},r),e.createElement("p",{style:{fontFamily:"monospace",margin:"1rem",...c}},l),e.createElement("div",{style:{display:"flex",gap:"1rem",marginTop:"1rem 0",float:"right"}},e.createElement("button",{style:{border:"none",outline:"none",cursor:"pointer",padding:"0.5rem 1rem",borderRadius:"5px",backgroundColor:"inherit",color:"rgba(0,0,0,0.9)",transition:"all 0.3s",...n},autoFocus:!0,onClick:s},"No"),e.createElement("button",{style:{border:"none",outline:"none",cursor:"pointer",borderRadius:"5px",padding:"0.5rem 1rem",backgroundColor:"rgba(0,0,0,0.9)",color:"white",transition:"all 0.3s",...a},onClick:d},"Yes")))),showModal:()=>c(!0),close:close}},H=({IconFilled:n,IconOutline:l,maxRating:a=5,value:o=0,selectable:i=!1,styles:c={}})=>{if(a<1)throw new Error("maxRating should be greater than 0");if(o>a)throw new Error("value should be less than Max Rating");const[s,m]=t(o);r((()=>{m(o)}),[o]);return{Ratings:()=>e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",...c}},Array.from({length:a}).map(((t,r)=>e.createElement("span",{style:{cursor:i?"pointer":"unset"},key:r,onClick:()=>{return e=r+1,void(i&&m(e));var e}},r<s&&e.createElement("span",null,n),r>=s&&e.createElement("span",null,l))))),rating:s,setRating:m}},B=(e,a,o,i,c,s=1)=>{const[m,d]=t([]),[u,h]=t(1),[g,p]=t(!0),[w,v]=t(!1),[f,E]=t(),y=n(null),b=l((async()=>{try{v(!0);const t=await fetch(`${e}?${a}=${u}&${o}=${i}`,{credentials:"include"});if(!t.ok)throw new Error("Something went wrong");const r=await t.json();d((e=>[...e,...r])),p(r.length>0)}catch(e){E(e||"Something went wrong")}finally{v(!1)}}),[u,i,e,a,o]);return r((()=>{b()}),[b]),r((()=>{const e=new IntersectionObserver((e=>{e[0].isIntersecting&&g&&!w&&(y.current&&clearTimeout(y.current),y.current=setTimeout((()=>{s!==u&&h((e=>e+1))}),200))}),{rootMargin:"100px"}),t=document.querySelector(`.${c}:last-of-type`);return t&&e.observe(t),()=>{e.disconnect(),y.current&&clearTimeout(y.current)}}),[s,u,g,w]),{loading:w,hasMore:g,page:u,error:f,data:m,setData:d}},S=(e,a,o,i,c,s=!1)=>{const[m,d]=t([]),u=n(null),h=l((()=>{u.current&&clearTimeout(u.current),u.current=setTimeout((()=>{if(!e.current)return;const{scrollTop:t}=e.current;if(0===t){if(a===o)return;i((e=>e+1))}}),200)}),[a,o]);return r((()=>{const t=e.current;return t&&t.addEventListener("scroll",h),()=>{t&&t.removeEventListener("scroll",h)}}),[h,m]),r((()=>{let t=0,r=0;e.current&&(t=e.current.scrollHeight,r=e.current.scrollTop),c&&d((e=>{const t=new Set(e.map((e=>e._id))),r=c?.filter((e=>!t.has(e._id)));if(s){return[...(Array.isArray(r)?[...r]:[r]).reverse(),...e]}return[...r,...e]})),requestAnimationFrame((()=>{if(e.current){const n=r+e.current.scrollHeight-t;e.current.scrollTop=n}}))}),[c]),{data:m,setData:d}},N=({totalPages:r=1,currPage:n,setCurrPage:l,activeButtonStyle:a={backgroundColor:"black",color:"white"},Button:o=({children:t,onClick:r,style:n})=>e.createElement("button",{style:{padding:"0.5rem 1rem",outline:"none",border:"none",borderRadius:"0.5rem",cursor:"pointer",backgroundColor:"#e2e8f0",...n},onClick:r},t),Container:i=({children:t})=>e.createElement("ul",{style:{display:"flex",gap:"1rem",listStyle:"none"}},t)})=>{const[c,s]=t(1);return e.createElement(i,null,e.createElement(e.Fragment,null,c>1&&e.createElement("li",null,e.createElement(o,{onClick:()=>s((e=>e-4))},"Prev")),Array.from({length:Math.min(4,r)},((e,t)=>c+t)).map((t=>e.createElement("li",{key:t},e.createElement(o,{style:n===t?a:{},onClick:()=>(e=>{l(e),e>c+4-1?s(e):e<c&&s(e-4+1)})(t)},t)))),r>c+4-1&&e.createElement("li",null,e.createElement(o,{onClick:()=>s((e=>e+4))},"Next"))))},V=({totalPages:t=1,currPage:r,setCurrPage:n,Typography:l=({children:t})=>e.createElement("code",null,t),Button:a,Container:o=({children:t})=>e.createElement("nav",{style:{display:"flex",alignItems:"center",gap:"1rem",padding:"1rem 0"}},t)})=>{const i=1===r,c=r===t;return e.createElement(o,null,e.createElement(e.Fragment,null,e.createElement(a,{disabled:i,onClick:()=>{1!==r&&n((e=>e-1))}},"Previous"),e.createElement(l,null,r," of ",t),e.createElement(a,{disabled:c,onClick:()=>{r!==t&&n((e=>e+1))}},"Next")))},$=({images:a,darkMode:o=!1,objectFit:i="cover",setIsOpen:c,PrevButton:s,NextButton:m})=>{const[d,u]=t(0),h=n(null),g=n(null),p=o?"1px solid #fff":"1px solid black",w=l((e=>{const t=e.clientY;h.current?.scrollTo({top:t})}),[]);r((()=>(h.current&&h.current.addEventListener("mousemove",w),()=>{h.current&&h.current.removeEventListener("mousemove",w)})),[]);const v=e.createElement("aside",{style:{display:"flex",flexDirection:"column",gap:"1rem",position:"absolute",top:"1rem",left:"1rem"}},a.map(((t,r)=>e.createElement("button",{key:r,style:{border:r===d?p:"1px solid rgba(0,0,0,0.3)",outline:"none",backgroundColor:"transparent",width:"fit-content",height:"unset",cursor:"pointer"},onClick:()=>u(r)},e.createElement("img",{style:{width:"2rem",height:"2.5rem",objectFit:"contain"},src:t,alt:"Image"}))))),f=e.createElement("article",{style:{display:"flex",width:"95%",justifyContent:"space-between",alignItems:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},e.createElement(s,{onClick:()=>{u(0===d?a.length-1:e=>e-1)}}),e.createElement(m,{onClick:()=>{d===a.length-1?u(0):u((e=>e+1))}}));return e.createElement("section",{style:{width:"100vw",height:"100vh",backgroundColor:"rgba(0,0,0,0.7)",position:"fixed",top:0,left:0,zIndex:200},onClick:e=>{if(!h.current)return;const t=h.current.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&c(!1)}},e.createElement("div",{style:{width:"100%",maxWidth:"950px",height:"100vh",position:"relative",margin:"auto",boxShadow:o?"0 0 5px black":"0 0 5px white",overflow:"auto",cursor:"s-resize",scrollbarWidth:"none",backgroundColor:o?"black":"#fff"},ref:h},e.createElement("img",{ref:g,src:a[d],style:{width:"100%",minHeight:"100vh",objectFit:i}}),e.createElement("div",{style:{position:"fixed",top:0,width:"95%",maxWidth:"950px",height:"100vh"}},v,f)))},T=({imageSize:n=["100%","80vw","25rem","30rem"],images:a=[],objectFit:o="cover",imageBg:i="transparent",sideImageSize:c=["3rem","3.5rem","4rem","5rem"]})=>{if(0===a.length)throw new Error("imageSize should not be more than 4");if(n.length>5)throw new Error("imageSize should not be more than 4");const[s,m]=t(0),[d,u]=t(""),[h,g]=t(""),p=l((()=>{const e=window.screen.width;e<480?(u(n[0]),g(c[0])):e<768&&n.length>=3?(u(n[1]),g(c[1])):e<992&&n.length>=4?(u(n[2]),g(c[2])):e<1280&&n.length>=5?(u(n[3]),g(c[3])):(u(n[n.length-1]),g(c[c.length-1]))}),[]);return r((()=>(p(),window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)})),[]),e.createElement("div",{style:{width:"fit-content",display:"flex",gap:"1rem",padding:"1rem"}},e.createElement("aside",{style:{display:"flex",flexDirection:"column",width:"fit-content",gap:"1rem"}},a.map(((t,r)=>e.createElement("img",{key:r,style:{width:h,height:h,borderRadius:"0.25rem",objectFit:o,border:"1px solid rgba(0,0,0,0.3)"},src:t,alt:`Image-${r}`,onMouseOver:()=>m(r)})))),e.createElement("section",{style:{width:d,height:d,overflow:"hidden",scrollbarWidth:"none",display:"flex",alignItems:"center",borderRadius:"0.5rem",backgroundColor:i}},a.map(((t,r)=>e.createElement("img",{key:r,style:{width:d,height:d,objectFit:"contain",aspectRatio:"1/1",borderRadius:"0.5rem",transition:"all 0.3s",transform:`translateX(-${100*s}%)`},src:t,alt:`Photo-${r}`})))))},F=({images:n,objectFit:l="cover",PrevIcon:a,NextIcon:o,bgColor:i="inherit",showNav:c=!0,showDots:s,showThumbnails:m,autoplay:d,autoplayDuration:u=4e3,onClick:h})=>{const[g,p]=t(0),w=()=>{p((e=>e===n.length-1?0:e+1))};r((()=>{let e;return d&&(e=setInterval((()=>{w()}),u)),()=>{e&&clearInterval(e)}}),[]);const v=e.createElement("article",{style:{padding:"1rem",position:"absolute",display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",top:"50%",transform:"translateY(-50%)"}},e.createElement("button",{style:{border:"none",backgroundColor:"transparent",cursor:"pointer",outline:"none"},onClick:()=>{p((e=>0===e?n.length-1:e-1))}},a||"Prev"),e.createElement("button",{style:{border:"none",backgroundColor:"transparent",cursor:"pointer",outline:"none"},onClick:w},o||"Next")),f=e.createElement("article",{style:{padding:"1rem",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",bottom:0,gap:"0.5rem"}},n.map(((t,r)=>e.createElement("button",{key:r,style:{width:"0.75rem",height:"0.75rem",borderRadius:"50%",border:"none",backgroundColor:r===g?"white":"black"},onClick:()=>p(r)})))),E=e.createElement("aside",{style:{height:"5rem",display:"flex",justifyContent:"center",gap:"1rem",flexWrap:"wrap"}},n.map(((t,r)=>e.createElement("img",{key:r,style:{width:"5rem",height:"5rem",borderRadius:"0.25rem",objectFit:"cover",border:"1px solid rgba(0,0,0,0.3)"},src:t,alt:`Image-${r}`,onMouseOver:()=>p(r)}))));return e.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column",gap:"1rem",backgroundColor:i}},e.createElement("div",{style:{height:"100%",display:"flex",overflowX:"hidden",position:"relative"}},n.map(((t,r)=>e.createElement("img",{key:r,style:{width:"100%",height:"100%",objectFit:l,flex:"none",transition:"all 0.3s",transform:`translateX(-${100*g}%)`},src:t,onClick:()=>h&&h()}))),c&&v,s&&f),m&&E)},I=a((({size:t=10,color:a="black",styles:o,zoom:i="2",mode:c="normal"})=>{if(t<1||t>40)throw new Error("Size must be between 1 and 40");const s=n(),m=n({x:0,y:0}),d=n(!1),u=e=>{m.current={x:e.clientX,y:e.clientY};const t=e.target.getAttribute("data-firebolt-zoom");d.current=Boolean(t)},h=l((()=>{let e=m.current.x,t=m.current.y;const r=s.current;r&&(Array.from(r).forEach(((n,l)=>{n.style.left=e-12+"px",n.style.top=t-12+"px",n.x=e,n.y=t;const a=(r.length-l)/r.length;n.style.scale=a.toString();const o=r[l+1]||r[0];e+=.3*(Number(o.x||0)-e),t+=.3*(Number(o.y||0)-t),0===l&&d.current&&(n.style.scale=i)})),requestAnimationFrame(h))}),[]);return r((()=>(s.current=document.getElementsByClassName("6pp-firebolt-Cursor"),h(),window.addEventListener("mousemove",u),()=>{window.removeEventListener("mousemove",u)})),[]),e.createElement("div",{style:{zIndex:"10000",mixBlendMode:c,pointerEvents:"none"}},Array.from({length:t}).map(((t,r)=>e.createElement("div",{className:"6pp-firebolt-Cursor",key:r,style:{position:"fixed",height:"24px",width:"24px",borderRadius:"50%",left:0,top:0,backgroundColor:a,userSelect:"none",pointerEvents:"none",transition:"scale 0.2s",...o}}))))})),j=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 16 16"},e.createElement("path",{d:"M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5M.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5m15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5"})),D=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 16 16"},e.createElement("path",{d:"M5.5 0a.5.5 0 0 1 .5.5v4A1.5 1.5 0 0 1 4.5 6h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5m5 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 10 4.5v-4a.5.5 0 0 1 .5-.5M0 10.5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 6 11.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5m10 1a1.5 1.5 0 0 1 1.5-1.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0z"})),P=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M17.849,20.934a1.555,1.555,0,0,1-.781-.212l-4.16-2.4a3.769,3.769,0,0,0-1.877-.5H7.214a2.631,2.631,0,0,1-2.628-2.627V8.809A2.631,2.631,0,0,1,7.214,6.182h3.817a3.747,3.747,0,0,0,1.877-.5l4.16-2.4a1.564,1.564,0,0,1,2.346,1.354V19.369a1.57,1.57,0,0,1-1.565,1.565ZM7.214,7.182A1.63,1.63,0,0,0,5.586,8.809v6.382a1.629,1.629,0,0,0,1.628,1.627h3.817a4.756,4.756,0,0,1,2.377.637l4.16,2.4a.543.543,0,0,0,.563,0,.553.553,0,0,0,.283-.487V4.632a.565.565,0,0,0-.846-.489l-4.16,2.4a4.753,4.753,0,0,1-2.377.637Z"})),_=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("g",null,e.createElement("path",{d:"M13.816,19.937a1.446,1.446,0,0,1-.717-.194L9.43,17.623a3.257,3.257,0,0,0-1.625-.434H4.439a2.379,2.379,0,0,1-2.375-2.376V9.187A2.378,2.378,0,0,1,4.439,6.812H7.805A3.257,3.257,0,0,0,9.43,6.376L13.1,4.259A1.437,1.437,0,0,1,15.255,5.5V18.5a1.424,1.424,0,0,1-.718,1.245A1.445,1.445,0,0,1,13.816,19.937ZM4.439,7.812A1.377,1.377,0,0,0,3.064,9.187v5.626a1.378,1.378,0,0,0,1.375,1.376H7.805a4.254,4.254,0,0,1,2.125.569L13.6,18.876a.439.439,0,0,0,.657-.38V5.5a.438.438,0,0,0-.657-.379L9.93,7.242a4.251,4.251,0,0,1-2.125.57Z"}),e.createElement("path",{d:"M18.407,6.262a7.79,7.79,0,0,1,.021,11.476c-.474.437.235,1.143.707.707a8.793,8.793,0,0,0-.021-12.89c-.474-.434-1.184.272-.707.707Z"}),e.createElement("path",{d:"M16.91,9.031a4.021,4.021,0,0,1,.012,5.938c-.474.438.234,1.143.707.707a5.025,5.025,0,0,0-.012-7.352c-.474-.434-1.183.272-.707.707Z"}))),Z=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},e.createElement("g",null,e.createElement("path",{d:"M13.817,19.936a1.424,1.424,0,0,1-.719-.2L9.43,17.624a3.254,3.254,0,0,0-1.625-.436H4.44a2.377,2.377,0,0,1-2.375-2.375V9.187A2.378,2.378,0,0,1,4.44,6.811H7.805A3.257,3.257,0,0,0,9.43,6.377L13.1,4.259A1.438,1.438,0,0,1,15.255,5.5V18.5a1.423,1.423,0,0,1-.718,1.245A1.439,1.439,0,0,1,13.817,19.936ZM4.44,7.811A1.377,1.377,0,0,0,3.065,9.187v5.626A1.377,1.377,0,0,0,4.44,16.188H7.805a4.247,4.247,0,0,1,2.125.571L13.6,18.876a.437.437,0,0,0,.439,0,.433.433,0,0,0,.218-.379V5.5a.438.438,0,0,0-.657-.379L9.93,7.242a4.25,4.25,0,0,1-2.125.569Z"}),e.createElement("path",{d:"M17.606,14.445a.5.5,0,0,1-.7-.711c.17-.169.34-.349.52-.52l1.21-1.209c-.57-.581-1.15-1.161-1.73-1.74a.5.5,0,0,1,.7-.71l1.74,1.739,1.74-1.739a.5.5,0,0,1,.7.71l-1.73,1.74,1.73,1.729a.5.5,0,0,1-.7.711L19.343,12.7Z"}))),O=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"})),X=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"})),q=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M0 96C0 60.7 28.7 32 64 32H512c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"})),Y=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M512 80c8.8 0 16 7.2 16 16V416c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V96c0-8.8 7.2-16 16-16H512zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"})),W=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"24",height:"24",fill:"currentColor"},e.createElement("circle",{cx:"256",cy:"256",r:"48"}),e.createElement("path",{d:"M470.39 300l-.47-.38-31.56-24.75a16.11 16.11 0 01-6.1-13.33v-11.56a16 16 0 016.11-13.22L469.92 212l.47-.38a26.68 26.68 0 005.9-34.06l-42.71-73.9a1.59 1.59 0 01-.13-.22A26.86 26.86 0 00401 92.14l-.35.13-37.1 14.93a15.94 15.94 0 01-14.47-1.29q-4.92-3.1-10-5.86a15.94 15.94 0 01-8.19-11.82l-5.59-39.59-.12-.72A27.22 27.22 0 00298.76 26h-85.52a26.92 26.92 0 00-26.45 22.39l-.09.56-5.57 39.67a16 16 0 01-8.13 11.82 175.21 175.21 0 00-10 5.82 15.92 15.92 0 01-14.43 1.27l-37.13-15-.35-.14a26.87 26.87 0 00-32.48 11.34l-.13.22-42.77 73.95a26.71 26.71 0 005.9 34.1l.47.38 31.56 24.75a16.11 16.11 0 016.1 13.33v11.56a16 16 0 01-6.11 13.22L42.08 300l-.47.38a26.68 26.68 0 00-5.9 34.06l42.71 73.9a1.59 1.59 0 01.13.22 26.86 26.86 0 0032.45 11.3l.35-.13 37.07-14.93a15.94 15.94 0 0114.47 1.29q4.92 3.11 10 5.86a15.94 15.94 0 018.19 11.82l5.56 39.59.12.72A27.22 27.22 0 00213.24 486h85.52a26.92 26.92 0 0026.45-22.39l.09-.56 5.57-39.67a16 16 0 018.18-11.82c3.42-1.84 6.76-3.79 10-5.82a15.92 15.92 0 0114.43-1.27l37.13 14.95.35.14a26.85 26.85 0 0032.48-11.34 2.53 2.53 0 01.13-.22l42.71-73.89a26.7 26.7 0 00-5.89-34.11zm-134.48-40.24a80 80 0 11-83.66-83.67 80.21 80.21 0 0183.66 83.67z"})),U=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4zM416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"})),J=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM10.6219 8.41459C10.5562 8.37078 10.479 8.34741 10.4 8.34741C10.1791 8.34741 10 8.52649 10 8.74741V15.2526C10 15.3316 10.0234 15.4088 10.0672 15.4745C10.1897 15.6583 10.4381 15.708 10.6219 15.5854L15.5008 12.3328C15.5447 12.3035 15.5824 12.2658 15.6117 12.2219C15.7343 12.0381 15.6846 11.7897 15.5008 11.6672L10.6219 8.41459Z"})),K=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM4 5V19H20V5H4ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z"})),Q=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},e.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M7 9l-3 -3l3 -3"}),e.createElement("path",{d:"M15.997 17.918a6.002 6.002 0 0 0 -.997 -11.918h-11"}),e.createElement("path",{d:"M6 14v6"}),e.createElement("path",{d:"M9 15.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0 -3 0z"})),G=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},e.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M17 9l3 -3l-3 -3"}),e.createElement("path",{d:"M8 17.918a5.997 5.997 0 0 1 -5 -5.918a6 6 0 0 1 6 -6h11"}),e.createElement("path",{d:"M12 14v6"}),e.createElement("path",{d:"M15 15.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0 -3 0z"})),ee=e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 6C3 4.34315 4.34315 3 6 3H18C19.6569 3 21 4.34315 21 6V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V6ZM6 5H18C18.5523 5 19 5.44772 19 6V12.2676C18.7058 12.0974 18.3643 12 18 12H14C12.8954 12 12 12.8954 12 14V18C12 18.3643 12.0974 18.7058 12.2676 19H6C5.44772 19 5 18.5523 5 18V6C5 5.44772 5.44772 5 6 5Z",fill:"currentColor"})),te=({min:t=0,max:l=100,value:a,changeHandler:o,color:i="white"})=>{const c=n(null);return r((()=>{const e=a/l*100;c.current&&(c.current.style.background=`linear-gradient(to right,${"orange"===i?"#f50":i} ${e}%, #ccc ${e}%)`)}),[a]),e.createElement("input",{className:`_6pp-basic-slider slider-theme-${i}`,ref:c,type:"range",min:t,max:l,value:a,id:"range",onChange:o})},re=[.5,.75,1,1.25,1.5,2],ne=new Intl.NumberFormat(void 0,{minimumIntegerDigits:2}),le=e=>{const t=Math.floor(e%60),r=Math.floor(e/60%60),n=Math.floor(e/3600);return 0===n?`${r}:${ne.format(t)}`:`${n}:${ne.format(r)}:${ne.format(t)}`},ae=({width:a="40rem",height:o="20.5rem",src:i,poster:c,captions:s,qualityOptions:m=[480,720,1080,1440],setQuality:d})=>{const u=n(null),h=n(null),g=n(null),p=n(!1),[w,v]=t(!1),[f,E]=t(!0),[y,b]=t(!1),[C,x]=t(50),[k,M]=t(C),[A,L]=t(1),[z,R]=t(!1),[H,B]=t(!1),[S,N]=t(!1),[V,$]=t("00:00"),[T,F]=t("0:0"),[I,ne]=t(0),[ae,oe]=t(0),[ie,ce]=t(!1),[se,me]=t(!1),de=()=>ce((e=>!e)),ue=()=>me((e=>!e)),he=()=>N((e=>!e)),ge=()=>B((e=>!e)),pe=()=>E((e=>(e?g.current?.play():g.current?.pause(),!e))),we=()=>{z?document.exitFullscreen():document.documentElement.requestFullscreen(),R((e=>!e))},ve=()=>{const e=g.current;e&&(e.currentTime-=10)},fe=()=>{const e=g.current;e&&(e.currentTime+=10)},Ee=()=>b((e=>(e?x(k):(M(C),x(0)),!e))),ye=l((e=>{u.current&&!u.current.contains(e.target)&&ce(!1),h.current&&!h.current.contains(e.target)&&me(!1)}),[]),be=l((e=>{e.preventDefault(),"Escape"===e.key&&(document.exitFullscreen(),R(!1)),"f"===e.key&&we(),"m"===e.key&&Ee()," "===e.key&&pe(),"s"===e.key&&de(),"c"===e.key&&he(),"t"===e.key&&ge(),"ArrowRight"===e.key&&fe(),"ArrowLeft"===e.key&&ve()}),[we,Ee,pe,ve,fe,he,de,ge]);r((()=>(document.addEventListener("mousedown",ye),document.addEventListener("keydown",be),()=>{document.removeEventListener("mousedown",ye),document.removeEventListener("keydown",be)})),[ye,be]);const Ce=l((()=>{g.current&&$(le(g.current.duration))}),[g.current]),xe=l((()=>{const e=g.current;if(e){F(le(e.currentTime)),!1===p.current&&oe(e.currentTime/e.duration*100);let t=0;e.buffered.length>0&&(t=e.buffered.end(e.buffered.length-1)/e.duration*100),ne(t)}}),[F,oe,ne]);r((()=>{const e=g.current;return e&&(e.addEventListener("loadeddata",Ce),e.addEventListener("timeupdate",xe)),()=>{e&&(e.removeEventListener("loadeddata",Ce),e.removeEventListener("timeupdate",xe))}}),[Ce,xe,g.current]),r((()=>{b(0===C)}),[C]),r((()=>{g.current&&(g.current.playbackRate=A)}),[A]),r((()=>{g.current&&(g.current.volume=C/100)}),[C]),r((()=>(g.current&&(g.current.textTracks[0].mode=S?"showing":"hidden"),()=>{g.current&&(g.current.textTracks[0].mode="hidden")})),[S]),r((()=>()=>{E(!0),ce(!1),me(!1),oe(0),ne(0),v(!1),L(1)}),[i,c]);const ke=ie&&e.createElement("div",{ref:u,className:"_6pp-video-player-setting-panel"},e.createElement("ul",null,m.map(((t,r)=>e.createElement("li",{key:t,style:{borderTopLeftRadius:0===r?"0.5rem":0,borderTopRightRadius:0===r?"0.5rem":0,borderBottomLeftRadius:r===m.length-1?"0.5rem":0,borderBottomRightRadius:r===m.length-1?"0.5rem":0},onClick:()=>(d(t),void de())},t,"p"))))),Me=se&&e.createElement("div",{ref:h,className:"_6pp-video-player-speed-panel"},e.createElement("ul",null,re.map(((t,r)=>e.createElement("li",{key:t,style:{borderTopLeftRadius:0===r?"0.5rem":0,borderTopRightRadius:0===r?"0.5rem":0,borderBottomLeftRadius:r===re.length-1?"0.5rem":0,borderBottomRightRadius:r===re.length-1?"0.5rem":0},onClick:()=>(e=>{L(e),ue()})(t)},t,"x"))))),Ae=e.createElement("div",{className:"_6pp-video-player-timeline-container",onMouseMove:e=>{if(!p.current)return;e.preventDefault();const t=e.currentTarget.getBoundingClientRect(),r=Math.min(Math.max(0,e.clientX-t.left),t.width)/t.width*100;oe(r)},onMouseUp:e=>{const t=g.current;if(!t)return;p.current=!1;const r=e.currentTarget.getBoundingClientRect(),n=(e.clientX-r.left)/r.width*100/100*t.duration;t.currentTime=n},onMouseDown:()=>{p.current=!0}},e.createElement("div",{className:"_6pp-video-player-timeline-thumb",style:{left:`${ae}%`}}),e.createElement("div",{className:"_6pp-video-player-timeline-progress",style:{width:`${ae}%`}}),e.createElement("div",{className:"_6pp-video-player-timeline-buffer-progress",style:{width:`${I}%`}})),Le=e.createElement("div",{className:"_6pp-video-player-controls"},e.createElement("button",{title:"Rewind Backward 10 Seconds",onClick:ve},Q),e.createElement("button",{disabled:w,onClick:pe,title:f?"Play":"Pause"},f?O:X),e.createElement("button",{title:"Fast Forward 10 Seconds",onClick:fe},G),e.createElement("button",{title:"Volume",onClick:Ee},y?Z:C>50?_:P),e.createElement("div",{className:"_6pp-video-player-volume-slider"},e.createElement(te,{value:C,changeHandler:e=>x(Number(e.target.value))})),e.createElement("div",{className:"_6pp-video-player-duration"},e.createElement("span",null,T)," ",e.createElement("span",null,"/")," ",e.createElement("span",null,V)),e.createElement("button",{style:{marginLeft:"auto"},onClick:de,title:"Settings"},ie?W:U),e.createElement("button",{title:S?"Hide Captions":"Show Captions",onClick:he},S?q:Y),e.createElement("button",{title:"Plackback Speed",style:{fontSize:"1.25rem"},onClick:ue},A,"x"),e.createElement("button",{onClick:()=>g.current?.requestPictureInPicture(),title:"Mini Player"},ee),e.createElement("button",{onClick:ge,title:H?"Exit Theater Mode":"Theater Mode"},H?J:K),e.createElement("button",{onClick:we,title:z?"Exit Full Screen":"Full Screen"},z?D:j)),ze=e.createElement("div",{className:"_6pp-video-player-loading"},e.createElement("div",{className:"_6pp-video-player-loading-spinner"}));return e.createElement("div",{className:"_6pp-video-player-container",style:{width:z?"100vw":H?"100%":a,height:z?"100vh":H?"70vh":o,position:z?"fixed":"relative"},onContextMenu:e=>e.preventDefault()},ke,Me,e.createElement("div",{className:"_6pp-video-player-controls-container"},Ae,Le),w?ze:null,e.createElement("video",{ref:g,src:i,className:"_6pp-video-player-video",style:{filter:w?"blur(5px)":"none"},onClick:pe,poster:c,onWaiting:()=>v(!0),onPlaying:()=>v(!1)},e.createElement("track",{src:s,kind:"captions",srcLang:"en",label:"English"})),e.createElement("div",{className:"_6pp-video-player-backdrop"}))};export{I as FireBolt,$ as MyntraCarousel,V as PageStepper,N as Pagination,te as RangeSlider,F as Slider,T as StylishCarousel,ae as VideoPlayer,M as isDateBetween,w as isIncludeCapitalLetter,v as isIncludeLowercaseLetter,g as isIncludeNumber,p as isIncludeSpecialChar,C as isValidDate,k as isValidDateTime,f as isValidEmail,b as isValidPhoneNumber,x as isValidTime,y as isValidUrl,E as isValidUsername,R as useConfirmModal,i as useFetchData,A as useFileHandler,B as useInfiniteScrollBottom,S as useInfiniteScrollTop,z as useInputValidation,c as useMutation,H as useRating,L as useStrongPassword}; | ||
import*as e from"react";import{useState as t,useEffect as r,useRef as n,useCallback as l,memo as a}from"react";const o=new Map,i=({url:e,key:n,dependencyProps:l=[],credentials:a="same-origin",successCallback:i,errorCallback:c})=>{const[s,m]=t(),[d,u]=t(!1),[h,g]=t(""),[p,w]=t(0);r((()=>{const t=new AbortController;if(!n||!o.has(n))return u(!0),fetch(e,{credentials:a,signal:t.signal}).then((async e=>{const t=await e.json();if(!e.ok)throw new Error(t.message||"Errro while fetching!");m(t),n&&o.set(n,JSON.stringify(t)),i&&i(t)})).catch((e=>{if(!(e instanceof DOMException&&"AbortError"===e.name)){const t=e instanceof Error?e.message:"Something went wrong!";g(t),c&&c(t)}})).finally((()=>u(!1))),()=>{t.abort()};m(JSON.parse(o.get(n)))}),[p,...l]);return{data:s,loading:d,error:h,refetch:()=>{n&&o.delete(n),w((e=>e+1))},clearCache:()=>{n&&o.delete(n)}}},c=({url:e,method:l="POST",credentials:a="same-origin",key:i,successCallback:c,errorCallback:s})=>{const[m,d]=t(),[u,h]=t(!1),[g,p]=t(""),w=n(null),v=async t=>{h(!0),p(""),w.current&&w.current.abort(),w.current=new AbortController;const r=w.current.signal;try{const n={method:l,headers:{"Content-Type":"application/json"},credentials:a,signal:r};t&&(n.body=JSON.stringify({...t}));const s=await fetch(e,n);if(!s.ok){const e=await s.json();throw new Error(e?.message||"Error while fetching!")}const m=await s.json();i&&o.delete(i),d(m),c&&c(m)}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return;{const r=e instanceof Error?e.message:"Something went wrong!";p(r),s&&s(r,t)}}finally{h(!1)}};return r((()=>()=>{w.current&&w.current.abort()}),[]),{data:m,loading:u,error:g,trigger:v}},s="at least 8 characters",m="a number",d="a special",u="a capital",h="a lowercase",g=e=>/\d/.test(e),p=e=>/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(e),w=e=>/[A-Z]/.test(e),v=e=>/[a-z]/.test(e),f=e=>/\S+@\S+\.\S+/.test(e),E=e=>/^[a-zA-Z0-9]+$/.test(e),y=e=>{try{return new URL(e),!0}catch(e){return!1}},b=e=>/^\d{10}$/.test(e),C=e=>/^\d{4}-\d{2}-\d{2}$/.test(e),x=e=>/^\d{2}:\d{2}$/.test(e),k=e=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(e),M=(e,t,r)=>{const n=new Date(e),l=new Date(t),a=new Date(r);return l<=n&&n<=a},A=(e,r=5,n=10)=>{const l="multiple"===e?[]:null,a="multiple"===e?[]:null,[o,i]=t(null),[c,s]=t(l),[m,d]=t(a);return{file:c,preview:m,error:o,changeHandler:t=>{if(t.target.files){if("single"===e){const e=t.target.files[0];if(t.target.files.length>1)return i("Cannot upload more than 1 file, please select type as 'Multiple'");if(e.size>1048576*r)return i("File size too large");const n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{d(n.result)},s(e)}if("multiple"===e){const e=Array.from(t.target.files);if(n&&e.length>n)return i(`Maximum ${n} files allowed`);for(const t of e){if(t.size>1048576*r)return void i("File size too large");const e=new FileReader;e.readAsDataURL(t),e.onloadend=()=>{d((t=>Array.isArray(t)?[...t,e.result]:[e.result]))},s((e=>Array.isArray(e)?[...e,t]:[t]))}}}},clear:()=>{s(l),d(a),i(null)}}},L=()=>{const[e,r]=t(""),[n,l]=t("");return{error:e,value:n,changeHandler:e=>{const t=e.target.value;l(t);const n=[];t.length<8&&n.push(s),g(t)||n.push(m),p(t)||n.push(d),w(t)||n.push(u),v(t)||n.push(h),r(n.length>0?`Password must include ${n.join(", ")} character`:"")},clear:()=>{l(""),r("")}}},z=(e,r=()=>{})=>{const[n,l]=t(e),[a,o]=t("");return{value:n,changeHandler:e=>{let t;t="number"==typeof n?Number(e.target.value):e.target.value,l(t);const a=r(t);o(a?a.errorMessage:"")},error:a,clear:()=>{l(e),o("")}}},R=({title:r="Confirm Delete",subtitle:l="Are you sure you want to delete?",confirmHandler:a})=>{const o=n(null),[i,c]=t(!1),s=()=>c(!1),m=e=>{if(!o.current)return;const t=o.current?.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&s()},d=()=>{s(),a()};return{ConfirmModal:({containerStyles:t={},noBtnStyles:n={},yesBtnStyles:a={},subtitleStyles:c={},titleStyles:u={},containerClassName:h})=>e.createElement("section",{onKeyDown:e=>e.preventDefault(),onClick:m,style:{display:i?"block":"none",height:"100vh",width:"100%",position:"fixed",top:0,left:0}},e.createElement("article",{style:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0.8)",backdropFilter:"blur(2px)"}}),e.createElement("div",{className:`_6pp-confirm-modal ${h}`,style:{width:"20rem",backgroundColor:"white",padding:"1rem",borderRadius:"0.25rem",border:"none",position:"fixed",top:"50%",left:"50%",zIndex:20,transform:"translate(-50%,-50%)",...t},ref:o},e.createElement("h5",{style:{fontFamily:"sans-serif",textTransform:"uppercase",...u}},r),e.createElement("p",{style:{fontFamily:"monospace",margin:"1rem",...c}},l),e.createElement("div",{style:{display:"flex",gap:"1rem",marginTop:"1rem 0",float:"right"}},e.createElement("button",{style:{border:"none",outline:"none",cursor:"pointer",padding:"0.5rem 1rem",borderRadius:"5px",backgroundColor:"inherit",color:"rgba(0,0,0,0.9)",transition:"all 0.3s",...n},autoFocus:!0,onClick:s},"No"),e.createElement("button",{style:{border:"none",outline:"none",cursor:"pointer",borderRadius:"5px",padding:"0.5rem 1rem",backgroundColor:"rgba(0,0,0,0.9)",color:"white",transition:"all 0.3s",...a},onClick:d},"Yes")))),showModal:()=>c(!0),close:close}},H=({IconFilled:n,IconOutline:l,maxRating:a=5,value:o=0,selectable:i=!1,styles:c={}})=>{if(a<1)throw new Error("maxRating should be greater than 0");if(o>a)throw new Error("value should be less than Max Rating");const[s,m]=t(o);r((()=>{m(o)}),[o]);return{Ratings:()=>e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",...c}},Array.from({length:a}).map(((t,r)=>e.createElement("span",{style:{cursor:i?"pointer":"unset"},key:r,onClick:()=>{return e=r+1,void(i&&m(e));var e}},r<s&&e.createElement("span",null,n),r>=s&&e.createElement("span",null,l))))),rating:s,setRating:m}},B=(e,a,o,i,c,s=1)=>{const[m,d]=t([]),[u,h]=t(1),[g,p]=t(!0),[w,v]=t(!1),[f,E]=t(),y=n(null),b=l((async()=>{try{v(!0);const t=await fetch(`${e}?${a}=${u}&${o}=${i}`,{credentials:"include"});if(!t.ok)throw new Error("Something went wrong");const r=await t.json();d((e=>[...e,...r])),p(r.length>0)}catch(e){E(e||"Something went wrong")}finally{v(!1)}}),[u,i,e,a,o]);return r((()=>{b()}),[b]),r((()=>{const e=new IntersectionObserver((e=>{e[0].isIntersecting&&g&&!w&&(y.current&&clearTimeout(y.current),y.current=setTimeout((()=>{s!==u&&h((e=>e+1))}),200))}),{rootMargin:"100px"}),t=document.querySelector(`.${c}:last-of-type`);return t&&e.observe(t),()=>{e.disconnect(),y.current&&clearTimeout(y.current)}}),[s,u,g,w]),{loading:w,hasMore:g,page:u,error:f,data:m,setData:d}},S=(e,a,o,i,c,s=!1)=>{const[m,d]=t([]),u=n(null),h=l((()=>{u.current&&clearTimeout(u.current),u.current=setTimeout((()=>{if(!e.current)return;const{scrollTop:t}=e.current;if(0===t){if(a===o)return;i((e=>e+1))}}),200)}),[a,o]);return r((()=>{const t=e.current;return t&&t.addEventListener("scroll",h),()=>{t&&t.removeEventListener("scroll",h)}}),[h,m]),r((()=>{let t=0,r=0;e.current&&(t=e.current.scrollHeight,r=e.current.scrollTop),c&&d((e=>{const t=new Set(e.map((e=>e._id))),r=c?.filter((e=>!t.has(e._id)));if(s){return[...(Array.isArray(r)?[...r]:[r]).reverse(),...e]}return[...r,...e]})),requestAnimationFrame((()=>{if(e.current){const n=r+e.current.scrollHeight-t;e.current.scrollTop=n}}))}),[c]),{data:m,setData:d}},N=({totalPages:r=1,currPage:n,setCurrPage:l,activeButtonStyle:a={backgroundColor:"black",color:"white"},Button:o=({children:t,onClick:r,style:n})=>e.createElement("button",{style:{padding:"0.5rem 1rem",outline:"none",border:"none",borderRadius:"0.5rem",cursor:"pointer",backgroundColor:"#e2e8f0",...n},onClick:r},t),Container:i=({children:t})=>e.createElement("ul",{style:{display:"flex",gap:"1rem",listStyle:"none"}},t)})=>{const[c,s]=t(1);return e.createElement(i,null,e.createElement(e.Fragment,null,c>1&&e.createElement("li",null,e.createElement(o,{onClick:()=>s((e=>e-4))},"Prev")),Array.from({length:Math.min(4,r)},((e,t)=>c+t)).map((t=>e.createElement("li",{key:t},e.createElement(o,{style:n===t?a:{},onClick:()=>(e=>{l(e),e>c+4-1?s(e):e<c&&s(e-4+1)})(t)},t)))),r>c+4-1&&e.createElement("li",null,e.createElement(o,{onClick:()=>s((e=>e+4))},"Next"))))},V=({totalPages:t=1,currPage:r,setCurrPage:n,Typography:l=({children:t})=>e.createElement("code",null,t),Button:a,Container:o=({children:t})=>e.createElement("nav",{style:{display:"flex",alignItems:"center",gap:"1rem",padding:"1rem 0"}},t)})=>{const i=1===r,c=r===t;return e.createElement(o,null,e.createElement(e.Fragment,null,e.createElement(a,{disabled:i,onClick:()=>{1!==r&&n((e=>e-1))}},"Previous"),e.createElement(l,null,r," of ",t),e.createElement(a,{disabled:c,onClick:()=>{r!==t&&n((e=>e+1))}},"Next")))},$=({images:a,darkMode:o=!1,objectFit:i="cover",setIsOpen:c,PrevButton:s,NextButton:m})=>{const[d,u]=t(0),h=n(null),g=n(null),p=o?"1px solid #fff":"1px solid black",w=l((e=>{const t=e.clientY;h.current?.scrollTo({top:t})}),[]);r((()=>(h.current&&h.current.addEventListener("mousemove",w),()=>{h.current&&h.current.removeEventListener("mousemove",w)})),[]);const v=e.createElement("aside",{style:{display:"flex",flexDirection:"column",gap:"1rem",position:"absolute",top:"1rem",left:"1rem"}},a.map(((t,r)=>e.createElement("button",{key:r,style:{border:r===d?p:"1px solid rgba(0,0,0,0.3)",outline:"none",backgroundColor:"transparent",width:"fit-content",height:"unset",cursor:"pointer"},onClick:()=>u(r)},e.createElement("img",{style:{width:"2rem",height:"2.5rem",objectFit:"contain"},src:t,alt:"Image"}))))),f=e.createElement("article",{style:{display:"flex",width:"95%",justifyContent:"space-between",alignItems:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},e.createElement(s,{onClick:()=>{u(0===d?a.length-1:e=>e-1)}}),e.createElement(m,{onClick:()=>{d===a.length-1?u(0):u((e=>e+1))}}));return e.createElement("section",{style:{width:"100vw",height:"100vh",backgroundColor:"rgba(0,0,0,0.7)",position:"fixed",top:0,left:0,zIndex:200},onClick:e=>{if(!h.current)return;const t=h.current.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&c(!1)}},e.createElement("div",{style:{width:"100%",maxWidth:"950px",height:"100vh",position:"relative",margin:"auto",boxShadow:o?"0 0 5px black":"0 0 5px white",overflow:"auto",cursor:"s-resize",scrollbarWidth:"none",backgroundColor:o?"black":"#fff"},ref:h},e.createElement("img",{ref:g,src:a[d],style:{width:"100%",minHeight:"100vh",objectFit:i}}),e.createElement("div",{style:{position:"fixed",top:0,width:"95%",maxWidth:"950px",height:"100vh"}},v,f)))},T=({imageSize:n=["100%","80vw","25rem","30rem"],images:a=[],objectFit:o="cover",imageBg:i="transparent",sideImageSize:c=["3rem","3.5rem","4rem","5rem"]})=>{if(0===a.length)throw new Error("imageSize should not be more than 4");if(n.length>5)throw new Error("imageSize should not be more than 4");const[s,m]=t(0),[d,u]=t(""),[h,g]=t(""),p=l((()=>{const e=window.screen.width;e<480?(u(n[0]),g(c[0])):e<768&&n.length>=3?(u(n[1]),g(c[1])):e<992&&n.length>=4?(u(n[2]),g(c[2])):e<1280&&n.length>=5?(u(n[3]),g(c[3])):(u(n[n.length-1]),g(c[c.length-1]))}),[]);return r((()=>(p(),window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)})),[]),e.createElement("div",{style:{width:"fit-content",display:"flex",gap:"1rem",padding:"1rem"}},e.createElement("aside",{style:{display:"flex",flexDirection:"column",width:"fit-content",gap:"1rem"}},a.map(((t,r)=>e.createElement("img",{key:r,style:{width:h,height:h,borderRadius:"0.25rem",objectFit:o,border:"1px solid rgba(0,0,0,0.3)"},src:t,alt:`Image-${r}`,onMouseOver:()=>m(r)})))),e.createElement("section",{style:{width:d,height:d,overflow:"hidden",scrollbarWidth:"none",display:"flex",alignItems:"center",borderRadius:"0.5rem",backgroundColor:i}},a.map(((t,r)=>e.createElement("img",{key:r,style:{width:d,height:d,objectFit:"contain",aspectRatio:"1/1",borderRadius:"0.5rem",transition:"all 0.3s",transform:`translateX(-${100*s}%)`},src:t,alt:`Photo-${r}`})))))},F=({images:n,objectFit:l="cover",PrevIcon:a,NextIcon:o,bgColor:i="inherit",showNav:c=!0,showDots:s,showThumbnails:m,autoplay:d,autoplayDuration:u=4e3,onClick:h})=>{const[g,p]=t(0),w=()=>{p((e=>e===n.length-1?0:e+1))};r((()=>{let e;return d&&(e=setInterval((()=>{w()}),u)),()=>{e&&clearInterval(e)}}),[]);const v=e.createElement("article",{style:{padding:"1rem",position:"absolute",display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",top:"50%",transform:"translateY(-50%)"}},e.createElement("button",{style:{border:"none",backgroundColor:"transparent",cursor:"pointer",outline:"none"},onClick:()=>{p((e=>0===e?n.length-1:e-1))}},a||"Prev"),e.createElement("button",{style:{border:"none",backgroundColor:"transparent",cursor:"pointer",outline:"none"},onClick:w},o||"Next")),f=e.createElement("article",{style:{padding:"1rem",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",bottom:0,gap:"0.5rem"}},n.map(((t,r)=>e.createElement("button",{key:r,style:{width:"0.75rem",height:"0.75rem",borderRadius:"50%",border:"none",backgroundColor:r===g?"white":"black"},onClick:()=>p(r)})))),E=e.createElement("aside",{style:{height:"5rem",display:"flex",justifyContent:"center",gap:"1rem",flexWrap:"wrap"}},n.map(((t,r)=>e.createElement("img",{key:r,style:{width:"5rem",height:"5rem",borderRadius:"0.25rem",objectFit:"cover",border:"1px solid rgba(0,0,0,0.3)"},src:t,alt:`Image-${r}`,onMouseOver:()=>p(r)}))));return e.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column",gap:"1rem",backgroundColor:i}},e.createElement("div",{style:{height:"100%",display:"flex",overflowX:"hidden",position:"relative"}},n.map(((t,r)=>e.createElement("img",{key:r,style:{width:"100%",height:"100%",objectFit:l,flex:"none",transition:"all 0.3s",transform:`translateX(-${100*g}%)`},src:t,onClick:()=>h&&h()}))),c&&v,s&&f),m&&E)},I=a((({size:t=10,color:a="black",styles:o,zoom:i="2",mode:c="normal"})=>{if(t<1||t>40)throw new Error("Size must be between 1 and 40");const s=n(),m=n({x:0,y:0}),d=n(!1),u=e=>{m.current={x:e.clientX,y:e.clientY};const t=e.target.getAttribute("data-firebolt-zoom");d.current=Boolean(t)},h=l((()=>{let e=m.current.x,t=m.current.y;const r=s.current;r&&(Array.from(r).forEach(((n,l)=>{n.style.left=e-12+"px",n.style.top=t-12+"px",n.x=e,n.y=t;const a=(r.length-l)/r.length;n.style.scale=a.toString();const o=r[l+1]||r[0];e+=.3*(Number(o.x||0)-e),t+=.3*(Number(o.y||0)-t),0===l&&d.current&&(n.style.scale=i)})),requestAnimationFrame(h))}),[]);return r((()=>(s.current=document.getElementsByClassName("6pp-firebolt-Cursor"),h(),window.addEventListener("mousemove",u),()=>{window.removeEventListener("mousemove",u)})),[]),e.createElement("div",{style:{zIndex:"10000",mixBlendMode:c,pointerEvents:"none",position:"fixed"}},Array.from({length:t}).map(((t,r)=>e.createElement("div",{className:"6pp-firebolt-Cursor",key:r,style:{position:"fixed",height:"24px",width:"24px",borderRadius:"50%",left:0,top:0,backgroundColor:a,userSelect:"none",pointerEvents:"none",transition:"scale 0.2s",...o}}))))})),j=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 16 16"},e.createElement("path",{d:"M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5M.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5m15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5"})),D=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 16 16"},e.createElement("path",{d:"M5.5 0a.5.5 0 0 1 .5.5v4A1.5 1.5 0 0 1 4.5 6h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5m5 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 10 4.5v-4a.5.5 0 0 1 .5-.5M0 10.5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 6 11.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5m10 1a1.5 1.5 0 0 1 1.5-1.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0z"})),P=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M17.849,20.934a1.555,1.555,0,0,1-.781-.212l-4.16-2.4a3.769,3.769,0,0,0-1.877-.5H7.214a2.631,2.631,0,0,1-2.628-2.627V8.809A2.631,2.631,0,0,1,7.214,6.182h3.817a3.747,3.747,0,0,0,1.877-.5l4.16-2.4a1.564,1.564,0,0,1,2.346,1.354V19.369a1.57,1.57,0,0,1-1.565,1.565ZM7.214,7.182A1.63,1.63,0,0,0,5.586,8.809v6.382a1.629,1.629,0,0,0,1.628,1.627h3.817a4.756,4.756,0,0,1,2.377.637l4.16,2.4a.543.543,0,0,0,.563,0,.553.553,0,0,0,.283-.487V4.632a.565.565,0,0,0-.846-.489l-4.16,2.4a4.753,4.753,0,0,1-2.377.637Z"})),_=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("g",null,e.createElement("path",{d:"M13.816,19.937a1.446,1.446,0,0,1-.717-.194L9.43,17.623a3.257,3.257,0,0,0-1.625-.434H4.439a2.379,2.379,0,0,1-2.375-2.376V9.187A2.378,2.378,0,0,1,4.439,6.812H7.805A3.257,3.257,0,0,0,9.43,6.376L13.1,4.259A1.437,1.437,0,0,1,15.255,5.5V18.5a1.424,1.424,0,0,1-.718,1.245A1.445,1.445,0,0,1,13.816,19.937ZM4.439,7.812A1.377,1.377,0,0,0,3.064,9.187v5.626a1.378,1.378,0,0,0,1.375,1.376H7.805a4.254,4.254,0,0,1,2.125.569L13.6,18.876a.439.439,0,0,0,.657-.38V5.5a.438.438,0,0,0-.657-.379L9.93,7.242a4.251,4.251,0,0,1-2.125.57Z"}),e.createElement("path",{d:"M18.407,6.262a7.79,7.79,0,0,1,.021,11.476c-.474.437.235,1.143.707.707a8.793,8.793,0,0,0-.021-12.89c-.474-.434-1.184.272-.707.707Z"}),e.createElement("path",{d:"M16.91,9.031a4.021,4.021,0,0,1,.012,5.938c-.474.438.234,1.143.707.707a5.025,5.025,0,0,0-.012-7.352c-.474-.434-1.183.272-.707.707Z"}))),Z=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},e.createElement("g",null,e.createElement("path",{d:"M13.817,19.936a1.424,1.424,0,0,1-.719-.2L9.43,17.624a3.254,3.254,0,0,0-1.625-.436H4.44a2.377,2.377,0,0,1-2.375-2.375V9.187A2.378,2.378,0,0,1,4.44,6.811H7.805A3.257,3.257,0,0,0,9.43,6.377L13.1,4.259A1.438,1.438,0,0,1,15.255,5.5V18.5a1.423,1.423,0,0,1-.718,1.245A1.439,1.439,0,0,1,13.817,19.936ZM4.44,7.811A1.377,1.377,0,0,0,3.065,9.187v5.626A1.377,1.377,0,0,0,4.44,16.188H7.805a4.247,4.247,0,0,1,2.125.571L13.6,18.876a.437.437,0,0,0,.439,0,.433.433,0,0,0,.218-.379V5.5a.438.438,0,0,0-.657-.379L9.93,7.242a4.25,4.25,0,0,1-2.125.569Z"}),e.createElement("path",{d:"M17.606,14.445a.5.5,0,0,1-.7-.711c.17-.169.34-.349.52-.52l1.21-1.209c-.57-.581-1.15-1.161-1.73-1.74a.5.5,0,0,1,.7-.71l1.74,1.739,1.74-1.739a.5.5,0,0,1,.7.71l-1.73,1.74,1.73,1.729a.5.5,0,0,1-.7.711L19.343,12.7Z"}))),O=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"})),X=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"})),q=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M0 96C0 60.7 28.7 32 64 32H512c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"})),Y=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M512 80c8.8 0 16 7.2 16 16V416c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V96c0-8.8 7.2-16 16-16H512zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"})),W=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"24",height:"24",fill:"currentColor"},e.createElement("circle",{cx:"256",cy:"256",r:"48"}),e.createElement("path",{d:"M470.39 300l-.47-.38-31.56-24.75a16.11 16.11 0 01-6.1-13.33v-11.56a16 16 0 016.11-13.22L469.92 212l.47-.38a26.68 26.68 0 005.9-34.06l-42.71-73.9a1.59 1.59 0 01-.13-.22A26.86 26.86 0 00401 92.14l-.35.13-37.1 14.93a15.94 15.94 0 01-14.47-1.29q-4.92-3.1-10-5.86a15.94 15.94 0 01-8.19-11.82l-5.59-39.59-.12-.72A27.22 27.22 0 00298.76 26h-85.52a26.92 26.92 0 00-26.45 22.39l-.09.56-5.57 39.67a16 16 0 01-8.13 11.82 175.21 175.21 0 00-10 5.82 15.92 15.92 0 01-14.43 1.27l-37.13-15-.35-.14a26.87 26.87 0 00-32.48 11.34l-.13.22-42.77 73.95a26.71 26.71 0 005.9 34.1l.47.38 31.56 24.75a16.11 16.11 0 016.1 13.33v11.56a16 16 0 01-6.11 13.22L42.08 300l-.47.38a26.68 26.68 0 00-5.9 34.06l42.71 73.9a1.59 1.59 0 01.13.22 26.86 26.86 0 0032.45 11.3l.35-.13 37.07-14.93a15.94 15.94 0 0114.47 1.29q4.92 3.11 10 5.86a15.94 15.94 0 018.19 11.82l5.56 39.59.12.72A27.22 27.22 0 00213.24 486h85.52a26.92 26.92 0 0026.45-22.39l.09-.56 5.57-39.67a16 16 0 018.18-11.82c3.42-1.84 6.76-3.79 10-5.82a15.92 15.92 0 0114.43-1.27l37.13 14.95.35.14a26.85 26.85 0 0032.48-11.34 2.53 2.53 0 01.13-.22l42.71-73.89a26.7 26.7 0 00-5.89-34.11zm-134.48-40.24a80 80 0 11-83.66-83.67 80.21 80.21 0 0183.66 83.67z"})),U=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4zM416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"})),J=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM10.6219 8.41459C10.5562 8.37078 10.479 8.34741 10.4 8.34741C10.1791 8.34741 10 8.52649 10 8.74741V15.2526C10 15.3316 10.0234 15.4088 10.0672 15.4745C10.1897 15.6583 10.4381 15.708 10.6219 15.5854L15.5008 12.3328C15.5447 12.3035 15.5824 12.2658 15.6117 12.2219C15.7343 12.0381 15.6846 11.7897 15.5008 11.6672L10.6219 8.41459Z"})),K=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},e.createElement("path",{d:"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM4 5V19H20V5H4ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z"})),Q=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},e.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M7 9l-3 -3l3 -3"}),e.createElement("path",{d:"M15.997 17.918a6.002 6.002 0 0 0 -.997 -11.918h-11"}),e.createElement("path",{d:"M6 14v6"}),e.createElement("path",{d:"M9 15.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0 -3 0z"})),G=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},e.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M17 9l3 -3l-3 -3"}),e.createElement("path",{d:"M8 17.918a5.997 5.997 0 0 1 -5 -5.918a6 6 0 0 1 6 -6h11"}),e.createElement("path",{d:"M12 14v6"}),e.createElement("path",{d:"M15 15.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0 -3 0z"})),ee=e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 6C3 4.34315 4.34315 3 6 3H18C19.6569 3 21 4.34315 21 6V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V6ZM6 5H18C18.5523 5 19 5.44772 19 6V12.2676C18.7058 12.0974 18.3643 12 18 12H14C12.8954 12 12 12.8954 12 14V18C12 18.3643 12.0974 18.7058 12.2676 19H6C5.44772 19 5 18.5523 5 18V6C5 5.44772 5.44772 5 6 5Z",fill:"currentColor"})),te=({min:t=0,max:l=100,value:a,changeHandler:o,color:i="white"})=>{const c=n(null);return r((()=>{const e=a/l*100;c.current&&(c.current.style.background=`linear-gradient(to right,${"orange"===i?"#f50":i} ${e}%, #ccc ${e}%)`)}),[a]),e.createElement("input",{className:`_6pp-basic-slider slider-theme-${i}`,ref:c,type:"range",min:t,max:l,value:a,id:"range",onChange:o})},re=[.5,.75,1,1.25,1.5,2],ne=new Intl.NumberFormat(void 0,{minimumIntegerDigits:2}),le=e=>{const t=Math.floor(e%60),r=Math.floor(e/60%60),n=Math.floor(e/3600);return 0===n?`${r}:${ne.format(t)}`:`${n}:${ne.format(r)}:${ne.format(t)}`},ae=({width:a="40rem",height:o="20.5rem",src:i,poster:c,captions:s,qualityOptions:m=[480,720,1080,1440],setQuality:d})=>{const u=n(null),h=n(null),g=n(null),p=n(!1),[w,v]=t(!1),[f,E]=t(!0),[y,b]=t(!1),[C,x]=t(50),[k,M]=t(C),[A,L]=t(1),[z,R]=t(!1),[H,B]=t(!1),[S,N]=t(!1),[V,$]=t("00:00"),[T,F]=t("0:0"),[I,ne]=t(0),[ae,oe]=t(0),[ie,ce]=t(!1),[se,me]=t(!1),de=()=>ce((e=>!e)),ue=()=>me((e=>!e)),he=()=>N((e=>!e)),ge=()=>B((e=>!e)),pe=()=>E((e=>(e?g.current?.play():g.current?.pause(),!e))),we=()=>{z?document.exitFullscreen():document.documentElement.requestFullscreen(),R((e=>!e))},ve=()=>{const e=g.current;e&&(e.currentTime-=10)},fe=()=>{const e=g.current;e&&(e.currentTime+=10)},Ee=()=>b((e=>(e?x(k):(M(C),x(0)),!e))),ye=l((e=>{u.current&&!u.current.contains(e.target)&&ce(!1),h.current&&!h.current.contains(e.target)&&me(!1)}),[]),be=l((e=>{e.preventDefault(),"Escape"===e.key&&(document.exitFullscreen(),R(!1)),"f"===e.key&&we(),"m"===e.key&&Ee()," "===e.key&&pe(),"s"===e.key&&de(),"c"===e.key&&he(),"t"===e.key&&ge(),"ArrowRight"===e.key&&fe(),"ArrowLeft"===e.key&&ve()}),[we,Ee,pe,ve,fe,he,de,ge]);r((()=>(document.addEventListener("mousedown",ye),document.addEventListener("keydown",be),()=>{document.removeEventListener("mousedown",ye),document.removeEventListener("keydown",be)})),[ye,be]);const Ce=l((()=>{g.current&&$(le(g.current.duration))}),[g.current]),xe=l((()=>{const e=g.current;if(e){F(le(e.currentTime)),!1===p.current&&oe(e.currentTime/e.duration*100);let t=0;e.buffered.length>0&&(t=e.buffered.end(e.buffered.length-1)/e.duration*100),ne(t)}}),[F,oe,ne]);r((()=>{const e=g.current;return e&&(e.addEventListener("loadeddata",Ce),e.addEventListener("timeupdate",xe)),()=>{e&&(e.removeEventListener("loadeddata",Ce),e.removeEventListener("timeupdate",xe))}}),[Ce,xe,g.current]),r((()=>{b(0===C)}),[C]),r((()=>{g.current&&(g.current.playbackRate=A)}),[A]),r((()=>{g.current&&(g.current.volume=C/100)}),[C]),r((()=>(g.current&&(g.current.textTracks[0].mode=S?"showing":"hidden"),()=>{g.current&&(g.current.textTracks[0].mode="hidden")})),[S]),r((()=>()=>{E(!0),ce(!1),me(!1),oe(0),ne(0),v(!1),L(1)}),[i,c]);const ke=ie&&e.createElement("div",{ref:u,className:"_6pp-video-player-setting-panel"},e.createElement("ul",null,m.map(((t,r)=>e.createElement("li",{key:t,style:{borderTopLeftRadius:0===r?"0.5rem":0,borderTopRightRadius:0===r?"0.5rem":0,borderBottomLeftRadius:r===m.length-1?"0.5rem":0,borderBottomRightRadius:r===m.length-1?"0.5rem":0},onClick:()=>(d(t),void de())},t,"p"))))),Me=se&&e.createElement("div",{ref:h,className:"_6pp-video-player-speed-panel"},e.createElement("ul",null,re.map(((t,r)=>e.createElement("li",{key:t,style:{borderTopLeftRadius:0===r?"0.5rem":0,borderTopRightRadius:0===r?"0.5rem":0,borderBottomLeftRadius:r===re.length-1?"0.5rem":0,borderBottomRightRadius:r===re.length-1?"0.5rem":0},onClick:()=>(e=>{L(e),ue()})(t)},t,"x"))))),Ae=e.createElement("div",{className:"_6pp-video-player-timeline-container",onMouseMove:e=>{if(!p.current)return;e.preventDefault();const t=e.currentTarget.getBoundingClientRect(),r=Math.min(Math.max(0,e.clientX-t.left),t.width)/t.width*100;oe(r)},onMouseUp:e=>{const t=g.current;if(!t)return;p.current=!1;const r=e.currentTarget.getBoundingClientRect(),n=(e.clientX-r.left)/r.width*100/100*t.duration;t.currentTime=n},onMouseDown:()=>{p.current=!0}},e.createElement("div",{className:"_6pp-video-player-timeline-thumb",style:{left:`${ae}%`}}),e.createElement("div",{className:"_6pp-video-player-timeline-progress",style:{width:`${ae}%`}}),e.createElement("div",{className:"_6pp-video-player-timeline-buffer-progress",style:{width:`${I}%`}})),Le=e.createElement("div",{className:"_6pp-video-player-controls"},e.createElement("button",{title:"Rewind Backward 10 Seconds",onClick:ve},Q),e.createElement("button",{disabled:w,onClick:pe,title:f?"Play":"Pause"},f?O:X),e.createElement("button",{title:"Fast Forward 10 Seconds",onClick:fe},G),e.createElement("button",{title:"Volume",onClick:Ee},y?Z:C>50?_:P),e.createElement("div",{className:"_6pp-video-player-volume-slider"},e.createElement(te,{value:C,changeHandler:e=>x(Number(e.target.value))})),e.createElement("div",{className:"_6pp-video-player-duration"},e.createElement("span",null,T)," ",e.createElement("span",null,"/")," ",e.createElement("span",null,V)),e.createElement("button",{style:{marginLeft:"auto"},onClick:de,title:"Settings"},ie?W:U),e.createElement("button",{title:S?"Hide Captions":"Show Captions",onClick:he},S?q:Y),e.createElement("button",{title:"Plackback Speed",style:{fontSize:"1.25rem"},onClick:ue},A,"x"),e.createElement("button",{onClick:()=>g.current?.requestPictureInPicture(),title:"Mini Player"},ee),e.createElement("button",{onClick:ge,title:H?"Exit Theater Mode":"Theater Mode"},H?J:K),e.createElement("button",{onClick:we,title:z?"Exit Full Screen":"Full Screen"},z?D:j)),ze=e.createElement("div",{className:"_6pp-video-player-loading"},e.createElement("div",{className:"_6pp-video-player-loading-spinner"}));return e.createElement("div",{className:"_6pp-video-player-container",style:{width:z?"100vw":H?"100%":a,height:z?"100vh":H?"70vh":o,position:z?"fixed":"relative"},onContextMenu:e=>e.preventDefault()},ke,Me,e.createElement("div",{className:"_6pp-video-player-controls-container"},Ae,Le),w?ze:null,e.createElement("video",{ref:g,src:i,className:"_6pp-video-player-video",style:{filter:w?"blur(5px)":"none"},onClick:pe,poster:c,onWaiting:()=>v(!0),onPlaying:()=>v(!1)},e.createElement("track",{src:s,kind:"captions",srcLang:"en",label:"English"})),e.createElement("div",{className:"_6pp-video-player-backdrop"}))};export{I as FireBolt,$ as MyntraCarousel,V as PageStepper,N as Pagination,te as RangeSlider,F as Slider,T as StylishCarousel,ae as VideoPlayer,M as isDateBetween,w as isIncludeCapitalLetter,v as isIncludeLowercaseLetter,g as isIncludeNumber,p as isIncludeSpecialChar,C as isValidDate,k as isValidDateTime,f as isValidEmail,b as isValidPhoneNumber,x as isValidTime,y as isValidUrl,E as isValidUsername,R as useConfirmModal,i as useFetchData,A as useFileHandler,B as useInfiniteScrollBottom,S as useInfiniteScrollTop,z as useInputValidation,c as useMutation,H as useRating,L as useStrongPassword}; |
{ | ||
"name": "6pp", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79004
446