Socket
Socket
Sign inDemoInstall

6pp

Package Overview
Dependencies
3
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.11 to 1.1.12

2

dist/bundle.js
/*! For license information please see bundle.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports["6pp"]=e(require("react")):t["6pp"]=e(t.react)}(self,(t=>(()=>{"use strict";var e={156:e=>{e.exports=t}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{PageStepper:()=>B,Pagination:()=>H,isDateBetween:()=>E,isIncludeCapitalLetter:()=>y,isIncludeLowercaseLetter:()=>p,isIncludeNumber:()=>s,isIncludeSpecialChar:()=>h,isValidDate:()=>b,isValidDateTime:()=>S,isValidEmail:()=>v,isValidPhoneNumber:()=>g,isValidTime:()=>w,isValidUrl:()=>m,isValidUsername:()=>d,useFetchData:()=>f,useFileHandler:()=>A,useInfiniteScrollBottom:()=>D,useInfiniteScrollTop:()=>M,useInputValidation:()=>k,useStrongPassword:()=>P});var t=n(156),e=new Map;function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){i=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new I(n||[]);return a(i,"_invoke",{value:P(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function S(){}var E={};s(E,c,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(R([])));j&&j!==n&&o.call(j,c)&&(E=j);var O=S.prototype=b.prototype=Object.create(E);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(i,a,u,c){var l=y(t[i],t,a);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==r(s)&&o.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(s).then((function(t){f.value=t,u(f)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=p;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=y(e,r,n);if("normal"===l.type){if(o=n.done?m:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function R(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=S,a(O,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:w,configurable:!0}),w.displayName=s(S,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,s(t,f,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},L(A.prototype),s(A.prototype,l,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new A(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(O),s(O,f,"Generator"),s(O,c,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=R,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||c(t,e)||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 c(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var f=function(r,n){var o,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=u((0,t.useState)(),2),h=s[0],y=s[1],p=u((0,t.useState)(!1),2),v=p[0],d=p[1],m=u((0,t.useState)(""),2),g=m[0],b=m[1],w=u((0,t.useState)(0),2),S=w[0],E=w[1];return(0,t.useEffect)((function(){var t=new AbortController;if(!e.has(n))return d(!0),fetch(r,{credentials:"include",signal:t.signal}).then(function(){var t,r=(t=i().mark((function t(r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:if(o=t.sent,r.ok){t.next=7;break}throw new Error(o.message||"Errro while fetching!");case 7:y(o),e.set(n,JSON.stringify(o));case 9:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)}))});return function(t){return r.apply(this,arguments)}}()).catch((function(t){"AbortError"!==t.name&&b(t.message||"Something went wrong!")})).finally((function(){return d(!1)})),function(){t.abort()};y(JSON.parse(e.get(n)))}),[S].concat(function(t){if(Array.isArray(t))return l(t)}(o=f)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||c(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),{data:h,loading:v,error:g,refetch:function(){e.delete(n),E((function(t){return t+1}))},clearCache:function(){e.delete(n)}}},s=function(t){return/\d/.test(t)},h=function(t){return/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(t)},y=function(t){return/[A-Z]/.test(t)},p=function(t){return/[a-z]/.test(t)},v=function(t){return/\S+@\S+\.\S+/.test(t)},d=function(t){return/^[a-zA-Z0-9]+$/.test(t)},m=function(t){try{return new URL(t),!0}catch(t){return!1}},g=function(t){return/^\d{10}$/.test(t)},b=function(t){return/^\d{4}-\d{2}-\d{2}$/.test(t)},w=function(t){return/^\d{2}:\d{2}$/.test(t)},S=function(t){return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(t)},E=function(t,e,r){var n=new Date(t),o=new Date(e),i=new Date(r);return o<=n&&n<=i};function x(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||O(t,e)||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 O(t,e){if(t){if("string"==typeof t)return L(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var A=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o="multiple"===e?[]:null,i="multiple"===e?[]:null,a=j((0,t.useState)(null),2),u=a[0],c=a[1],l=j((0,t.useState)(o),2),f=l[0],s=l[1],h=j((0,t.useState)(i),2),y=h[0],p=h[1];return{file:f,preview:y,error:u,changeHandler:function(t){if(t.target.files){if("single"===e){var o=t.target.files[0];if(t.target.files.length>1)return c("Cannot upload more than 1 file, please select type as 'Multiple'");if(o.size>1048576*r)return c("File size too large");var i=new FileReader;i.readAsDataURL(o),i.onloadend=function(){p(i.result)},s(o)}if("multiple"===e){var a=Array.from(t.target.files);if(n&&a.length>n)return c("Maximum ".concat(n," files allowed"));for(var u,l=function(){var t=h[f];if(t.size>1048576*r)return c("File size too large"),{v:void 0};var e=new FileReader;e.readAsDataURL(t),e.onloadend=function(){p((function(t){return Array.isArray(t)?[].concat(x(t),[e.result]):[e.result]}))},s((function(e){return Array.isArray(e)?[].concat(x(e),[t]):[t]}))},f=0,h=a;f<h.length;f++)if(u=l())return u.v}}}}},P=function(){var e=j((0,t.useState)(""),2),r=e[0],n=e[1],o=j((0,t.useState)(""),2),i=o[0],a=o[1];return{error:r,value:i,changeHandler:function(t){var e=t.target.value;a(e);var r=[];e.length<8&&r.push("at least 8 characters"),s(e)||r.push("a number"),h(e)||r.push("a special"),y(e)||r.push("a capital"),p(e)||r.push("a lowercase"),n(r.length>0?"Password must include ".concat(r.join(", ")," character"):"")}}},k=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=j((0,t.useState)(e),2),o=n[0],i=n[1],a=j((0,t.useState)(""),2),u=a[0],c=a[1];return{value:o,changeHandler:function(t){var e;e="number"==typeof o?Number(t.target.value):t.target.value,i(e);var n=r(e);c(n?n.errorMessage:"")},error:u}};function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function _(){_=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new I(n||[]);return o(a,"_invoke",{value:L(t,r,u)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",y="suspendedYield",p="executing",v="completed",d={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(R([])));E&&E!==r&&n.call(E,a)&&(w=E);var x=b.prototype=m.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==T(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=A(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function R(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(T(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(x),l(x,c,"Generator"),l(x,a,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=R,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function I(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||F(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function C(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){R(i,n,o,a,u,"next",t)}function u(t){R(i,n,o,a,u,"throw",t)}a(void 0)}))}}function N(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||F(t,e)||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 F(t,e){if(t){if("string"==typeof t)return G(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(t,e):void 0}}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var D=function(e,r,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=N((0,t.useState)([]),2),c=u[0],l=u[1],f=N((0,t.useState)(1),2),s=f[0],h=f[1],y=N((0,t.useState)(!0),2),p=y[0],v=y[1],d=N((0,t.useState)(!1),2),m=d[0],g=d[1],b=N((0,t.useState)(),2),w=b[0],S=b[1],E=(0,t.useRef)(null),x=(0,t.useCallback)(C(_().mark((function t(){var i,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,g(!0),t.next=4,fetch("".concat(e,"?").concat(r,"=").concat(s,"&").concat(n,"=").concat(o),{credentials:"include"});case 4:if((i=t.sent).ok){t.next=7;break}throw new Error("Something went wrong");case 7:return t.next=9,i.json();case 9:a=t.sent,l((function(t){return[].concat(I(t),I(a))})),v(a.length>0),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),S(t.t0||"Something went wrong");case 17:return t.prev=17,g(!1),t.finish(17);case 20:case"end":return t.stop()}}),t,null,[[0,14,17,20]])}))),[s,o,e,r,n]);return(0,t.useEffect)((function(){x()}),[x]),(0,t.useEffect)((function(){var t=new IntersectionObserver((function(t){t[0].isIntersecting&&p&&!m&&(E.current&&clearTimeout(E.current),E.current=setTimeout((function(){a!==s&&h((function(t){return t+1}))}),200))}),{rootMargin:"100px"}),e=document.querySelector(".".concat(i,":last-of-type"));return e&&t.observe(e),function(){t.disconnect(),E.current&&clearTimeout(E.current)}}),[a,s,p,m]),{loading:m,hasMore:p,page:s,error:w,data:c,setData:l}},M=function(e,r,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],u=N((0,t.useState)([]),2),c=u[0],l=u[1],f=(0,t.useRef)(null),s=(0,t.useCallback)((function(){f.current&&clearTimeout(f.current),f.current=setTimeout((function(){if(e.current&&0===e.current.scrollTop){if(r===n)return;o((function(t){return t+1}))}}),200)}),[r,n]);return(0,t.useEffect)((function(){var t=e.current;return t&&t.addEventListener("scroll",s),function(){t&&t.removeEventListener("scroll",s)}}),[s,c]),(0,t.useEffect)((function(){var t=0,r=0;e.current&&(t=e.current.scrollHeight,r=e.current.scrollTop),i&&l((function(t){var e=new Set(t.map((function(t){return t._id}))),r=null==i?void 0:i.filter((function(t){return!e.has(t._id)}));if(a){var n=Array.isArray(r)?I(r):[r];return[].concat(I(n.reverse()),I(t))}return[].concat(I(r),I(t))})),requestAnimationFrame((function(){if(e.current){var n=r+e.current.scrollHeight-t;e.current.scrollTop=n}}))}),[i]),{data:c,setData:l}};function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function V(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function z(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?V(Object(r),!0).forEach((function(e){var n,o,i,a;n=t,o=e,i=r[e],a=function(t,e){if("object"!=$(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o),(o="symbol"==$(a)?a:String(a))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var H=function(e){var r,n,o=e.totalPages,i=void 0===o?1:o,a=e.currPage,u=e.setCurrPage,c=e.activeButtonStyle,l=void 0===c?{backgroundColor:"black",color:"white"}:c,f=e.Button,s=void 0===f?function(t){var e=t.children,r=t.onClick,n=t.style;return React.createElement("button",{style:z({padding:"0.5rem 1rem",outline:"none",border:"none",borderRadius:"0.5rem",cursor:"pointer",backgroundColor:"#e2e8f0"},n),onClick:r},e)}:f,h=e.Container,y=void 0===h?function(t){var e=t.children;return React.createElement("ul",{style:{display:"flex",gap:"1rem",listStyle:"none"}},e)}:h,p=(r=(0,t.useState)(1),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,n)||function(t,e){if(t){if("string"==typeof t)return U(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(t,e):void 0}}(r,n)||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.")}()),v=p[0],d=p[1];return React.createElement(y,null,React.createElement(React.Fragment,null,v>1&&React.createElement("li",null,React.createElement(s,{onClick:function(){return d((function(t){return t-4}))}},"Prev")),Array.from({length:Math.min(4,i)},(function(t,e){return v+e})).map((function(t){return React.createElement("li",{key:t},React.createElement(s,{style:a===t?l:{},onClick:function(){return function(t){u(t),t>v+4-1?d(t):t<v&&d(t-4+1)}(t)}},t))})),i>v+4-1&&React.createElement("li",null,React.createElement(s,{onClick:function(){return d((function(t){return t+4}))}},"Next"))))},B=function(t){var e=t.totalPages,r=void 0===e?1:e,n=t.currPage,o=t.setCurrPage,i=t.Typography,a=void 0===i?function(t){var e=t.children;return React.createElement("code",null,e)}:i,u=t.Button,c=t.Container,l=void 0===c?function(t){var e=t.children;return React.createElement("nav",{style:{display:"flex",alignItems:"center",gap:"1rem",padding:"1rem 0"}},e)}:c,f=1===n,s=n===r;return React.createElement(l,null,React.createElement(React.Fragment,null,React.createElement(u,{disabled:f,onClick:function(){1!==n&&o((function(t){return t-1}))}},"Previous"),React.createElement(a,null,n," of ",r),React.createElement(u,{disabled:s,onClick:function(){n!==r&&o((function(t){return t+1}))}},"Next")))}})(),o})()));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports["6pp"]=e(require("react")):t["6pp"]=e(t.react)}(self,(t=>(()=>{"use strict";var e={156:e=>{e.exports=t}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{FireBolt:()=>ft,MyntraCarousel:()=>ot,PageStepper:()=>et,Pagination:()=>tt,Slider:()=>at,StylishCarousel:()=>it,isDateBetween:()=>E,isIncludeCapitalLetter:()=>p,isIncludeLowercaseLetter:()=>h,isIncludeNumber:()=>s,isIncludeSpecialChar:()=>y,isValidDate:()=>g,isValidDateTime:()=>S,isValidEmail:()=>d,isValidPhoneNumber:()=>b,isValidTime:()=>w,isValidUrl:()=>v,isValidUsername:()=>m,useConfirmModal:()=>D,useFetchData:()=>f,useFileHandler:()=>k,useInfiniteScrollBottom:()=>q,useInfiniteScrollTop:()=>W,useInputValidation:()=>A,useRating:()=>z,useStrongPassword:()=>P});var t=n(156),e=new Map;function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){i=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function y(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:P(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=y;var h="suspendedStart",d="suspendedYield",m="executing",v="completed",b={};function g(){}function w(){}function S(){}var E={};s(E,u,(function(){return this}));var j=Object.getPrototypeOf,O=j&&j(j(T([])));O&&O!==n&&o.call(O,u)&&(E=O);var x=S.prototype=g.prototype=Object.create(E);function R(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(i,a,c,u){var l=p(t[i],t,a);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==r(s)&&o.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(s).then((function(t){f.value=t,c(f)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=h;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?v:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=S,a(x,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:w,configurable:!0}),w.displayName=s(S,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,s(t,f,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},R(k.prototype),s(k.prototype,l,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(y(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(x),s(x,f,"Generator"),s(x,u,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function a(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||u(t,e)||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 u(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var f=function(r,n){var o,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=c((0,t.useState)(),2),y=s[0],p=s[1],h=c((0,t.useState)(!1),2),d=h[0],m=h[1],v=c((0,t.useState)(""),2),b=v[0],g=v[1],w=c((0,t.useState)(0),2),S=w[0],E=w[1];return(0,t.useEffect)((function(){var t=new AbortController;if(!e.has(n))return m(!0),fetch(r,{credentials:"include",signal:t.signal}).then(function(){var t,r=(t=i().mark((function t(r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.json();case 2:if(o=t.sent,r.ok){t.next=7;break}throw new Error(o.message||"Errro while fetching!");case 7:p(o),e.set(n,JSON.stringify(o));case 9:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)}))});return function(t){return r.apply(this,arguments)}}()).catch((function(t){"AbortError"!==t.name&&g(t.message||"Something went wrong!")})).finally((function(){return m(!1)})),function(){t.abort()};p(JSON.parse(e.get(n)))}),[S].concat(function(t){if(Array.isArray(t))return l(t)}(o=f)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||u(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),{data:y,loading:d,error:b,refetch:function(){e.delete(n),E((function(t){return t+1}))},clearCache:function(){e.delete(n)}}},s=function(t){return/\d/.test(t)},y=function(t){return/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(t)},p=function(t){return/[A-Z]/.test(t)},h=function(t){return/[a-z]/.test(t)},d=function(t){return/\S+@\S+\.\S+/.test(t)},m=function(t){return/^[a-zA-Z0-9]+$/.test(t)},v=function(t){try{return new URL(t),!0}catch(t){return!1}},b=function(t){return/^\d{10}$/.test(t)},g=function(t){return/^\d{4}-\d{2}-\d{2}$/.test(t)},w=function(t){return/^\d{2}:\d{2}$/.test(t)},S=function(t){return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(t)},E=function(t,e,r){var n=new Date(t),o=new Date(e),i=new Date(r);return o<=n&&n<=i};function j(t){return function(t){if(Array.isArray(t))return R(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||x(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||x(t,e)||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 x(t,e){if(t){if("string"==typeof t)return R(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(t,e):void 0}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var k=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o="multiple"===e?[]:null,i="multiple"===e?[]:null,a=O((0,t.useState)(null),2),c=a[0],u=a[1],l=O((0,t.useState)(o),2),f=l[0],s=l[1],y=O((0,t.useState)(i),2),p=y[0],h=y[1];return{file:f,preview:p,error:c,changeHandler:function(t){if(t.target.files){if("single"===e){var o=t.target.files[0];if(t.target.files.length>1)return u("Cannot upload more than 1 file, please select type as 'Multiple'");if(o.size>1048576*r)return u("File size too large");var i=new FileReader;i.readAsDataURL(o),i.onloadend=function(){h(i.result)},s(o)}if("multiple"===e){var a=Array.from(t.target.files);if(n&&a.length>n)return u("Maximum ".concat(n," files allowed"));for(var c,l=function(){var t=y[f];if(t.size>1048576*r)return u("File size too large"),{v:void 0};var e=new FileReader;e.readAsDataURL(t),e.onloadend=function(){h((function(t){return Array.isArray(t)?[].concat(j(t),[e.result]):[e.result]}))},s((function(e){return Array.isArray(e)?[].concat(j(e),[t]):[t]}))},f=0,y=a;f<y.length;f++)if(c=l())return c.v}}}}},P=function(){var e=O((0,t.useState)(""),2),r=e[0],n=e[1],o=O((0,t.useState)(""),2),i=o[0],a=o[1];return{error:r,value:i,changeHandler:function(t){var e=t.target.value;a(e);var r=[];e.length<8&&r.push("at least 8 characters"),s(e)||r.push("a number"),y(e)||r.push("a special"),p(e)||r.push("a capital"),h(e)||r.push("a lowercase"),n(r.length>0?"Password must include ".concat(r.join(", ")," character"):"")}}},A=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=O((0,t.useState)(e),2),o=n[0],i=n[1],a=O((0,t.useState)(""),2),c=a[0],u=a[1];return{value:o,changeHandler:function(t){var e;e="number"==typeof o?Number(t.target.value):t.target.value,i(e);var n=r(e);u(n?n.errorMessage:"")},error:c}};function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function L(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?L(Object(r),!0).forEach((function(e){var n,o,i,a;n=t,o=e,i=r[e],a=function(t,e){if("object"!=C(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o),(o="symbol"==C(a)?a:String(a))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var D=function(e){var r,n,o=e.title,i=void 0===o?"Confirm Delete":o,a=e.subtitle,c=void 0===a?"Are you sure you want to delete?":a,u=e.confirmHandler,l=(0,t.useRef)(null),f=(r=(0,t.useState)(!1),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(r,n)||function(t,e){if(t){if("string"==typeof t)return T(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(t,e):void 0}}(r,n)||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.")}()),s=f[0],y=f[1],p=function(){return y(!1)},h=function(t){var e;if(l.current){var r=null===(e=l.current)||void 0===e?void 0:e.getBoundingClientRect();(t.clientX<r.left||t.clientX>r.right||t.clientY<r.top||t.clientY>r.bottom)&&p()}},d=function(){p(),u()};return{ConfirmModal:function(t){var e=t.containerStyles,r=void 0===e?{}:e,n=t.noBtnStyles,o=void 0===n?{}:n,a=t.yesBtnStyles,u=void 0===a?{}:a,f=t.subtitleStyles,y=void 0===f?{}:f,m=t.titleStyles,v=void 0===m?{}:m,b=t.containerClassName;return React.createElement("section",{onKeyDown:function(t){return t.preventDefault()},onClick:h,style:{display:s?"block":"none",height:"100vh",width:"100%",position:"fixed",top:0,left:0}},React.createElement("article",{style:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0.8)",backdropFilter:"blur(2px)"}}),React.createElement("div",{className:"_6pp-confirm-modal ".concat(b),style:I({width:"20rem",backgroundColor:"white",padding:"1rem",borderRadius:"0.25rem",border:"none",position:"fixed",top:"50%",left:"50%",zIndex:20,transform:"translate(-50%,-50%)"},r),ref:l},React.createElement("h5",{style:I({fontFamily:"sans-serif",textTransform:"uppercase"},v)},i),React.createElement("p",{style:I({fontFamily:"monospace",margin:"1rem"},y)},c),React.createElement("div",{style:{display:"flex",gap:"1rem",marginTop:"1rem 0",float:"right"}},React.createElement("button",{style:I({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"},o),autoFocus:!0,onClick:p},"No"),React.createElement("button",{style:I({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"},u),onClick:d},"Yes"))))},showModal:function(){return y(!0)},close}};function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function F(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function N(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?F(Object(r),!0).forEach((function(e){var n,o,i,a;n=t,o=e,i=r[e],a=function(t,e){if("object"!=_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o),(o="symbol"==_(a)?a:String(a))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var z=function(e){var r=e.IconFilled,n=e.IconOutline,o=e.maxRating,i=void 0===o?5:o,a=e.value,c=void 0===a?0:a,u=e.selectable,l=void 0!==u&&u,f=e.styles,s=void 0===f?{}:f;if(i<1)throw new Error("maxRating should be greater than 0");if(c>i)throw new Error("value should be less than Max Rating");var y,p,h=(y=(0,t.useState)(c),p=2,function(t){if(Array.isArray(t))return t}(y)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(y,p)||function(t,e){if(t){if("string"==typeof t)return M(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M(t,e):void 0}}(y,p)||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.")}()),d=h[0],m=h[1];return(0,t.useEffect)((function(){m(c)}),[c]),{Ratings:function(){return React.createElement("div",{style:N({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},s)},Array.from({length:i}).map((function(t,e){return React.createElement("span",{style:{cursor:l?"pointer":"unset"},key:e,onClick:function(){l&&m(e+1)}},e<d&&React.createElement("span",null,r),e>=d&&React.createElement("span",null,n))})))},rating:d,setRating:m}};function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function G(){G=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:R(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var y="suspendedStart",p="suspendedYield",h="executing",d="completed",m={};function v(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(L([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=g.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==B(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function R(e,r,n){var o=y;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(B(e)+" is not iterable")}return b.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},O(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),l(j,u,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function $(t){return function(t){if(Array.isArray(t))return X(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||V(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){U(i,n,o,a,c,"next",t)}function c(t){U(i,n,o,a,c,"throw",t)}a(void 0)}))}}function H(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||V(t,e)||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 V(t,e){if(t){if("string"==typeof t)return X(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(t,e):void 0}}function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var q=function(e,r,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,c=H((0,t.useState)([]),2),u=c[0],l=c[1],f=H((0,t.useState)(1),2),s=f[0],y=f[1],p=H((0,t.useState)(!0),2),h=p[0],d=p[1],m=H((0,t.useState)(!1),2),v=m[0],b=m[1],g=H((0,t.useState)(),2),w=g[0],S=g[1],E=(0,t.useRef)(null),j=(0,t.useCallback)(Y(G().mark((function t(){var i,a;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,b(!0),t.next=4,fetch("".concat(e,"?").concat(r,"=").concat(s,"&").concat(n,"=").concat(o),{credentials:"include"});case 4:if((i=t.sent).ok){t.next=7;break}throw new Error("Something went wrong");case 7:return t.next=9,i.json();case 9:a=t.sent,l((function(t){return[].concat($(t),$(a))})),d(a.length>0),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),S(t.t0||"Something went wrong");case 17:return t.prev=17,b(!1),t.finish(17);case 20:case"end":return t.stop()}}),t,null,[[0,14,17,20]])}))),[s,o,e,r,n]);return(0,t.useEffect)((function(){j()}),[j]),(0,t.useEffect)((function(){var t=new IntersectionObserver((function(t){t[0].isIntersecting&&h&&!v&&(E.current&&clearTimeout(E.current),E.current=setTimeout((function(){a!==s&&y((function(t){return t+1}))}),200))}),{rootMargin:"100px"}),e=document.querySelector(".".concat(i,":last-of-type"));return e&&t.observe(e),function(){t.disconnect(),E.current&&clearTimeout(E.current)}}),[a,s,h,v]),{loading:v,hasMore:h,page:s,error:w,data:u,setData:l}},W=function(e,r,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],c=H((0,t.useState)([]),2),u=c[0],l=c[1],f=(0,t.useRef)(null),s=(0,t.useCallback)((function(){f.current&&clearTimeout(f.current),f.current=setTimeout((function(){if(e.current&&0===e.current.scrollTop){if(r===n)return;o((function(t){return t+1}))}}),200)}),[r,n]);return(0,t.useEffect)((function(){var t=e.current;return t&&t.addEventListener("scroll",s),function(){t&&t.removeEventListener("scroll",s)}}),[s,u]),(0,t.useEffect)((function(){var t=0,r=0;e.current&&(t=e.current.scrollHeight,r=e.current.scrollTop),i&&l((function(t){var e=new Set(t.map((function(t){return t._id}))),r=null==i?void 0:i.filter((function(t){return!e.has(t._id)}));if(a){var n=Array.isArray(r)?$(r):[r];return[].concat($(n.reverse()),$(t))}return[].concat($(r),$(t))})),requestAnimationFrame((function(){if(e.current){var n=r+e.current.scrollHeight-t;e.current.scrollTop=n}}))}),[i]),{data:u,setData:l}};function J(t){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(t)}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function K(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Q(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?K(Object(r),!0).forEach((function(e){var n,o,i,a;n=t,o=e,i=r[e],a=function(t,e){if("object"!=J(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=J(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o),(o="symbol"==J(a)?a:String(a))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var tt=function(e){var r,n,o=e.totalPages,i=void 0===o?1:o,a=e.currPage,c=e.setCurrPage,u=e.activeButtonStyle,l=void 0===u?{backgroundColor:"black",color:"white"}:u,f=e.Button,s=void 0===f?function(t){var e=t.children,r=t.onClick,n=t.style;return React.createElement("button",{style:Q({padding:"0.5rem 1rem",outline:"none",border:"none",borderRadius:"0.5rem",cursor:"pointer",backgroundColor:"#e2e8f0"},n),onClick:r},e)}:f,y=e.Container,p=void 0===y?function(t){var e=t.children;return React.createElement("ul",{style:{display:"flex",gap:"1rem",listStyle:"none"}},e)}:y,h=(r=(0,t.useState)(1),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(r,n)||function(t,e){if(t){if("string"==typeof t)return Z(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,e):void 0}}(r,n)||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.")}()),d=h[0],m=h[1];return React.createElement(p,null,React.createElement(React.Fragment,null,d>1&&React.createElement("li",null,React.createElement(s,{onClick:function(){return m((function(t){return t-4}))}},"Prev")),Array.from({length:Math.min(4,i)},(function(t,e){return d+e})).map((function(t){return React.createElement("li",{key:t},React.createElement(s,{style:a===t?l:{},onClick:function(){return function(t){c(t),t>d+4-1?m(t):t<d&&m(t-4+1)}(t)}},t))})),i>d+4-1&&React.createElement("li",null,React.createElement(s,{onClick:function(){return m((function(t){return t+4}))}},"Next"))))},et=function(t){var e=t.totalPages,r=void 0===e?1:e,n=t.currPage,o=t.setCurrPage,i=t.Typography,a=void 0===i?function(t){var e=t.children;return React.createElement("code",null,e)}:i,c=t.Button,u=t.Container,l=void 0===u?function(t){var e=t.children;return React.createElement("nav",{style:{display:"flex",alignItems:"center",gap:"1rem",padding:"1rem 0"}},e)}:u,f=1===n,s=n===r;return React.createElement(l,null,React.createElement(React.Fragment,null,React.createElement(c,{disabled:f,onClick:function(){1!==n&&o((function(t){return t-1}))}},"Previous"),React.createElement(a,null,n," of ",r),React.createElement(c,{disabled:s,onClick:function(){n!==r&&o((function(t){return t+1}))}},"Next")))};function rt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return nt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nt(t,e):void 0}}(t,e)||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 nt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ot=function(e){var r=e.images,n=e.darkMode,o=void 0!==n&&n,i=e.objectFit,a=void 0===i?"cover":i,c=e.setIsOpen,u=e.PrevButton,l=e.NextButton,f=rt((0,t.useState)(0),2),s=f[0],y=f[1],p=(0,t.useRef)(null),h=(0,t.useRef)(null),d=o?"1px solid #fff":"1px solid black",m=(0,t.useCallback)((function(t){var e,r=t.clientY;null===(e=p.current)||void 0===e||e.scrollTo({top:r})}),[]);(0,t.useEffect)((function(){return p.current&&p.current.addEventListener("mousemove",m),function(){p.current&&p.current.removeEventListener("mousemove",m)}}),[]);var v=React.createElement("aside",{style:{display:"flex",flexDirection:"column",gap:"1rem",position:"absolute",top:"1rem",left:"1rem"}},r.map((function(t,e){return React.createElement("button",{key:e,style:{border:e===s?d:"1px solid rgba(0,0,0,0.3)",outline:"none",backgroundColor:"transparent",width:"fit-content",height:"unset",cursor:"pointer"},onClick:function(){return y(e)}},React.createElement("img",{style:{width:"2rem",height:"2.5rem",objectFit:"contain"},src:t,alt:"Image"}))}))),b=React.createElement("article",{style:{display:"flex",width:"95%",justifyContent:"space-between",alignItems:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},React.createElement(u,{onClick:function(){y(0===s?r.length-1:function(t){return t-1})}}),React.createElement(l,{onClick:function(){s===r.length-1?y(0):y((function(t){return t+1}))}}));return React.createElement("section",{style:{width:"100vw",height:"100vh",backgroundColor:"rgba(0,0,0,0.7)",position:"fixed",top:0,left:0,zIndex:200},onClick:function(t){if(p.current){var e=p.current.getBoundingClientRect();(t.clientX<e.left||t.clientX>e.right||t.clientY<e.top||t.clientY>e.bottom)&&c(!1)}}},React.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:p},React.createElement("img",{ref:h,src:r[s],style:{width:"100%",minHeight:"100vh",objectFit:a}}),React.createElement("div",{style:{position:"fixed",top:0,width:"95%",maxWidth:"950px",height:"100vh"}},v,b)))},it=function(e){var r=e.imageSize,n=void 0===r?["100%","80vw","25rem","30rem"]:r,o=e.images,i=void 0===o?[]:o,a=e.objectFit,c=void 0===a?"cover":a,u=e.imageBg,l=void 0===u?"transparent":u,f=e.sideImageSize,s=void 0===f?["3rem","3.5rem","4rem","5rem"]:f;if(0===i.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");var y=rt((0,t.useState)(0),2),p=y[0],h=y[1],d=rt((0,t.useState)(""),2),m=d[0],v=d[1],b=rt((0,t.useState)(""),2),g=b[0],w=b[1],S=(0,t.useCallback)((function(){var t=window.screen.width;t<480?(v(n[0]),w(s[0])):t<768&&n.length>=3?(v(n[1]),w(s[1])):t<992&&n.length>=4?(v(n[2]),w(s[2])):t<1280&&n.length>=5?(v(n[3]),w(s[3])):(v(n[n.length-1]),w(s[s.length-1]))}),[]);return(0,t.useEffect)((function(){return S(),window.addEventListener("resize",S),function(){window.removeEventListener("resize",S)}}),[]),React.createElement("div",{style:{width:"fit-content",display:"flex",gap:"1rem",padding:"1rem"}},React.createElement("aside",{style:{display:"flex",flexDirection:"column",width:"fit-content",gap:"1rem"}},i.map((function(t,e){return React.createElement("img",{key:e,style:{width:g,height:g,borderRadius:"0.25rem",objectFit:c,border:"1px solid rgba(0,0,0,0.3)"},src:t,alt:"Image-".concat(e),onMouseOver:function(){return h(e)}})}))),React.createElement("section",{style:{width:m,height:m,overflow:"hidden",scrollbarWidth:"none",display:"flex",alignItems:"center",borderRadius:"0.5rem",backgroundColor:l}},i.map((function(t,e){return React.createElement("img",{key:e,style:{width:m,height:m,objectFit:"contain",aspectRatio:"1/1",borderRadius:"0.5rem",transition:"all 0.3s",transform:"translateX(-".concat(100*p,"%)")},src:t,alt:"Photo-".concat(e)})}))))},at=function(e){var r=e.images,n=e.objectFit,o=void 0===n?"cover":n,i=e.PrevIcon,a=e.NextIcon,c=e.bgColor,u=void 0===c?"inherit":c,l=e.showNav,f=void 0===l||l,s=e.showDots,y=e.showThumbnails,p=e.autoplay,h=e.autoplayDuration,d=void 0===h?4e3:h,m=e.onClick,v=rt((0,t.useState)(0),2),b=v[0],g=v[1],w=function(){g((function(t){return t===r.length-1?0:t+1}))};(0,t.useEffect)((function(){var t;return p&&(t=setInterval((function(){w()}),d)),function(){t&&clearInterval(t)}}),[]);var S=React.createElement("article",{style:{padding:"1rem",position:"absolute",display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",top:"50%",transform:"translateY(-50%)"}},React.createElement("button",{style:{border:"none",backgroundColor:"transparent",cursor:"pointer",outline:"none"},onClick:function(){g((function(t){return 0===t?r.length-1:t-1}))}},i||"Prev"),React.createElement("button",{style:{border:"none",backgroundColor:"transparent",cursor:"pointer",outline:"none"},onClick:w},a||"Next")),E=React.createElement("article",{style:{padding:"1rem",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",bottom:0,gap:"0.5rem"}},r.map((function(t,e){return React.createElement("button",{key:e,style:{width:"0.75rem",height:"0.75rem",borderRadius:"50%",border:"none",backgroundColor:e===b?"white":"black"},onClick:function(){return g(e)}})}))),j=React.createElement("aside",{style:{height:"5rem",display:"flex",justifyContent:"center",gap:"1rem",flexWrap:"wrap"}},r.map((function(t,e){return React.createElement("img",{key:e,style:{width:"5rem",height:"5rem",borderRadius:"0.25rem",objectFit:"cover",border:"1px solid rgba(0,0,0,0.3)"},src:t,alt:"Image-".concat(e),onMouseOver:function(){return g(e)}})})));return React.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column",gap:"1rem",backgroundColor:u}},React.createElement("div",{style:{height:"100%",display:"flex",overflowX:"hidden",position:"relative"}},r.map((function(t,e){return React.createElement("img",{key:e,style:{width:"100%",height:"100%",objectFit:o,flex:"none",transition:"all 0.3s",transform:"translateX(-".concat(100*b,"%)")},src:t,onClick:function(){return m&&m()}})})),f&&S,s&&E),y&&j)};function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach((function(e){var n,o,i,a;n=t,o=e,i=r[e],a=function(t,e){if("object"!=ct(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o),(o="symbol"==ct(a)?a:String(a))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ft=(0,t.memo)((function(e){var r=e.size,n=void 0===r?10:r,o=e.color,i=void 0===o?"black":o,a=e.styles,c=e.zoom,u=void 0===c?"2":c,l=e.mode,f=void 0===l?"normal":l;if(n<1||n>40)throw new Error("Size must be between 1 and 40");var s=(0,t.useRef)(),y=(0,t.useRef)({x:0,y:0}),p=(0,t.useRef)(!1),h=function(t){y.current={x:t.clientX,y:t.clientY};var e=t.target.getAttribute("data-firebolt-zoom");p.current=Boolean(e)},d=(0,t.useCallback)((function(){var t=y.current.x,e=y.current.y,r=s.current;r&&(Array.from(r).forEach((function(n,o){n.style.left="".concat(t-12,"px"),n.style.top="".concat(e-12,"px"),n.x=t,n.y=e;var i=(r.length-o)/r.length;n.style.scale=i.toString();var a=r[o+1]||r[0];t+=.3*(Number(a.x||0)-t),e+=.3*(Number(a.y||0)-e),0===o&&p.current&&(n.style.scale=u)})),requestAnimationFrame(d))}),[]);return(0,t.useEffect)((function(){return s.current=document.getElementsByClassName("6pp-firebolt-Cursor"),d(),window.addEventListener("mousemove",h),function(){window.removeEventListener("mousemove",h)}}),[]),React.createElement("div",{style:{zIndex:"10000",mixBlendMode:f,pointerEvents:"none"}},Array.from({length:n}).map((function(t,e){return React.createElement("div",{className:"6pp-firebolt-Cursor",key:e,style:lt({position:"fixed",height:"24px",width:"24px",borderRadius:"50%",left:0,top:0,backgroundColor:i,userSelect:"none",pointerEvents:"none",transition:"scale 0.2s"},a)})})))}))})(),o})()));
{
"name": "6pp",
"version": "1.1.11",
"version": "1.1.12",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/bundle.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc