New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

alga-js

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alga-js - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

dist/alga-umd.js

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).$={})}(this,(function(e){"use strict";var r=Object.freeze({__proto__:null,random:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:255,r=Number(e)+1;return Math.floor(Math.random()*r)}}),t=function(e){return!isNaN(e)&&"number"==typeof Number(e)},n=function(e){if("number"!=typeof e&&"string"!=typeof e)throw new Error("You must input only number format here");return 1===Math.sign(e)},o=function(e){if("number"!=typeof e&&"string"!=typeof e)throw new Error("You must input only number format here");return-1===Math.sign(e)},a=function(e){return"string"==typeof e};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function f(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function h(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?f(Object(t),!0).forEach((function(r){l(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return t}(e,r)||m(e,r)||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 s(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||m(e)||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 m(e,r){if(e){if("string"==typeof e)return g(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?g(e,r):void 0}}function g(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function v(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=m(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(u)throw a}}}}var w=function(e){return"object"===i(e)&&null!==e&&"[object Object]"===Object.prototype.toString.call(e)},d=Object.freeze({__proto__:null,random:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if("number"!=typeof e&&e<=0)throw new Error("You have to add a number at least 1");for(var r="",t="0123456789",n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*t.length));return r},loop:function(e,r){if("number"!=typeof e&e<=-1)throw new Error("Only accept number here, start from 0");if("number"!=typeof r&r<=0)throw new Error("Only accept number here, start from 1");for(var t=[];e<=r;)t.push(e++);return t},isNumber:t,isPositive:n,isNegative:o,calc:function(e,r,n){if(!t(e))throw new Error("This is left operand and must be in number type");if(!t(r))throw new Error("This is left operand and must be in number type");if(!a(n))throw new Error("Operator must be one of these: add, subtract, multiply, divide, reminder or exponent");var o=0;return"add"===n||"addition"===n||"plus"===n||"+"===n?o=Number(e)+Number(r):"subtract"===n||"subtraction"===n||"minus"===n||"-"===n?o=Number(e)-Number(r):"multiply"===n||"multiplication"===n||"×"===n||"*"===n?o=Number(e)*Number(r):"divide"===n||"division"===n||"÷"===n||"/"===n?o=Number(e)/Number(r):"remainder"===n||"modulo"===n||"%"===n?o=Number(e)%Number(r):"exponent"!==n&&"exponentiation"!==n&&"**"!==n||(o=Math.pow(Number(e),Number(r))),o},currency:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!t(e))throw new Error("Amount must be in a number type");if(!a(r)&&3===r.length)throw new Error("Currency code must have at least 3 uppercase character");if(!a(n))throw new Error("Locale code must contain 2 languages and 2 country code and separated by dash (-)");if(!w(o))throw new Error("Currency options must be in object type");return new Intl.NumberFormat(n,h({style:"currency",currency:r.toUpperCase()},o)).format(e)}}),y=Object.freeze({__proto__:null,random:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_~!@#$%^&*()+={}[]|:;<>,./?";"short"===r||"alphadash"===r?n=n.slice(0,64):"narrow"===r||"alphanumeric"===r?n=n.slice(0,62):"alpha"===r?n=n.slice(10,62):"hex"===r?n=n.slice(0,16):"number"!==r&&"numeric"!==r||(n=n.slice(0,10));for(var o=0;o<e;o++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}}),b=Object.freeze({__proto__:null,split:function(e){return function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];return"string"==typeof e&&(r>=1&&n.push(e.slice(0,r)),null!==t?(n.push(e.slice(r,t)),n.push(e.slice(t))):n.push(e.slice(r))),n}},capitalize:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"single";if("string"==typeof e){var t=e;return t="multiple"===r?t.toLowerCase().replace(/\w\S*/g,(function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})):t.trimStart().replace(/^\w/,(function(e){return e.toUpperCase()}))}},includes:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return-1!==e.indexOf(r,t)},isString:a}),p=function(e){return!("object"!==i(e)||null===e||!Array.isArray(e))},N=function(){function e(r,t){!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),this.valArr=r,this.toArr=t}var r,t,n;return r=e,(t=[{key:"first",value:function(){return[].concat(s(this.valArr),s(this.toArr))}},{key:"last",value:function(){return[].concat(s(this.toArr),s(this.valArr))}},{key:"before",value:function(e){var r=isNaN(e)?1:e;return this.toArr.splice(Number(r)-1,0,this.valArr),this.toArr.flat()}},{key:"after",value:function(e){var r=isNaN(e)?0:e;return this.toArr.splice(Number(r)+1,0,this.valArr),this.toArr.flat()}}])&&u(r.prototype,t),n&&u(r,n),e}(),E=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{key:"id",value:0};if(!p(e))throw new Error("You must enter the first argument in array only");var t=Array.from(e),n=-1;return"key"in r&&"value"in r?n=t.length>=1?t.findIndex((function(e){return e[r.key]===r.value})):-1:t.length>=1&&(n=t.findIndex((function(e){for(var t=0,n=Object.entries(r);t<n.length;t++){var o=c(n[t],2),a=o[0],i=o[1];if(a in e&&e[a]===i)return!0}}))),n},D=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dense";if(!p(e))throw new Error("You must enter the first argument in array only");return"sparse"===r?Object.keys(e).map((function(e){return Number(e)})):s(e.keys())},A=function(e){if(!p(e))throw new Error("You must enter the argument in array only");var r=D(e);return Number(r[Math.floor(Math.random()*r.length)])},Y=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r){for(var n={},o=0,a=r;o<a.length;o++)for(var i=a[o],u=0,l=Object.entries(i);u<l.length;u++){var f=c(l[u],2),h=f[0],s=f[1];n[h]=s}return n}},S=function(e){if(!p(e))throw new Error("Please provide array that you want to remove its element");for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("On the last of argument, you have to enter at least one argument");for(var o=Array.from(e),a=[],u=function(){var e=f[l];if("string"==typeof e&&"first"===e)o=o.map((function(e,r){return 0===r?null:e})),a=o;else if("string"==typeof e&&"last"===e)o=o.map((function(e,r){return r===o.length-1?null:e})),a=o;else if("number"==typeof e)o=o.map((function(r,t){return t===e?null:r})),a=o;else if("object"===i(e)&&null!==e){var r=E(o,e);o=o.map((function(e,t){return t===r?null:e})),a=o}},l=0,f=t;l<f.length;l++)u();return a.filter((function(e){return null!==e}))},M=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!p(e))throw new Error("");var t=Array.from(e),n=[];if("string"==typeof r){var o,a=new Set,i=v(t);try{for(i.s();!(o=i.n()).done;){var u=o.value;a.has(u[r])||a.add(u[r])}}catch(e){i.e(e)}finally{i.f()}n=s(a)}else n=Array.from(new Set(t));return n},j=function(e){if(!w(e))throw new Error("This is object helper, you must provide the first argument in an object");for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("The next arguments must be in a string or in a number and at least one argument");for(var o={},a=new Set(t),i=0,u=Object.entries(e);i<u.length;i++){var l=c(u[i],1),f=l[0];a.has(e[f])||(o[f]=e[f])}return o},O=function(e,r){if(!p(e))throw new Error("The first argument must be in array of objects");if(!w(r))throw new Error("The second argument must be in object type and must have at least one property");for(var n=Array.from(e),o=function(){var e=c(u[i],2),r=e[0],o=e[1],l=n.filter((function(e){if(r in e){if(t(e[r])&&Number(e[r])===Number(o))return!0;if(a(e[r])&&e[r].toLowerCase().includes(o.toLowerCase()))return!0}return!1}));n=l},i=0,u=Object.entries(j(r,"",0));i<u.length;i++)o();return n},T=function(e){return"function"==typeof e},C=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";if(!p(e))throw new Error("Only array of objects accepted");if(!a(r))throw new Error("The second argument must be in a string and a value must be object property key or name");if(!a(n))throw new Error('The third argument must be in a string and a value either "", "asc" or "desc"');var o=Array.from(e);return"asc"===n?o.sort((function(e,n){if(r in e&&r in n){if(t(e[r])&&t(n[r]))return Number(e[r])-Number(n[r]);if(a(e[r])&&a(n[r])){var o=e[r].toLowerCase(),i=n[r].toLowerCase(),u=0;return o<i?u=-1:o>i&&(u=1),u}}})):"desc"===n&&o.sort((function(e,n){if(r in e&&r in n){if(t(e[r])&&t(n[r]))return Number(n[r])-Number(e[r]);if(a(e[r])&&a(n[r])){var o=e[r].toLowerCase(),i=n[r].toLowerCase(),u=0;return i<o?u=-1:i>o&&(u=1),u}}})),o},k=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!p(e))throw new Error("On the first argument, here only accept array");if(!t(r))throw new Error("This is the page active number, please enter number only");if(!t(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var o=Array.from(e),a=Number(n)*Number(r)-(Number(n)-1),i=Number(n)*Number(r);return{from:a,to:i<=o.length?i:o.length,of:o.length}},x=function(e){if(!p(e))throw new Error("This argument only accept array");var r,t={},n=new Set,o=v(new Set(e));try{var a=function(){var o=r.value,a=Array.from(e).filter((function(e){return e===o}));n.has(a.length)||(n.add(a.length),t[a.length]=[]),a.forEach((function(e){t[a.length].push(e)}))};for(o.s();!(r=o.n()).done;)a()}catch(e){o.e(e)}finally{o.f()}return t},I=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(!r&&r.length<=1)throw new Error("You have to provide here at least 2 arguments");var n=[],o={};r.forEach((function(e,r){if(p(e)?o[r]=new Set(e):o[r]=(new Set).add(e),0!==r){var t,a=v(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;o[r-1].has(i)&&n.push(i)}}catch(e){a.e(e)}finally{a.f()}}}));var a=x(n);return Array.from(new Set(a[r.length-1]))},_=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(!p(e)&&e.length<=0)throw new Error("You need to provide more values to your array");if(!t&&t.length<=0)throw new Error("You have to provide here at least 1 value");var o,a=[],i=v(e);try{for(i.s();!(o=i.n()).done;){var u=o.value;t.flat().includes(u)||a.push(u)}}catch(e){i.e(e)}finally{i.f()}return a},B=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2&&!p(r[0])&&!p(r[1])&&Number(r[0].length)!==Number(r[1].length))throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(r[0]).map((function(e){return[]})),o=0,a=r;o<a.length;o++){var i=a[o];i.forEach((function(e,r){r in n&&n[r].push(e)}))}return n},P=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(r),o=[],a=n.shift(),i=function(){var e=l[u],r=new Map;e.forEach((function(e,t){a[t]&&r.set(a[t],e)})),o.push(Object.fromEntries(r))},u=0,l=n;u<l.length;u++)i();return o},U=function(){if(0===arguments.length||arguments.length>=4)throw new Error("Here only accept 3 arguments, so you have to provide at least 1 argument");var e=1===arguments.length?0:Number(arguments.length<=0?void 0:arguments[0]),r=Number(arguments.length>=2?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0]),t=3===arguments.length?Number(arguments.length<=2?void 0:arguments[2]):1;arguments.length<3&&o(r)&&(t=-1);var a=[],i=0,u=0;if(o(e)&&n(r)?i=e-1:n(e)&&o(r)?i=e+1:n(e)&&n(r)?i=e-1:o(e)&&o(r)&&(i=e+1),i<r){for(;i<r;)i++,t>1?(u+=t)<r&&a.push(u):i<r&&a.push(i);0!==e||a.includes(0)||a.unshift(0)}else if(i>r){for(;i>r;)i--,t<-1?(u-=t)>r&&a.unshift(u):i>r&&a.unshift(i);0!==e||a.includes(0)||a.push(0)}return 1===a.length&&0===a[0]?[]:a},L=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(0===r.length)throw new Error("Accept index of array elements only and you add at least one index in number");return function(e){if(!p(e))throw new Error("Please enter array only here");for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(0===n.length&&n.length!==r.length&&0!==I(r,n).length)throw new Error("Only accept index of array elements and the number of the first indexes must be the same as the second indexes and also, both indexes must be different");for(var a=Array.from(e),i=Array.from(e),u=0;u<r.length;u++)void 0!==r[u]&&void 0!==n[u]&&(i.splice(r[u],1,a[n[u]]),i.splice(n[u],1,a[r[u]]));return i}},H=function(e,r,t){if(!p(e))throw new Error("On the first argument, you have to provide array only");if(!a(r))throw new Error("New property must be in string type");if(!T(t))throw new Error("Callback must be in function or method");return Array.from(e).map((function(e){return e[r]=t.apply(void 0,s(Object.values(e).filter((function(e){return!1===isNaN(e)})))),e}))},F=Object.freeze({__proto__:null,insert:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<1)throw new Error("You have to enter at least one value");var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!p(e))throw new Error("Only array accept here");var o=Array.from(e),a=new N(r,o);return"first"===t?a=a.first():"last"===t?a=a.last():"before"===t?a=a.before(n):"after"===t&&(a=a.after(n)),a};return n},insertBefore:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length<1)throw new Error("You have to enter at least one value");return function(e,n){if(!p(e))throw new Error("In the first argument, here only accept array type");if(!t(n))throw new Error("In the second argument, accept only numeric or number type");var o=Array.from(e),a=isNaN(n)?1:n;return o.splice(Number(a)-1,0,r),o.flat()}},insertAfter:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length<1)throw new Error("You have to enter at least one value");return function(e,n){if(!p(e))throw new Error("In the first argument, here only accept array type");if(!t(n))throw new Error("In the second argument, accept only numeric or number type");var o=Array.from(e),a=isNaN(n)?0:n;return o.splice(Number(a)+1,0,r),o.flat()}},update:function(e){if(!w(e))throw new Error("You must enter object only here");return function(r,t){if(!p(r))throw new Error("You have to enter array only on the first argument");if(!w(t))throw new Error("You must enter object only on the second argument");var n=Array.from(r),o=E(n,t);return n.map((function(r,t){var n=r;return t===o&&(n=Y(r,e)),n}))}},destroy:S,select:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(!p(e))throw new Error("On the first argument, you have to provide array only");if(t.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(e);return o.map((function(e){var r,n={},o=v(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;a in e&&(n[a]=e[a])}}catch(e){o.e(e)}finally{o.f()}return n}))},hidden:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(!p(e))throw new Error("On the first argument, you have to provide array only");if(t.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(e);return o.map((function(e){var r,n=e,o=v(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;a in e&&delete n[a]}}catch(e){o.e(e)}finally{o.f()}return n}))},toggle:function(e){return function(r){var t=Array.from(r);if(t.includes(e)){var n=t.findIndex((function(r){return r===e}));t.splice(n,1)}else t.push(e);return t}},flatten:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],n={};n.id=r.id||"id",n.parent=r.parent||"parent",n.children=r.children||"children";var o=function(){Array.from(e).forEach((function(e){if("object"===i(e)&&null!==e){var r=e;r[n.parent]="0","object"===i(r[n.children])&&Array.isArray(r[n.children])&&(a(r[n.children],e),delete r[n.children]),t.push(r)}}))},a=function e(r,o){r.length>=1&&Array.from(r).forEach((function(r){if("object"===i(r)&&null!==r){var a=r;a[n.parent]=o[n.id],"object"===i(a[n.children])&&Array.isArray(a[n.children])&&(e(a[n.children],r),delete a[n.children]),t.push(a)}}))};return o(),t},nested:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],n=Array.from(e),o={};o.id=r.id||"id",o.parent=r.parent||"parent",o.children=r.children||"children";var a=function(e){e.forEach((function(e){if("object"===i(e)&&null!==e){var r=null;("string"==typeof e[o.parent]&&"0"===e[o.parent]||"number"==typeof e[o.parent]&&0===e[o.parent])&&(r=u(e)),null!==r&&t.push(r)}}))},u=function(e){var r=e;return void 0!==e[o.children]&&null!==e[o.children]||(r[o.children]=l(e[o.id]),r[o.children].length<=0&&delete r[o.children]),delete r[o.parent],r},l=function(e){var r=[];return f(e).length>=1&&f(e).forEach((function(e){r.push(u(e))})),r},f=function(e){return n.filter((function(r){return r.parent===e}))};return a(n),t},index:E,toIndex:D,randomIndex:A,search:function(e){if(!p)throw new Error("The first argument must be in array");for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];if(n.length<1)throw new Error("On the next arguments, you must provide at least one argument in either string or number");for(var i=[],u=function(){var r=f[l],n=Array.from(e).filter((function(e){if(t(e)&&Number(e)===Number(r))return!0;if(a(e)&&e.toLowerCase().includes(r.toLowerCase()))return!0;if(w(e))for(var n=0,o=Object.entries(e);n<o.length;n++){var i=c(o[n],2),u=i[0],l=i[1];if(t(e[u])&&Number(l)===Number(r))return!0;if(a(e[u])&&l.toLowerCase().includes(r.toLowerCase()))return!0}return!1}));i=M(i.concat(n))},l=0,f=n;l<f.length;l++)u();return i},searchBy:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length<1)throw new Error("This argument must have at least one argument in either string or number");return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(!p(e))throw new Error("Array of objects is needed in order to be searched");if(o.length<1)throw new Error("The last argument required at least one argument in either string or number");var u,l=[],f=v(r);try{var h=function(){var r=u.value,n=Array.from(e).filter((function(e){for(var n=0,i=Array.from(o);n<i.length;n++){var u=i[n];if(u in e){if(t(e[u])&&Number(e[u])===Number(r))return!0;if(a(e[u])&&-1!==e[u].toLowerCase().indexOf(r.toLowerCase()))return!0}}return!1}));l=M(l.concat(n))};for(f.s();!(u=f.n()).done;)h()}catch(e){f.e(e)}finally{f.f()}return l}},filter:O,filtered:O,sort:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";if(!p(e))throw new Error("Only array of strings or numbers accepted");if(!a(r))throw new Error('The second argument must be in a string and a value either "", "asc" or "desc"');var n=Array.from(e);return"asc"===r?n.sort((function(e,r){if(t(e)&&t(r))return Number(e)-Number(r);if(a(e)&&a(r)){var n=e.toLowerCase(),o=r.toLowerCase(),i=0;return n<o?i=-1:n>o&&(i=1),i}})):"desc"===r&&n.sort((function(e,r){if(t(e)&&t(r))return Number(r)-Number(e);if(a(e)&&a(r)){var n=e.toLowerCase(),o=r.toLowerCase(),i=0;return o<n?i=-1:o>n&&(i=1),i}})),n},sortBy:C,sorted:C,sortWith:function(e,r){if(!p(e))throw new Error("The first argument must be in an array type");if(!T(r))throw new Error("The second argument is a compare or callback function");var t=Array.from(e);return t.sort((function(e,t){return-1===Math.sign(r(e,t))?-1:1})),t},paginate:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!p(e))throw new Error("On the first argument, here only accept array");if(!t(r))throw new Error("This is the page active number, please enter number only");if(!t(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var o=Array.from(e),a=Number(n)*Number(r)-(Number(n)-1),i=Number(n)*Number(r);return o.slice(a-1,i<=o.length?i:o.length)},pages:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(!p(e))throw new Error("On the first argument, here only accept array");if(!t(r))throw new Error("This is the limit of entries in one page in a number, please enter number only");var n=Array.from(e),o=n.length/Number(r),a=Math.ceil(o);return a},pageInfo:k,show:k,pagination:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t(e))throw new Error("This is the total or all pages in numbers, please enter number only");if(!t(r))throw new Error("This is the page active number, please enter number only");if(!t(n))throw new Error("This is the position of ellipsis [...], please enter number only");var o=[],a=Number(e)<Number(r)?Number(e):Number(r),i=Number(r)<1?1:Number(r),u=a+Number(n),l=i-Number(n);if(0===Number(n))for(var f=1;f<=Number(e);f++)o.push(f);else{if(i>1)for(var h=l;h<i;h++)o.push(h);for(var c=a;c<=u;c++)o.push(c)}var s=o.filter((function(e){return e>0})),m=s.filter((function(r){return r<=Number(e)}));return u<Number(e)&&0!==Number(n)&&m.push("..."),l>1&&0!==Number(n)&&m.unshift("..."),m},sum:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!p(e))throw new Error("In the first argument, you must enter a data in array");var t=Array.from(e),n=0;if("string"==typeof r&&""!==r){var o=t.map((function(e){return r in e?Number(e[r]):0}));n=o.reduce((function(e,r){return Number(e)+Number(r)}))}else n=t.reduce((function(e,r){return Number(e)+Number(r)}));return n},calculate:H,calc:H,unique:M,isArray:p,isSuperset:function(e,r){if(!p(e)&&!p(r))throw new Error("The both of arguments must be in arrays");var t,n=new Set(e),o=v(r);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(!n.has(a))return!1}}catch(e){o.e(e)}finally{o.f()}return!0},union:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return Array.from(new Set(r.flat()))},intersection:I,difference:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(!r&&r.length<=1)throw new Error("You have to provide here at least 2 arguments");var n=new Set,o=I.apply(void 0,r);return r.forEach((function(e){if(!p(e))throw new Error("Here only accept arrays from all arguments");var r,t=v(e);try{for(t.s();!(r=t.n()).done;){var a=r.value;o.includes(a)||n.has(a)||n.add(a)}}catch(e){t.e(e)}finally{t.f()}})),Array.from(n)},asymmetricDifference:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(!r&&r.length<=1)throw new Error("You have to provide here at least 2 arguments");for(var n=new Set,o=[],a=0,i=r;a<i.length;a++){var u=i[a];if(!p(u))throw new Error("Here only accept arrays from all arguments");u.forEach((function(e){n.has(e)?(n.delete(e),o.push(e)):o.includes(e)||n.add(e)}))}return Array.from(n)},complement:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(!r&&r.length<=1)throw new Error("You have to provide here at least 1 value");var n=Array.from(r);n.shift();var o=new Set(_.apply(void 0,[r[0]].concat(s(n))));return Array.from(o)},without:_,transpose:B,zip:P,unzip:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(r),o=Object.keys(n[0]),a={},i=0,u=o;i<u.length;i++){var l=u[i];a[l]=[]}for(var f=0,h=n;f<h.length;f++){var c=h[f];for(var m in c)a[m].push(c[m])}return[o].concat(s(B.apply(void 0,s(Object.values(a)))))},range:U,move:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(0===r.length)throw new Error("Only accept index of array elements and you must input at least one index in number type");return function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!p(e))throw new Error("Please enter array only here");if(!t(n))throw new Error("Input only index number here");var a,i=Array.from(e),u=[],l=v(r);try{for(l.s();!(a=l.n()).done;){var f=a.value;void 0!==i[Number(f)]&&u.push(i[Number(f)])}}catch(e){l.e(e)}finally{l.f()}var h=S.apply(void 0,[i].concat(r));return h.splice.apply(h,[n,o].concat(u)),h}},switched:L,transfer:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(0===r.length)throw new Error("Only accept index of array elements and you must enter at least one index in number type");return function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!p(e))throw new Error("Accept array only here");if(!p(n))throw new Error("Accept array only here");if(!t(o))throw new Error("Input only index number here");var a,i=Array.from(e),u=Array.from(n),l=[],f=v(r);try{for(f.s();!(a=f.n()).done;){var h=a.value;void 0!==i[Number(h)]&&l.push(i[Number(h)])}}catch(e){f.e(e)}finally{f.f()}var c=null===o?Number(u.length):o;u.splice.apply(u,[c,0].concat(l));var s=S.apply(void 0,[i].concat(r));return{from:s,to:u}}},compact:function(e){if(!p(e))throw new Error("Enter only array type here");return Array.from(e).filter((function(e){return null!=e&&!1!==e&&!isNaN(e)&&""!==e&&e>0}))},chunk:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!p(e)&&e.length<=2)throw new Error("Please insert array only on the first argument and must have 3 values at least");if("number"!=typeof r)throw new Error("On the second argument, you must input in a number type only");var t,n=U(r,e.length,r),o=[],a=v(n);try{for(a.s();!(t=a.n()).done;){var i=t.value,u=e.slice(Number(i)-Number(r),i);o.push(u)}}catch(e){a.e(e)}finally{a.f()}return n[Number(n.length)-1]<=e.length&&o.push(e.slice(n[Number(n.length)-1],e.length)),o},shuffle:function(e){if(!p(e)&&e.length<=2)throw new Error("This shuffle method only work on data in array type");for(var r=Array.from(e),t=Number(r.length)-1;t>2;t--){var n=r.slice(0,Number(t)+1);r=L(t)(r,A(n))}return r},group:function(e,r){if(!p(e))throw new Error("You must enter array literal here");if(!T(r))throw new Error("You have to enter a function or callback on the second argument");var t,n={},o=v(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;void 0===n[r(a).toString()]&&(n[r(a).toString()]=[]),n[r(a).toString()].push(a)}}catch(e){o.e(e)}finally{o.f()}return n},countDuplication:x,countBy:function(e,r){if(!p(e))throw new Error("The first paramenter only accept array");if(!T(r))throw new Error("The second paramenter only accept callback function");return e.filter((function(e){return r(e)})).length}}),z=Object.freeze({__proto__:null,remove:function(e){if(!w(e))throw new Error("This is object helper, you must provide the first argument in an object");for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("The next arguments must be in a string and at least one argument");for(var o=Object.assign({},e),a=0,i=t;a<i.length;a++){var u=i[a];u in o&&delete o[u]}return o},removeBy:j,merge:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r){for(var n={},o=new Map,a=0,i=r;a<i.length;a++)for(var u=i[a],l=0,f=Object.entries(u);l<f.length;l++){var h=c(f[l],2),s=h[0],m=h[1];o.has(s)||(o.set(s,m),n[s]=m)}return n}},replace:Y,isObject:w,isObjectValues:function(e){return!!Object.values(e).filter((function(e){return""!==e&&0!==e&&e!=={}&&e!==[]})).join("")},invert:function(e){if(!w(e))throw new Error("You have to input object only here");var r=Object.keys(e),t=Object.values(e);return P(t,r)[0]},clone:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<1)throw new Error("In this argument must have at least one argument and please provide it in object type");return Object.assign.apply(Object,[{}].concat(r))}}),R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Z=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|T|H{1,2}|h{1,2}|a|A|i{1,2}|s{1,2}|Z{1,2}|SSS/g,G=function(e){return"number"==typeof e||"string"==typeof e},q=function(e){return"number"==typeof e||"string"==typeof e},W=function(e){return"number"==typeof e||"string"==typeof e},J=function(e){return!!("object"===i(new Date(e))&&null!==e||"string"==typeof e&&new RegExp(R).test(e))},K=function(e){return!("string"!=typeof e||!new RegExp(Z).test(e))},$=function(e){return e%400==0||e%100!=0&&e%4==0},V="Year must be in a number or a string type, the length of year either 4 or 2",Q="Month must be in a number or a string type, the month number start from 1 to 12",X="Date must be in a number or a string type, the date number start from 1 to 31",ee="Full date must be in string or array type",re=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t=[],n=4;n<=10;n++){var o=new Date(Date.UTC(2021,3,n));t.push(new Intl.DateTimeFormat(e,{weekday:r}).format(o))}return t},te=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);var t=[28,29,30,31],n=new Date(Date.UTC(Number(e),Number(r),0)).getUTCDate();return t.includes(n)?n:31},ne=function(e){if(!G(e))throw new Error(V);return $(e)?366:365},oe=function(e,r){if(!J(e))throw new Error("Error in the first argument: "+ee);if(!J(r))throw new Error("Error in the second argument: "+ee);var t=new Date(e),n=new Date(r);return(Number(n.getTime())-Number(t.getTime()))/864e5},ae=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t=[],n=0;n<=11;n++){var o=Date.UTC(2021,n);t.push(new Intl.DateTimeFormat(e,{month:r}).format(new Date(o)))}return t},ie=function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!J(e))throw new Error('You\'re entering the wrong date string, please use this statement "new Date(\'yourdateParam\').toString()" instead or array "[year, monthIndex, dateNumber]"');if(!K(r))throw new Error("Please enter the correct date format");var o,a=new Date(e),i=r,u=r,l={YY:function(){var e=a.getFullYear().toString().slice(-2),r=a.getFullYear();return"00"!==e&&(r=Number(e)),r},YYYY:a.getFullYear(),M:Number(a.getMonth())+1,MM:function(){var e=Number(Number(a.getMonth())+1).toString();return 1===e.length?"0"+e:e},m:ae(t,n)[a.getMonth()].slice(0,3),mm:ae(t,n)[a.getMonth()],D:a.getDate,DD:function(){var e=a.getDate().toString(),r=e;1===e.length&&(r="0"+e);return r},d:re(t,n)[a.getDay()].slice(0,3),dd:re(t,n)[a.getDay()],H:a.getHours(),HH:function(){var e=a.getHours().toString();return 1===e.length?"0"+e:e},h:function(){var e=Number(a.getHours()+1),r=e;return e>12&&(r=e-(e-1)),r},hh:function(){var e=Number(a.getHours()+1),r=e;e>12&&(r=e-(e-1));var t=r.toString();return 1===t.length?"0"+t:t},k:function(){return 0===Number(a.getHours())?24:a.getHours()},kk:function(){var e=Number(a.getHours()).toString();if(1===e.length){var r="0"+e;return 0===Number(r)?24:r}return 0===Number(e)?24:e},i:a.getMinutes(),ii:function(){var e=a.getMinutes().toString();return 1===e.length?"0"+e:e},s:a.getSeconds(),ss:function(){var e=a.getSeconds().toString();return 1===e.length?"0"+e:e},uuu:a.getMilliseconds(),A:a.getHours()<12?"AM":"PM",a:a.getHours()<12?"am":"pm",Do:a.getDate().toString()+"st"},f=i.split(/-|\/|\.|:|\s/),h=v(f);try{for(h.s();!(o=h.n()).done;){var c=o.value;"YY"===c?u=u.replace(c,l.YY()):"YYYY"===c?u=u.replace(c,l.YYYY):"M"===c?u=u.replace(c,l.M):"MM"===c?u=u.replace(c,l.MM()):"m"===c?u=u.replace(c,l.m):"mm"===c?u=u.replace(c,l.mm):"D"===c?u=u.replace(c,l.D):"DD"===c?u=u.replace(c,l.DD()):"d"===c?u=u.replace(c,l.d):"dd"===c?u=u.replace(c,l.dd):"H"===c?u=u.replace(c,l.H):"HH"===c?u=u.replace(c,l.HH()):"h"===c?u=u.replace(c,l.h()):"hh"===c?u=u.replace(c,l.hh()):"k"===c?u=u.replace(c,l.k()):"kk"===c?u=u.replace(c,l.kk()):"i"===c?u=u.replace(c,l.i):"ii"===c?u=u.replace(c,l.ii()):"s"===c?u=u.replace(c,l.s):"ss"===c?u=u.replace(c,l.ss()):"uuu"===c?u=u.replace(c,l.uuu):"A"===c?u=u.replace(c,l.A):"a"===c?u=u.replace(c,l.a):"Do"===c&&(u=u.replace(c,l.Do))}}catch(e){h.e(e)}finally{h.f()}return u},ue=function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!J(e))throw new Error("On the first argument, you have to input only the correct date");if(!K(r))throw new Error("For format date, you must always input the correct one by using characters like these: Y, M, m, D, d, H, h, k, i, S, s, A, a or Do");var o=e.split(/-|\/|\.|T|Z|:|\s/).filter((function(e){return e.length>=1&&" "!==e})).map((function(e){return e.trim()})),a=r.split(/-|\/|\.|T|Z|:|\s/).filter((function(e){return e.length>=1&&" "!==e})).map((function(e){return e.trim()})),i={year:(new Date).getFullYear(),month:Number((new Date).getMonth())+1,day:(new Date).getDate(),hour:(new Date).getHours(),minute:(new Date).getMinutes(),second:(new Date).getSeconds(),millisecond:(new Date).getMilliseconds()};if(o.length!==a.length)throw new Error("The numbers and the formats must be in place, so when we check the length of both of these arguments then the result will be the same");for(var u=0;u<o.length;u++)4===o[u].length&&!1===isNaN(o[u])&&"YYYY"===a[u]||2===o[u].length&&!1===isNaN(o[u])&&"YY"===a[u]?i.year=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"M"===a[u]||"MM"===a[u]?i.month=Number(o[u])-1:3===o[u].length&&ae(t,n).map((function(e){return e.slice(0,3)})).includes(o[u])&&"m"===a[u]?i.month=ae(t,n).map((function(e){return e.slice(0,3)})).findIndex(o[u]):o[u].length>=3&&ae(t,n).includes(o[u])&&"mm"===a[u]?i.month=ae(t,n).findIndex(o[u]):1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"D"===a[u]||"DD"===a[u]?i.day=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"H"===a[u]||"HH"===a[u]?i.hour=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"h"===a[u]||"hh"===a[u]?i.hour=o[u]>12?Number(o[u])-(Number(o[u])-1):o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"k"===a[u]||"kk"===a[u]?i.hour=24===Number(o[u])?0:o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"i"===a[u]||"ii"===a[u]?i.minute=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"s"===a[u]||"ss"===a[u]?i.second=o[u]:o[u].length>=3&&!1===isNaN(o[u])&&"uuu"===a[u]?i.millisecond=o[u]:("st"===o[u].slice(-2)||"nd"===o[u].slice(-2)||"th"===o[u].slice(-2)&&"Do"===a[u])&&(i.second=Number(o[u].slice(0,-2)));return new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond).toString()},le=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!J(e))throw new Error("Please enter a date in correct way, either in string or array type");if(!t(r))throw new Error("Only accept number type on second argument");var o=new Date(e),a=Number(o.getDate())+Number(r),i=Number(te(Number(o.getFullYear()),o.getMonth()+1));if(a>i){var u=a-i;o=11===Number(o.getMonth())?new Date(Number(o.getFullYear())+1,0,u):new Date(Number(o.getFullYear()),Number(o.getMonth())+1,u)}else o=new Date(Number(o.getFullYear()),Number(o.getMonth()),a);var l=null!==n&&!1!==K(n)?ie(o,n):o;return l},fe=function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!J(n))throw new Error("Error in the first argument: "+ee);if(!J(o))throw new Error("Error in the second argument: "+ee);for(var n=new Date(e),o=new Date(r),a=[],i=n;i<=o;){var u=null!==t&&!1!==K(t)?ie(i,t):i;a.push(u),i=le(i,1)}return a},he=function(e,r,t){if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);if(!W(t))throw new Error(X);var n=oe(new Date(Number(e),0,1),new Date(Number(e),Number(r)-1,Number(t))),o=Number(new Date(e,0,1).getDay()),a=0;o>0&&(a=6-(o-1));var i=Number(new Date(Number(e),Number(r)-1,Number(t)).getDay()),u=0;return i<6&&(u=6-i),Math.ceil((Number(n)+u-a)/7)},ce=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(e))throw new Error(V);if(!t(r))throw new Error("You have to enter a number");if(!K(n))throw new Error("Please enter a format of date correctly");var o=Number(new Date(Number(e),0,1).getDay()),a=0;o>0&&(a=6-(o-1));for(var i=[],u=a+1,l=0,f=e,h=1;h<=Number(r);h++){if(h===Number(r)){i.push(ie(new Date(f,l,u),n));for(var c=0;c<6;)c++,i.push(ie(le(new Date(f,l,u),c),n))}u+=7,l<12&&u>Number(te(e,l+1))&&(u-=Number(te(e,l+1)),11!==l?l+=1:(l=1,f+=1))}return i},se=function(e,r){if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);for(var t=me(e,52,"M"),n=[],o=0,a=Object.entries(t);o<a.length;o++){var i=c(a[o],2),u=i[0];i[1].includes(r.toString())&&n.push(u)}return 1===Number(r)?n.filter((function(e){return"52"!==e})):n},me=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(e))throw new Error(V);if(!t(r))throw new Error("You have to enter a number");if(!K(n))throw new Error("Please enter a format of date correctly");var o=Number(new Date(Number(e),0,1).getDay()),a=0;o>0&&(a=6-(o-1));for(var i={},u=a+1,l=0,f=e,h=1;h<=r;h++)i[h.toString()]=[ie(new Date(f,l,u),n),ie(le(new Date(f,l,u),6),n)],u+=7,l<12&&u>Number(te(e,l+1))&&(u-=Number(te(e,l+1)),11!==l?l+=1:(l=1,f+=1));return i},ge=Object.freeze({__proto__:null,now:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=(new Date).toString();return"string"==typeof e&&(r=ie(r,e)),r},nowHijri:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",r=Date.UTC(Number((new Date).getFullYear()),Number((new Date).getMonth()),Number((new Date).getDate()),Number((new Date).getHours()),Number((new Date).getMinutes()),Number((new Date).getSeconds()),Number((new Date).getMilliseconds())),t=new Intl.DateTimeFormat(e,{calendar:"islamic",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h24"}).format(new Date(r));return t},parse:ue,parseDate:ue,utc:function(){return new Date(Date.UTC.apply(Date,arguments))},addDate:le,subtractDate:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!J(e))throw new Error("Please enter a date in correct way, either in string or array type");if(!t(r))throw new Error("Only accept number type on second argument");var o=new Date(e),a=Number(o.getDate())-Number(r),i=Number(te(Number(o.getFullYear()),o.getMonth()));if(a<1){var u=i+(a-1);o=0===Number(o.getMonth())?new Date(Number(o.getFullYear())-1,0,u):new Date(Number(o.getFullYear()),Number(o.getMonth())+1,u)}else o=new Date(Number(o.getFullYear()),Number(o.getMonth()),a);var l=null!==n&&!1!==K(n)?ie(o,n):o;return l},rangeDate:fe,day:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"en-US",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"long";if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);if(!W(t))throw new Error(X);var a=new Date(Date.UTC(Number(e),Number(r)-1,Number(t)));return new Intl.DateTimeFormat(n,{weekday:o}).format(a)},days:re,daysInMonth:te,daysInYear:ne,daysInBetween:oe,week:he,weeks:ce,weeksInMonth:se,weeksInYear:function(e){if(!G(e))throw new Error(V);var r=Number(new Date(Number(e),0,1).getDay()),t=0;r>0&&(t=6-(r-1));var n=Number(new Date(Number(e),11,31).getDay()),o=0;return n<6&&(o=6-n),Math.ceil((Number(ne(e))+o-t)/7)},month:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);var o=Date.UTC(e,Number(r)-1);return new Intl.DateTimeFormat(t,{month:n}).format(new Date(o))},months:ae,isYear:G,isMonth:q,isDate:W,isFullDate:J,isFormatDate:K,isLeapYear:$,calendar:function(e,r){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);if(!K(n))throw new Error("Please enter a format of date correctly");var a=re(o),i=fe(new Date(e,Number(r)-1,1),new Date(e,Number(r)-1,te(e,r)),n),u=Number(new Date(e,Number(r)-1,1).getDay()),l=[];if(u>0){var f=u-1;l=fe(new Date(e,Number(r)-2,Number(te(e,Number(r)-1))-f),new Date(e,Number(r)-2,te(e,Number(r)-1)),n)}var h=Number(new Date(e,Number(r)-1,te(e,r)).getDay()),c=[];if(h<6){var s=6-(h+1);c=fe(new Date(e,Number(r),1),new Date(e,Number(r),1+s),n)}var m=[a,l,i,c];return!0===t?m.flat():m},daysInCalendar:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);if(!K(t))throw new Error("Please enter a format of date correctly");return fe(new Date(e,Number(r)-1,1),new Date(e,Number(r)-1,te(e,r)),t)},prevDaysInCalendar:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);if(!K(t))throw new Error("Please enter a format of date correctly");var n=Number(new Date(e,Number(r)-1,1).getDay()),o=[];if(n>0){var a=n-1;o=fe(new Date(e,Number(r)-2,Number(te(e,Number(r)-1))-a),new Date(e,Number(r)-2,te(e,Number(r)-1)),t)}return o},nextDaysInCalendar:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);if(!K(t))throw new Error("Please enter a format of date correctly");var n=Number(new Date(e,Number(r)-1,te(e,r)).getDay()),o=[];if(n<6){var a=6-(n+1);o=fe(new Date(e,Number(r),1),new Date(e,Number(r),1+a),t)}return o},weeklyCalendar:function(e,r,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);if(!W(t))throw new Error(X);if(!K(n))throw new Error("Please enter a format of date correctly");var a=re(o),i=he(e,r,t),u=ce(e,i,n);return P(a,u)[0]},calendarWithWeeks:function(e,r){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!G(e))throw new Error(V);if(!q(r))throw new Error(Q);if(!K(n))throw new Error("Please enter a format of date correctly");var a=re(o),i=se(e,r),u=[];0!==Number(new Date(e,Number(r)-1,1).getDay())&&1===Number(r)&&(u.push("52"),u.push(ce(Number(e)-1,52,n)));var l,f=v(i);try{for(f.s();!(l=f.n()).done;){var h=l.value;u.push(h),u.push(ce(e,h,n))}}catch(e){f.e(e)}finally{f.f()}var c=["Week",a].concat(u);return!0===t?c.flat():c},dateToArray:function(e){if(!J(e))throw new Error("Please enter a valid date");return new Date(e).toJSON().replace("Z","").split(/-|:|\s|\.|T/g)}}),ve=Object.freeze({__proto__:null,size:function(e,r){if(0===e)return"0 Bytes";var t=r||1,n=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,n)).toFixed(t))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][n]},name:function(e){if("string"==typeof e)return e.indexOf("",41)>40?e.slice(0,41)+"...":e},type:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type",t=e.split("/");return"format"==r?t.shift():t.pop(),t.join("")},image:function(e){if("name"in e&&"string"==typeof e.name)return URL.createObjectURL(e)},date:function(e){return new Date(e).toDateString()},loadImage:function(e){"name"in e&&"string"==typeof e.name&&URL.revokeObjectURL(e)},formatSize:function(e){for(var r=0,t=e,n=t.length,o=0;o<n;o++)r+=t[o].size;for(var a=r+" bytes",i=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],u=0,l=r/1024;l>1;l/=1024,u++)a=l.toFixed(3)+" "+i[u]+" ("+r+" bytes)";return a},humanSize:function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=r?1e3:1024;if(Math.abs(e)<n)return e+" B";var o=r?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=-1,i=Math.pow(10,t);do{e/=n,++a}while(Math.round(Math.abs(e)*i)/i>=n&&a<o.length-1);return e.toFixed(t)+" "+o[a]},exported:function(e,r){if("object"===i(e)&&"string"==typeof r){var t=Array.from(e),n="";if("json"===r.toLowerCase())n="data:application/json;charset=utf-8,"+JSON.stringify(t,null,2);else if("csv"===r.toLowerCase()){var o,a="",u=v(t);try{for(u.s();!(o=u.n()).done;){var l=o.value;for(var f in l)a+=l[f]+",";a=a.trim().substring(0,a.length-1),a+="\n"}}catch(e){u.e(e)}finally{u.f()}n="data:text/csv;charset=utf-8,"+(a=a.trim().substring(0,a.length-1))}else if("sql"===r.toLowerCase()){var h="INSERT INTO `export_table` (";for(var c in t[0])h+="`"+c+"`,";h=h.trim().substring(0,h.length-1),h+=") VALUES ";var s,m=v(t);try{for(m.s();!(s=m.n()).done;){var g=s.value;for(var w in h+="(",g)h+="`"+g[w]+"`,";h=h.trim().substring(0,h.length-1),h+="),"}}catch(e){m.e(e)}finally{m.f()}h=h.trim().substring(0,h.length-1),n="data:application/sql;charset=utf-8,"+(h+=";")}else if("xml"===r.toLowerCase()){var d='<?xml version="1.0" encoding="UTF-8"?>\n<data>';for(var y in t){for(var b in d+="\n <entry>",y)d+="\n <"+b+"`>"+y[b]+"</"+b+"`>";d+="\n </entry>"}n="data:application/xml;charset=utf-8,"+(d+="\n</data>")}else if("vhs"===r.toLowerCase()){var p,N='//visit official site: http://vhs-file-format.glitch.me \n("data", [',E=v(t);try{for(E.s();!(p=E.n()).done;){var D=p.value;for(var A in N+='\n ("entry", [',D)N+='\n ("'+A+'", ',N+=D[A]+"),";N=N.trim().substring(0,N.length-1),N+="]),"}}catch(e){E.e(e)}finally{E.f()}N=N.trim().substring(0,N.length-1),n="data:application/vhs;charset=utf-8,"+(N="])")}return n}},download:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"txt",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"export-to";if("string"==typeof e){var n=t+"."+r.toLowerCase(),o=encodeURI(e),a=document.createElement("a");a.href=o,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a)}},printed:function(e){if("object"===i(e)){var r=Array.from(e),t=document.createElement("table"),n=document.createElement("thead"),o=document.createElement("tbody");t.appendChild(n),t.appendChild(o);var a=document.createElement("tr");for(var u in r[0]){var l=document.createElement("th");l.textContent=u.replace(/^\w/,(function(e){return e.toUpperCase()})),a.appendChild(l)}n.appendChild(a);for(var f=0,h=r;f<h.length;f++){var c=h[f],s=document.createElement("tr");for(var m in c){var g=document.createElement("td");g.textContent=c[m],s.appendChild(g)}o.appendChild(s)}var v=window.open();v.document.body.appendChild(t),v.focus(),v.print()}}}),we=function(e,r,t){var n;if(t){var o=new Date;o.setTime(o.getTime()+24*t*60*60*1e3),n="expires="+o.toGMTString()}else n="";document.cookie=e+"="+r+"; SameSite=Lax;"+n+"; path=/"},de=function(e){for(var r=e+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var o=t[n];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return o.substring(r.length,o.length)}return null},ye=function(e){return"object"===("undefined"==typeof window?"undefined":i(window))&&"".concat(e,"Storage")in window},be=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(ye(r))return!!window["".concat(r,"Storage")].getItem(e)},pe=Object.freeze({__proto__:null,setCookie:we,getCookie:de,hasCookie:function(e){return!!de(e)},removeCookie:function(e){we(e,"",-1)},clearCookie:function(){for(var e=document.cookie.split(";"),r=0;r<e.length;r++){var t=e[r],n=t.indexOf("="),o=n>-1?t.substr(0,n):t;document.cookie=o+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}},isStorage:ye,isCookie:function(){return"object"===("undefined"==typeof document?"undefined":i(document))&&"cookie"in document},setStorage:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local";ye(t)&&window["".concat(t,"Storage")].setItem(e,r)},getStorage:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(ye(r))return window["".concat(r,"Storage")].getItem(e)},hasStorage:be,removeStorage:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";ye(r)&&be(e,r)&&window["".concat(r,"Storage")].removeItem(e)},clearStorage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"local";ye(e)&&window["".concat(e,"Storage")].clear()}}),Ne=Object.freeze({__proto__:null,ternary:function(e,r,t){if(!T(e)&&!T(r)&&!T(t))throw new Error("All arguments here only accept value in function");return e()?r():t()}});e.array=F,e.char=y,e.date=ge,e.file=ve,e.func=Ne,e.int=r,e.number=d,e.object=z,e.storage=pe,e.string=b,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).$={})}(this,(function(e){"use strict";var r=Object.freeze({__proto__:null,random:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:255,r=Number(e)+1;return Math.floor(Math.random()*r)}}),t=function(e){return!isNaN(e)&&"number"==typeof Number(e)},n=function(e){if("number"!=typeof e&&"string"!=typeof e)throw new Error("You must input only number format here");return 1===Math.sign(e)},o=function(e){if("number"!=typeof e&&"string"!=typeof e)throw new Error("You must input only number format here");return-1===Math.sign(e)},a=function(e){return"string"==typeof e};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){u(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function h(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return t}(e,r)||s(e,r)||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(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(e)||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 s(e,r){if(e){if("string"==typeof e)return m(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,r):void 0}}function m(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function g(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=s(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(u)throw a}}}}var w=function(e){return"object"===i(e)&&null!==e&&"[object Object]"===Object.prototype.toString.call(e)},d=Object.freeze({__proto__:null,random:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if("number"!=typeof e&&e<=0)throw new Error("You have to add a number at least 1");for(var r="",t="0123456789",n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*t.length));return r},loop:function(e,r){if("number"!=typeof e&e<=-1)throw new Error("Only accept number here, start from 0");if("number"!=typeof r&r<=0)throw new Error("Only accept number here, start from 1");for(var t=[];e<=r;)t.push(e++);return t},isNumber:t,isPositive:n,isNegative:o,calc:function(e,r,n){if(!t(e))throw new Error("This is left operand and must be in number type");if(!t(r))throw new Error("This is left operand and must be in number type");if(!a(n))throw new Error("Operator must be one of these: add, subtract, multiply, divide, reminder or exponent");var o=0;return"add"===n||"addition"===n||"plus"===n||"+"===n?o=Number(e)+Number(r):"subtract"===n||"subtraction"===n||"minus"===n||"-"===n?o=Number(e)-Number(r):"multiply"===n||"multiplication"===n||"×"===n||"*"===n?o=Number(e)*Number(r):"divide"===n||"division"===n||"÷"===n||"/"===n?o=Number(e)/Number(r):"remainder"===n||"modulo"===n||"%"===n?o=Number(e)%Number(r):"exponent"!==n&&"exponentiation"!==n&&"**"!==n||(o=Math.pow(Number(e),Number(r))),o},currency:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!t(e))throw new Error("Amount must be in a number type");if(!a(r)&&3===r.length)throw new Error("Currency code must have at least 3 uppercase character");if(!a(n))throw new Error("Locale code must contain 2 languages and 2 country code and separated by dash (-)");if(!w(o))throw new Error("Currency options must be in object type");return new Intl.NumberFormat(n,f({style:"currency",currency:r.toUpperCase()},o)).format(e)}}),v=Object.freeze({__proto__:null,random:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_~!@#$%^&*()+={}[]|:;<>,./?";"short"===r||"alphadash"===r?n=n.slice(0,64):"narrow"===r||"alphanumeric"===r?n=n.slice(0,62):"alpha"===r?n=n.slice(10,62):"hex"===r?n=n.slice(0,16):"number"!==r&&"numeric"!==r||(n=n.slice(0,10));for(var o=0;o<e;o++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}}),y=Object.freeze({__proto__:null,split:function(e){return function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];return"string"==typeof e&&(r>=1&&n.push(e.slice(0,r)),null!==t?(n.push(e.slice(r,t)),n.push(e.slice(t))):n.push(e.slice(r))),n}},capitalize:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"single";if("string"==typeof e){var t=e;return t="multiple"===r?t.toLowerCase().replace(/\w\S*/g,(function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})):t.trimStart().replace(/^\w/,(function(e){return e.toUpperCase()}))}},includes:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return-1!==e.indexOf(r,t)},isString:a}),p=function(e){return!("object"!==i(e)||null===e||!Array.isArray(e))},b=function(e){if(!p(e))throw new Error("On the first argument must be in array type");for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("On the next arguments, you have to provide at least one argument");var o=Array.from(e);return o.unshift.apply(o,t),o},N=function(e){if(!p(e))throw new Error("On the first argument must be in array type");for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("On the next arguments, you have to provide at least one argument");var o=Array.from(e);return o.push.apply(o,t),o},E=function(e,r){if(!p(e))throw new Error("On the first argument, here only accept array type");if(!t(r))throw new Error("On the second argument, accept only numeric or number type");for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];if(o.length<1)throw new Error("On the next arguments, you have to enter at least one value");var i=Array.from(e),u=isNaN(r)?1:r;return i.splice.apply(i,[Number(u)-1,0].concat(o)),i},D=function(e,r){if(!p(e))throw new Error("On the first argument, here only accept array type");if(!t(r))throw new Error("On the second argument, accept only numeric or number type");for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];if(o.length<1)throw new Error("On the next arguments, you have to enter at least one value");var i=Array.from(e),u=isNaN(r)?0:r;return i.splice.apply(i,[Number(u)+1,0].concat(o)),i},A=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{key:"id",value:0};if(!p(e))throw new Error("You must enter the first argument in array only");var t=Array.from(e),n=-1;return"key"in r&&"value"in r?n=t.length>=1?t.findIndex((function(e){return e[r.key]===r.value})):-1:t.length>=1&&(n=t.findIndex((function(e){for(var t=0,n=Object.entries(r);t<n.length;t++){var o=h(n[t],2),a=o[0],i=o[1];if(a in e&&e[a]===i)return!0}}))),n},Y=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dense";if(!p(e))throw new Error("You must enter the first argument in array only");return"sparse"===r?Object.keys(e).map((function(e){return Number(e)})):c(e.keys())},O=function(e){if(!p(e))throw new Error("You must enter the argument in array only");var r=Y(e);return Number(r[Math.floor(Math.random()*r.length)])},S=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r){for(var n={},o=0,a=r;o<a.length;o++)for(var i=a[o],u=0,l=Object.entries(i);u<l.length;u++){var f=h(l[u],2),c=f[0],s=f[1];n[c]=s}return n}},j=function(e){if(!p(e))throw new Error("Please provide array that you want to remove its element");for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("On the last of argument, you have to enter at least one argument");for(var o=Array.from(e),a=[],u=function(){var e=f[l];if("string"==typeof e&&"first"===e)o=o.map((function(e,r){return 0===r?null:e})),a=o;else if("string"==typeof e&&"last"===e)o=o.map((function(e,r){return r===o.length-1?null:e})),a=o;else if("number"==typeof e)o=o.map((function(r,t){return t===e?null:r})),a=o;else if("object"===i(e)&&null!==e){var r=A(o,e);o=o.map((function(e,t){return t===r?null:e})),a=o}},l=0,f=t;l<f.length;l++)u();return a.filter((function(e){return null!==e}))},M=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!p(e))throw new Error("");var t=Array.from(e),n=[];if("string"==typeof r){var o,a=new Set,i=g(t);try{for(i.s();!(o=i.n()).done;){var u=o.value;a.has(u[r])||a.add(u[r])}}catch(e){i.e(e)}finally{i.f()}n=c(a)}else n=Array.from(new Set(t));return n},T=function(e){if(!w(e))throw new Error("This is object helper, you must provide the first argument in an object");for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("The next arguments must be in a string or in a number and at least one argument");for(var o={},a=new Set(t),i=0,u=Object.entries(e);i<u.length;i++){var l=h(u[i],1),f=l[0];a.has(e[f])||(o[f]=e[f])}return o},x=function(e,r){if(!p(e))throw new Error("The first argument must be in array of objects");if(!w(r))throw new Error("The second argument must be in object type and must have at least one property");for(var n=Array.from(e),o=function(){var e=h(u[i],2),r=e[0],o=e[1],l=n.filter((function(e){if(r in e){if(t(e[r])&&Number(e[r])===Number(o))return!0;if(a(e[r])&&e[r].toLowerCase().includes(o.toLowerCase()))return!0}return!1}));n=l},i=0,u=Object.entries(T(r,"",0));i<u.length;i++)o();return n},C=function(e){return"function"==typeof e},k=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";if(!p(e))throw new Error("Only array of objects accepted");if(!a(r))throw new Error("The second argument must be in a string and a value must be object property key or name");if(!a(n))throw new Error('The third argument must be in a string and a value either "", "asc" or "desc"');var o=Array.from(e);return"asc"===n?o.sort((function(e,n){if(r in e&&r in n){if(t(e[r])&&t(n[r]))return Number(e[r])-Number(n[r]);if(a(e[r])&&a(n[r])){var o=e[r].toLowerCase(),i=n[r].toLowerCase(),u=0;return o<i?u=-1:o>i&&(u=1),u}}})):"desc"===n&&o.sort((function(e,n){if(r in e&&r in n){if(t(e[r])&&t(n[r]))return Number(n[r])-Number(e[r]);if(a(e[r])&&a(n[r])){var o=e[r].toLowerCase(),i=n[r].toLowerCase(),u=0;return i<o?u=-1:i>o&&(u=1),u}}})),o},_=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!p(e))throw new Error("On the first argument, here only accept array");if(!t(r))throw new Error("This is the page active number, please enter number only");if(!t(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var o=Array.from(e),a=Number(n)*Number(r)-(Number(n)-1),i=Number(n)*Number(r);return{from:a,to:i<=o.length?i:o.length,of:o.length}},B=function(e){if(!p(e))throw new Error("This argument only accept array");var r,t={},n=new Set,o=g(new Set(e));try{var a=function(){var o=r.value,a=Array.from(e).filter((function(e){return e===o}));n.has(a.length)||(n.add(a.length),t[a.length]=[]),a.forEach((function(e){t[a.length].push(e)}))};for(o.s();!(r=o.n()).done;)a()}catch(e){o.e(e)}finally{o.f()}return t},I=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(!r&&r.length<=1)throw new Error("You have to provide here at least 2 arguments");var n=[],o={};r.forEach((function(e,r){if(p(e)?o[r]=new Set(e):o[r]=(new Set).add(e),0!==r){var t,a=g(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;o[r-1].has(i)&&n.push(i)}}catch(e){a.e(e)}finally{a.f()}}}));var a=B(n);return Array.from(new Set(a[r.length-1]))},P=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(!p(e)&&e.length<=0)throw new Error("You need to provide more values to your array");if(!t&&t.length<=0)throw new Error("You have to provide here at least 1 value");var o,a=[],i=g(e);try{for(i.s();!(o=i.n()).done;){var u=o.value;t.flat().includes(u)||a.push(u)}}catch(e){i.e(e)}finally{i.f()}return a},L=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2&&!p(r[0])&&!p(r[1])&&Number(r[0].length)!==Number(r[1].length))throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(r[0]).map((function(e){return[]})),o=0,a=r;o<a.length;o++){var i=a[o];i.forEach((function(e,r){r in n&&n[r].push(e)}))}return n},U=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(r),o=[],a=n.shift(),i=function(){var e=l[u],r=new Map;e.forEach((function(e,t){a[t]&&r.set(a[t],e)})),o.push(Object.fromEntries(r))},u=0,l=n;u<l.length;u++)i();return o},F=function(){if(0===arguments.length||arguments.length>=4)throw new Error("Here only accept 3 arguments, so you have to provide at least 1 argument");var e=1===arguments.length?0:Number(arguments.length<=0?void 0:arguments[0]),r=Number(arguments.length>=2?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0]),t=3===arguments.length?Number(arguments.length<=2?void 0:arguments[2]):1;arguments.length<3&&o(r)&&(t=-1);var a=[],i=0,u=0;if(o(e)&&n(r)?i=e-1:n(e)&&o(r)?i=e+1:n(e)&&n(r)?i=e-1:o(e)&&o(r)&&(i=e+1),i<r){for(;i<r;)i++,t>1?(u+=t)<r&&a.push(u):i<r&&a.push(i);0!==e||a.includes(0)||a.unshift(0)}else if(i>r){for(;i>r;)i--,t<-1?(u-=t)>r&&a.unshift(u):i>r&&a.unshift(i);0!==e||a.includes(0)||a.push(0)}return 1===a.length&&0===a[0]?[]:a},H=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(0===r.length)throw new Error("Accept index of array elements only and you add at least one index in number");return function(e){if(!p(e))throw new Error("Please enter array only here");for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(0===n.length&&n.length!==r.length&&0!==I(r,n).length)throw new Error("Only accept index of array elements and the number of the first indexes must be the same as the second indexes and also, both indexes must be different");for(var a=Array.from(e),i=Array.from(e),u=0;u<r.length;u++)void 0!==r[u]&&void 0!==n[u]&&(i.splice(r[u],1,a[n[u]]),i.splice(n[u],1,a[r[u]]));return i}},z=function(e,r,t){if(!p(e))throw new Error("On the first argument, you have to provide array only");if(!a(r))throw new Error("New property must be in string type");if(!C(t))throw new Error("Callback must be in function or method");return Array.from(e).map((function(e){return e[r]=t.apply(void 0,c(Object.values(e).filter((function(e){return!1===isNaN(e)})))),e}))},R=Object.freeze({__proto__:null,insert:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{position:null,index:null};if(!p(e))throw new Error("On the first argument, only array accept here");if(!w(r))throw new Error("On the second argument, only object with 2 properties (position and index property) accepted");for(var t=arguments.length,n=new Array(t>2?t-2:0),o=2;o<t;o++)n[o-2]=arguments[o];if(n.length<1)throw new Error("On the third or the next arguments, you have to enter at least one argument");var a=[];return"first"===r.position?a=b.apply(void 0,[e].concat(n)):"last"===r.position?a=N.apply(void 0,[e].concat(n)):"before"===r.position?a=E.apply(void 0,[e,r.index].concat(n)):"after"===r.position&&(a=D.apply(void 0,[e,r.index].concat(n))),a},insertFirst:b,insertLast:N,insertBefore:E,insertAfter:D,update:function(e,r,n){if(!p(e))throw new Error("You have to enter array only on the first argument");if(!w(r))throw new Error("You must enter object only here on the second argument");if(!w(n)&&!t(n))throw new Error("You must enter object only on the second argument");var o=Array.from(e),a=w(n)?A(o,n):Number(n);return o.map((function(e,t){var n=e;return t===a&&(n=S(e,r)),n}))},updateBy:function(e,r,t){if(!p(e))throw new Error("You have to enter array only on the first argument");if(!w(r))throw new Error("You must enter object only here on the second argument");if(!p(t))throw new Error("You must enter array of objects or numbers on the second argument");var n=Array.from(e);return n.map((function(e,o){var a,i=e,u=g(t);try{for(u.s();!(a=u.n()).done;){var l=a.value;o===(w(l)?A(n,l):Number(l))&&(i=S(e,r))}}catch(e){u.e(e)}finally{u.f()}return i}))},destroy:j,select:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(!p(e))throw new Error("On the first argument, you have to provide array only");if(t.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(e);return o.map((function(e){var r,n={},o=g(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;a in e&&(n[a]=e[a])}}catch(e){o.e(e)}finally{o.f()}return n}))},hidden:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(!p(e))throw new Error("On the first argument, you have to provide array only");if(t.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(e);return o.map((function(e){var r,n=e,o=g(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;a in e&&delete n[a]}}catch(e){o.e(e)}finally{o.f()}return n}))},toggle:function(e){return function(r){var t=Array.from(r);if(t.includes(e)){var n=t.findIndex((function(r){return r===e}));t.splice(n,1)}else t.push(e);return t}},flatten:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],n={};n.id=r.id||"id",n.parent=r.parent||"parent",n.children=r.children||"children";var o=function(){Array.from(e).forEach((function(e){if("object"===i(e)&&null!==e){var r=e;r[n.parent]="0","object"===i(r[n.children])&&Array.isArray(r[n.children])&&(a(r[n.children],e),delete r[n.children]),t.push(r)}}))},a=function e(r,o){r.length>=1&&Array.from(r).forEach((function(r){if("object"===i(r)&&null!==r){var a=r;a[n.parent]=o[n.id],"object"===i(a[n.children])&&Array.isArray(a[n.children])&&(e(a[n.children],r),delete a[n.children]),t.push(a)}}))};return o(),t},nested:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],n=Array.from(e),o={};o.id=r.id||"id",o.parent=r.parent||"parent",o.children=r.children||"children";var a=function(e){e.forEach((function(e){if("object"===i(e)&&null!==e){var r=null;("string"==typeof e[o.parent]&&"0"===e[o.parent]||"number"==typeof e[o.parent]&&0===e[o.parent])&&(r=u(e)),null!==r&&t.push(r)}}))},u=function(e){var r=e;return void 0!==e[o.children]&&null!==e[o.children]||(r[o.children]=l(e[o.id]),r[o.children].length<=0&&delete r[o.children]),delete r[o.parent],r},l=function(e){var r=[];return f(e).length>=1&&f(e).forEach((function(e){r.push(u(e))})),r},f=function(e){return n.filter((function(r){return r.parent===e}))};return a(n),t},index:A,toIndex:Y,randomIndex:O,search:function(e){if(!p)throw new Error("The first argument must be in array");for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];if(n.length<1)throw new Error("On the next arguments, you must provide at least one argument in either string or number");for(var i=[],u=function(){var r=f[l],n=Array.from(e).filter((function(e){if(t(e)&&Number(e)===Number(r))return!0;if(a(e)&&e.toLowerCase().includes(r.toLowerCase()))return!0;if(w(e))for(var n=0,o=Object.entries(e);n<o.length;n++){var i=h(o[n],2),u=i[0],l=i[1];if(t(e[u])&&Number(l)===Number(r))return!0;if(a(e[u])&&l.toLowerCase().includes(r.toLowerCase()))return!0}return!1}));i=M(i.concat(n))},l=0,f=n;l<f.length;l++)u();return i},searchBy:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length<1)throw new Error("This argument must have at least one argument in either string or number");return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(!p(e))throw new Error("Array of objects is needed in order to be searched");if(o.length<1)throw new Error("The last argument required at least one argument in either string or number");var u,l=[],f=g(r);try{var h=function(){var r=u.value,n=Array.from(e).filter((function(e){for(var n=0,i=Array.from(o);n<i.length;n++){var u=i[n];if(u in e){if(t(e[u])&&Number(e[u])===Number(r))return!0;if(a(e[u])&&-1!==e[u].toLowerCase().indexOf(r.toLowerCase()))return!0}}return!1}));l=M(l.concat(n))};for(f.s();!(u=f.n()).done;)h()}catch(e){f.e(e)}finally{f.f()}return l}},filter:x,filtered:x,sort:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";if(!p(e))throw new Error("Only array of strings or numbers accepted");if(!a(r))throw new Error('The second argument must be in a string and a value either "", "asc" or "desc"');var n=Array.from(e);return"asc"===r?n.sort((function(e,r){if(t(e)&&t(r))return Number(e)-Number(r);if(a(e)&&a(r)){var n=e.toLowerCase(),o=r.toLowerCase(),i=0;return n<o?i=-1:n>o&&(i=1),i}})):"desc"===r&&n.sort((function(e,r){if(t(e)&&t(r))return Number(r)-Number(e);if(a(e)&&a(r)){var n=e.toLowerCase(),o=r.toLowerCase(),i=0;return o<n?i=-1:o>n&&(i=1),i}})),n},sortBy:k,sorted:k,sortWith:function(e,r){if(!p(e))throw new Error("The first argument must be in an array type");if(!C(r))throw new Error("The second argument is a compare or callback function");var t=Array.from(e);return t.sort((function(e,t){return-1===Math.sign(r(e,t))?-1:1})),t},paginate:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!p(e))throw new Error("On the first argument, here only accept array");if(!t(r))throw new Error("This is the page active number, please enter number only");if(!t(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var o=Array.from(e),a=Number(n)*Number(r)-(Number(n)-1),i=Number(n)*Number(r);return o.slice(a-1,i<=o.length?i:o.length)},pages:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(!p(e))throw new Error("On the first argument, here only accept array");if(!t(r))throw new Error("This is the limit of entries in one page in a number, please enter number only");var n=Array.from(e),o=n.length/Number(r),a=Math.ceil(o);return a},pageInfo:_,show:_,pagination:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t(e))throw new Error("This is the total or all pages in numbers, please enter number only");if(!t(r))throw new Error("This is the page active number, please enter number only");if(!t(n))throw new Error("This is the position of ellipsis [...], please enter number only");var o=[],a=Number(e)<Number(r)?Number(e):Number(r),i=Number(r)<1?1:Number(r),u=a+Number(n),l=i-Number(n);if(0===Number(n))for(var f=1;f<=Number(e);f++)o.push(f);else{if(i>1)for(var h=l;h<i;h++)o.push(h);for(var c=a;c<=u;c++)o.push(c)}var s=o.filter((function(e){return e>0})),m=s.filter((function(r){return r<=Number(e)}));return u<Number(e)&&0!==Number(n)&&m.push("..."),l>1&&0!==Number(n)&&m.unshift("..."),m},sum:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!p(e))throw new Error("In the first argument, you must enter a data in array");var t=Array.from(e),n=0;if("string"==typeof r&&""!==r){var o=t.map((function(e){return r in e?Number(e[r]):0}));n=o.reduce((function(e,r){return Number(e)+Number(r)}))}else n=t.reduce((function(e,r){return Number(e)+Number(r)}));return n},calculate:z,calc:z,unique:M,isArray:p,isSuperset:function(e,r){if(!p(e)&&!p(r))throw new Error("The both of arguments must be in arrays");var t,n=new Set(e),o=g(r);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(!n.has(a))return!1}}catch(e){o.e(e)}finally{o.f()}return!0},union:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return Array.from(new Set(r.flat()))},intersection:I,difference:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(!r&&r.length<=1)throw new Error("You have to provide here at least 2 arguments");var n=new Set,o=I.apply(void 0,r);return r.forEach((function(e){if(!p(e))throw new Error("Here only accept arrays from all arguments");var r,t=g(e);try{for(t.s();!(r=t.n()).done;){var a=r.value;o.includes(a)||n.has(a)||n.add(a)}}catch(e){t.e(e)}finally{t.f()}})),Array.from(n)},asymmetricDifference:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(!r&&r.length<=1)throw new Error("You have to provide here at least 2 arguments");for(var n=new Set,o=[],a=0,i=r;a<i.length;a++){var u=i[a];if(!p(u))throw new Error("Here only accept arrays from all arguments");u.forEach((function(e){n.has(e)?(n.delete(e),o.push(e)):o.includes(e)||n.add(e)}))}return Array.from(n)},complement:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(!r&&r.length<=1)throw new Error("You have to provide here at least 1 value");var n=Array.from(r);n.shift();var o=new Set(P.apply(void 0,[r[0]].concat(c(n))));return Array.from(o)},without:P,transpose:L,zip:U,unzip:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(r),o=Object.keys(n[0]),a={},i=0,u=o;i<u.length;i++){var l=u[i];a[l]=[]}for(var f=0,h=n;f<h.length;f++){var s=h[f];for(var m in s)a[m].push(s[m])}return[o].concat(c(L.apply(void 0,c(Object.values(a)))))},range:F,move:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(0===r.length)throw new Error("Only accept index of array elements and you must input at least one index in number type");return function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!p(e))throw new Error("Please enter array only here");if(!t(n))throw new Error("Input only index number here");var a,i=Array.from(e),u=[],l=g(r);try{for(l.s();!(a=l.n()).done;){var f=a.value;void 0!==i[Number(f)]&&u.push(i[Number(f)])}}catch(e){l.e(e)}finally{l.f()}var h=j.apply(void 0,[i].concat(r));return h.splice.apply(h,[n,o].concat(u)),h}},switched:H,transfer:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(0===r.length)throw new Error("Only accept index of array elements and you must enter at least one index in number type");return function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!p(e))throw new Error("Accept array only here");if(!p(n))throw new Error("Accept array only here");if(!t(o))throw new Error("Input only index number here");var a,i=Array.from(e),u=Array.from(n),l=[],f=g(r);try{for(f.s();!(a=f.n()).done;){var h=a.value;void 0!==i[Number(h)]&&l.push(i[Number(h)])}}catch(e){f.e(e)}finally{f.f()}var c=null===o?Number(u.length):o;u.splice.apply(u,[c,0].concat(l));var s=j.apply(void 0,[i].concat(r));return{from:s,to:u}}},compact:function(e){if(!p(e))throw new Error("Enter only array type here");return Array.from(e).filter((function(e){return null!=e&&!1!==e&&!isNaN(e)&&""!==e&&e>0}))},chunk:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!p(e)&&e.length<=2)throw new Error("Please insert array only on the first argument and must have 3 values at least");if("number"!=typeof r)throw new Error("On the second argument, you must input in a number type only");var t,n=F(r,e.length,r),o=[],a=g(n);try{for(a.s();!(t=a.n()).done;){var i=t.value,u=e.slice(Number(i)-Number(r),i);o.push(u)}}catch(e){a.e(e)}finally{a.f()}return n[Number(n.length)-1]<=e.length&&o.push(e.slice(n[Number(n.length)-1],e.length)),o},shuffle:function(e){if(!p(e)&&e.length<=2)throw new Error("This shuffle method only work on data in array type");for(var r=Array.from(e),t=Number(r.length)-1;t>2;t--){var n=r.slice(0,Number(t)+1);r=H(t)(r,O(n))}return r},group:function(e,r){if(!p(e))throw new Error("You must enter array literal here");if(!C(r))throw new Error("You have to enter a function or callback on the second argument");var t,n={},o=g(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;void 0===n[r(a).toString()]&&(n[r(a).toString()]=[]),n[r(a).toString()].push(a)}}catch(e){o.e(e)}finally{o.f()}return n},countDuplication:B,countBy:function(e,r){if(!p(e))throw new Error("The first paramenter only accept array");if(!C(r))throw new Error("The second paramenter only accept callback function");return e.filter((function(e){return r(e)})).length}}),Z=Object.freeze({__proto__:null,remove:function(e){if(!w(e))throw new Error("This is object helper, you must provide the first argument in an object");for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("The next arguments must be in a string and at least one argument");for(var o=Object.assign({},e),a=0,i=t;a<i.length;a++){var u=i[a];u in o&&delete o[u]}return o},removeBy:T,merge:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r){for(var n={},o=new Map,a=0,i=r;a<i.length;a++)for(var u=i[a],l=0,f=Object.entries(u);l<f.length;l++){var c=h(f[l],2),s=c[0],m=c[1];o.has(s)||(o.set(s,m),n[s]=m)}return n}},replace:S,isObject:w,isObjectValues:function(e){return!!Object.values(e).filter((function(e){return""!==e&&0!==e&&e!=={}&&e!==[]})).join("")},invert:function(e){if(!w(e))throw new Error("You have to input object only here");var r=Object.keys(e),t=Object.values(e);return U(t,r)[0]},clone:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<1)throw new Error("In this argument must have at least one argument and please provide it in object type");return Object.assign.apply(Object,[{}].concat(r))}}),G=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,q=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|T|H{1,2}|h{1,2}|a|A|i{1,2}|s{1,2}|Z{1,2}|SSS/g,W=function(e){return"number"==typeof e||"string"==typeof e},J=function(e){return"number"==typeof e||"string"==typeof e},K=function(e){return"number"==typeof e||"string"==typeof e},$=function(e){return!!("object"===i(new Date(e))&&null!==e||"string"==typeof e&&new RegExp(G).test(e))},V=function(e){return!("string"!=typeof e||!new RegExp(q).test(e))},Q=function(e){return e%400==0||e%100!=0&&e%4==0},X="Year must be in a number or a string type, the length of year either 4 or 2",ee="Month must be in a number or a string type, the month number start from 1 to 12",re="Date must be in a number or a string type, the date number start from 1 to 31",te="Full date must be in string or array type",ne=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t=[],n=4;n<=10;n++){var o=new Date(Date.UTC(2021,3,n));t.push(new Intl.DateTimeFormat(e,{weekday:r}).format(o))}return t},oe=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);var t=[28,29,30,31],n=new Date(Date.UTC(Number(e),Number(r),0)).getUTCDate();return t.includes(n)?n:31},ae=function(e){if(!W(e))throw new Error(X);return Q(e)?366:365},ie=function(e,r){if(!$(e))throw new Error("Error in the first argument: "+te);if(!$(r))throw new Error("Error in the second argument: "+te);var t=new Date(e),n=new Date(r);return(Number(n.getTime())-Number(t.getTime()))/864e5},ue=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t=[],n=0;n<=11;n++){var o=Date.UTC(2021,n);t.push(new Intl.DateTimeFormat(e,{month:r}).format(new Date(o)))}return t},le=function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!$(e))throw new Error('You\'re entering the wrong date string, please use this statement "new Date(\'yourdateParam\').toString()" instead or array "[year, monthIndex, dateNumber]"');if(!V(r))throw new Error("Please enter the correct date format");var o,a=new Date(e),i=r,u=r,l={YY:function(){var e=a.getFullYear().toString().slice(-2),r=a.getFullYear();return"00"!==e&&(r=Number(e)),r},YYYY:a.getFullYear(),M:Number(a.getMonth())+1,MM:function(){var e=Number(Number(a.getMonth())+1).toString();return 1===e.length?"0"+e:e},m:ue(t,n)[a.getMonth()].slice(0,3),mm:ue(t,n)[a.getMonth()],D:a.getDate,DD:function(){var e=a.getDate().toString(),r=e;1===e.length&&(r="0"+e);return r},d:ne(t,n)[a.getDay()].slice(0,3),dd:ne(t,n)[a.getDay()],H:a.getHours(),HH:function(){var e=a.getHours().toString();return 1===e.length?"0"+e:e},h:function(){var e=Number(a.getHours()+1),r=e;return e>12&&(r=e-(e-1)),r},hh:function(){var e=Number(a.getHours()+1),r=e;e>12&&(r=e-(e-1));var t=r.toString();return 1===t.length?"0"+t:t},k:function(){return 0===Number(a.getHours())?24:a.getHours()},kk:function(){var e=Number(a.getHours()).toString();if(1===e.length){var r="0"+e;return 0===Number(r)?24:r}return 0===Number(e)?24:e},i:a.getMinutes(),ii:function(){var e=a.getMinutes().toString();return 1===e.length?"0"+e:e},s:a.getSeconds(),ss:function(){var e=a.getSeconds().toString();return 1===e.length?"0"+e:e},uuu:a.getMilliseconds(),A:a.getHours()<12?"AM":"PM",a:a.getHours()<12?"am":"pm",Do:a.getDate().toString()+"st"},f=i.split(/-|\/|\.|:|\s/),h=g(f);try{for(h.s();!(o=h.n()).done;){var c=o.value;"YY"===c?u=u.replace(c,l.YY()):"YYYY"===c?u=u.replace(c,l.YYYY):"M"===c?u=u.replace(c,l.M):"MM"===c?u=u.replace(c,l.MM()):"m"===c?u=u.replace(c,l.m):"mm"===c?u=u.replace(c,l.mm):"D"===c?u=u.replace(c,l.D):"DD"===c?u=u.replace(c,l.DD()):"d"===c?u=u.replace(c,l.d):"dd"===c?u=u.replace(c,l.dd):"H"===c?u=u.replace(c,l.H):"HH"===c?u=u.replace(c,l.HH()):"h"===c?u=u.replace(c,l.h()):"hh"===c?u=u.replace(c,l.hh()):"k"===c?u=u.replace(c,l.k()):"kk"===c?u=u.replace(c,l.kk()):"i"===c?u=u.replace(c,l.i):"ii"===c?u=u.replace(c,l.ii()):"s"===c?u=u.replace(c,l.s):"ss"===c?u=u.replace(c,l.ss()):"uuu"===c?u=u.replace(c,l.uuu):"A"===c?u=u.replace(c,l.A):"a"===c?u=u.replace(c,l.a):"Do"===c&&(u=u.replace(c,l.Do))}}catch(e){h.e(e)}finally{h.f()}return u},fe=function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!$(e))throw new Error("On the first argument, you have to input only the correct date");if(!V(r))throw new Error("For format date, you must always input the correct one by using characters like these: Y, M, m, D, d, H, h, k, i, S, s, A, a or Do");var o=e.split(/-|\/|\.|T|Z|:|\s/).filter((function(e){return e.length>=1&&" "!==e})).map((function(e){return e.trim()})),a=r.split(/-|\/|\.|T|Z|:|\s/).filter((function(e){return e.length>=1&&" "!==e})).map((function(e){return e.trim()})),i={year:(new Date).getFullYear(),month:Number((new Date).getMonth())+1,day:(new Date).getDate(),hour:(new Date).getHours(),minute:(new Date).getMinutes(),second:(new Date).getSeconds(),millisecond:(new Date).getMilliseconds()};if(o.length!==a.length)throw new Error("The numbers and the formats must be in place, so when we check the length of both of these arguments then the result will be the same");for(var u=0;u<o.length;u++)4===o[u].length&&!1===isNaN(o[u])&&"YYYY"===a[u]||2===o[u].length&&!1===isNaN(o[u])&&"YY"===a[u]?i.year=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"M"===a[u]||"MM"===a[u]?i.month=Number(o[u])-1:3===o[u].length&&ue(t,n).map((function(e){return e.slice(0,3)})).includes(o[u])&&"m"===a[u]?i.month=ue(t,n).map((function(e){return e.slice(0,3)})).findIndex(o[u]):o[u].length>=3&&ue(t,n).includes(o[u])&&"mm"===a[u]?i.month=ue(t,n).findIndex(o[u]):1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"D"===a[u]||"DD"===a[u]?i.day=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"H"===a[u]||"HH"===a[u]?i.hour=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"h"===a[u]||"hh"===a[u]?i.hour=o[u]>12?Number(o[u])-(Number(o[u])-1):o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"k"===a[u]||"kk"===a[u]?i.hour=24===Number(o[u])?0:o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"i"===a[u]||"ii"===a[u]?i.minute=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"s"===a[u]||"ss"===a[u]?i.second=o[u]:o[u].length>=3&&!1===isNaN(o[u])&&"uuu"===a[u]?i.millisecond=o[u]:("st"===o[u].slice(-2)||"nd"===o[u].slice(-2)||"th"===o[u].slice(-2)&&"Do"===a[u])&&(i.second=Number(o[u].slice(0,-2)));return new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond).toString()},he=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!$(e))throw new Error("Please enter a date in correct way, either in string or array type");if(!t(r))throw new Error("Only accept number type on second argument");var o=new Date(e),a=Number(o.getDate())+Number(r),i=Number(oe(Number(o.getFullYear()),o.getMonth()+1));if(a>i){var u=a-i;o=11===Number(o.getMonth())?new Date(Number(o.getFullYear())+1,0,u):new Date(Number(o.getFullYear()),Number(o.getMonth())+1,u)}else o=new Date(Number(o.getFullYear()),Number(o.getMonth()),a);var l=null!==n&&!1!==V(n)?le(o,n):o;return l},ce=function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!$(n))throw new Error("Error in the first argument: "+te);if(!$(o))throw new Error("Error in the second argument: "+te);for(var n=new Date(e),o=new Date(r),a=[],i=n;i<=o;){var u=null!==t&&!1!==V(t)?le(i,t):i;a.push(u),i=he(i,1)}return a},se=function(e,r,t){if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);if(!K(t))throw new Error(re);var n=ie(new Date(Number(e),0,1),new Date(Number(e),Number(r)-1,Number(t))),o=Number(new Date(e,0,1).getDay()),a=0;o>0&&(a=6-(o-1));var i=Number(new Date(Number(e),Number(r)-1,Number(t)).getDay()),u=0;return i<6&&(u=6-i),Math.ceil((Number(n)+u-a)/7)},me=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!W(e))throw new Error(X);if(!t(r))throw new Error("You have to enter a number");if(!V(n))throw new Error("Please enter a format of date correctly");var o=Number(new Date(Number(e),0,1).getDay()),a=0;o>0&&(a=6-(o-1));for(var i=[],u=a+1,l=0,f=e,h=1;h<=Number(r);h++){if(h===Number(r)){i.push(le(new Date(f,l,u),n));for(var c=0;c<6;)c++,i.push(le(he(new Date(f,l,u),c),n))}u+=7,l<12&&u>Number(oe(e,l+1))&&(u-=Number(oe(e,l+1)),11!==l?l+=1:(l=1,f+=1))}return i},ge=function(e,r){if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);for(var t=we(e,52,"M"),n=[],o=0,a=Object.entries(t);o<a.length;o++){var i=h(a[o],2),u=i[0];i[1].includes(r.toString())&&n.push(u)}return 1===Number(r)?n.filter((function(e){return"52"!==e})):n},we=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!W(e))throw new Error(X);if(!t(r))throw new Error("You have to enter a number");if(!V(n))throw new Error("Please enter a format of date correctly");var o=Number(new Date(Number(e),0,1).getDay()),a=0;o>0&&(a=6-(o-1));for(var i={},u=a+1,l=0,f=e,h=1;h<=r;h++)i[h.toString()]=[le(new Date(f,l,u),n),le(he(new Date(f,l,u),6),n)],u+=7,l<12&&u>Number(oe(e,l+1))&&(u-=Number(oe(e,l+1)),11!==l?l+=1:(l=1,f+=1));return i},de=Object.freeze({__proto__:null,now:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=(new Date).toString();return"string"==typeof e&&(r=le(r,e)),r},nowHijri:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",r=Date.UTC(Number((new Date).getFullYear()),Number((new Date).getMonth()),Number((new Date).getDate()),Number((new Date).getHours()),Number((new Date).getMinutes()),Number((new Date).getSeconds()),Number((new Date).getMilliseconds())),t=new Intl.DateTimeFormat(e,{calendar:"islamic",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h24"}).format(new Date(r));return t},parse:fe,parseDate:fe,utc:function(){return new Date(Date.UTC.apply(Date,arguments))},addDate:he,subtractDate:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!$(e))throw new Error("Please enter a date in correct way, either in string or array type");if(!t(r))throw new Error("Only accept number type on second argument");var o=new Date(e),a=Number(o.getDate())-Number(r),i=Number(oe(Number(o.getFullYear()),o.getMonth()));if(a<1){var u=i+(a-1);o=0===Number(o.getMonth())?new Date(Number(o.getFullYear())-1,0,u):new Date(Number(o.getFullYear()),Number(o.getMonth())+1,u)}else o=new Date(Number(o.getFullYear()),Number(o.getMonth()),a);var l=null!==n&&!1!==V(n)?le(o,n):o;return l},rangeDate:ce,day:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"en-US",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"long";if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);if(!K(t))throw new Error(re);var a=new Date(Date.UTC(Number(e),Number(r)-1,Number(t)));return new Intl.DateTimeFormat(n,{weekday:o}).format(a)},days:ne,daysInMonth:oe,daysInYear:ae,daysInBetween:ie,week:se,weeks:me,weeksInMonth:ge,weeksInYear:function(e){if(!W(e))throw new Error(X);var r=Number(new Date(Number(e),0,1).getDay()),t=0;r>0&&(t=6-(r-1));var n=Number(new Date(Number(e),11,31).getDay()),o=0;return n<6&&(o=6-n),Math.ceil((Number(ae(e))+o-t)/7)},month:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);var o=Date.UTC(e,Number(r)-1);return new Intl.DateTimeFormat(t,{month:n}).format(new Date(o))},months:ue,isYear:W,isMonth:J,isDate:K,isFullDate:$,isFormatDate:V,isLeapYear:Q,calendar:function(e,r){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);if(!V(n))throw new Error("Please enter a format of date correctly");var a=ne(o),i=ce(new Date(e,Number(r)-1,1),new Date(e,Number(r)-1,oe(e,r)),n),u=Number(new Date(e,Number(r)-1,1).getDay()),l=[];if(u>0){var f=u-1;l=ce(new Date(e,Number(r)-2,Number(oe(e,Number(r)-1))-f),new Date(e,Number(r)-2,oe(e,Number(r)-1)),n)}var h=Number(new Date(e,Number(r)-1,oe(e,r)).getDay()),c=[];if(h<6){var s=6-(h+1);c=ce(new Date(e,Number(r),1),new Date(e,Number(r),1+s),n)}var m=[a,l,i,c];return!0===t?m.flat():m},daysInCalendar:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);if(!V(t))throw new Error("Please enter a format of date correctly");return ce(new Date(e,Number(r)-1,1),new Date(e,Number(r)-1,oe(e,r)),t)},prevDaysInCalendar:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);if(!V(t))throw new Error("Please enter a format of date correctly");var n=Number(new Date(e,Number(r)-1,1).getDay()),o=[];if(n>0){var a=n-1;o=ce(new Date(e,Number(r)-2,Number(oe(e,Number(r)-1))-a),new Date(e,Number(r)-2,oe(e,Number(r)-1)),t)}return o},nextDaysInCalendar:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);if(!V(t))throw new Error("Please enter a format of date correctly");var n=Number(new Date(e,Number(r)-1,oe(e,r)).getDay()),o=[];if(n<6){var a=6-(n+1);o=ce(new Date(e,Number(r),1),new Date(e,Number(r),1+a),t)}return o},weeklyCalendar:function(e,r,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);if(!K(t))throw new Error(re);if(!V(n))throw new Error("Please enter a format of date correctly");var a=ne(o),i=se(e,r,t),u=me(e,i,n);return U(a,u)[0]},calendarWithWeeks:function(e,r){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!W(e))throw new Error(X);if(!J(r))throw new Error(ee);if(!V(n))throw new Error("Please enter a format of date correctly");var a=ne(o),i=ge(e,r),u=[];0!==Number(new Date(e,Number(r)-1,1).getDay())&&1===Number(r)&&(u.push("52"),u.push(me(Number(e)-1,52,n)));var l,f=g(i);try{for(f.s();!(l=f.n()).done;){var h=l.value;u.push(h),u.push(me(e,h,n))}}catch(e){f.e(e)}finally{f.f()}var c=["Week",a].concat(u);return!0===t?c.flat():c},dateToArray:function(e){if(!$(e))throw new Error("Please enter a valid date");return new Date(e).toJSON().replace("Z","").split(/-|:|\s|\.|T/g)}}),ve=Object.freeze({__proto__:null,size:function(e,r){if(0===e)return"0 Bytes";var t=r||1,n=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,n)).toFixed(t))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][n]},name:function(e){if("string"==typeof e)return e.indexOf("",41)>40?e.slice(0,41)+"...":e},type:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type",t=e.split("/");return"format"==r?t.shift():t.pop(),t.join("")},image:function(e){if("name"in e&&"string"==typeof e.name)return URL.createObjectURL(e)},date:function(e){return new Date(e).toDateString()},loadImage:function(e){"name"in e&&"string"==typeof e.name&&URL.revokeObjectURL(e)},formatSize:function(e){for(var r=0,t=e,n=t.length,o=0;o<n;o++)r+=t[o].size;for(var a=r+" bytes",i=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],u=0,l=r/1024;l>1;l/=1024,u++)a=l.toFixed(3)+" "+i[u]+" ("+r+" bytes)";return a},humanSize:function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=r?1e3:1024;if(Math.abs(e)<n)return e+" B";var o=r?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=-1,i=Math.pow(10,t);do{e/=n,++a}while(Math.round(Math.abs(e)*i)/i>=n&&a<o.length-1);return e.toFixed(t)+" "+o[a]},exported:function(e,r){if("object"===i(e)&&"string"==typeof r){var t=Array.from(e),n="";if("json"===r.toLowerCase())n="data:application/json;charset=utf-8,"+JSON.stringify(t,null,2);else if("csv"===r.toLowerCase()){var o,a="",u=g(t);try{for(u.s();!(o=u.n()).done;){var l=o.value;for(var f in l)a+=l[f]+",";a=a.trim().substring(0,a.length-1),a+="\n"}}catch(e){u.e(e)}finally{u.f()}n="data:text/csv;charset=utf-8,"+(a=a.trim().substring(0,a.length-1))}else if("sql"===r.toLowerCase()){var h="INSERT INTO `export_table` (";for(var c in t[0])h+="`"+c+"`,";h=h.trim().substring(0,h.length-1),h+=") VALUES ";var s,m=g(t);try{for(m.s();!(s=m.n()).done;){var w=s.value;for(var d in h+="(",w)h+="`"+w[d]+"`,";h=h.trim().substring(0,h.length-1),h+="),"}}catch(e){m.e(e)}finally{m.f()}h=h.trim().substring(0,h.length-1),n="data:application/sql;charset=utf-8,"+(h+=";")}else if("xml"===r.toLowerCase()){var v='<?xml version="1.0" encoding="UTF-8"?>\n<data>';for(var y in t){for(var p in v+="\n <entry>",y)v+="\n <"+p+"`>"+y[p]+"</"+p+"`>";v+="\n </entry>"}n="data:application/xml;charset=utf-8,"+(v+="\n</data>")}else if("vhs"===r.toLowerCase()){var b,N='//visit official site: http://vhs-file-format.glitch.me \n("data", [',E=g(t);try{for(E.s();!(b=E.n()).done;){var D=b.value;for(var A in N+='\n ("entry", [',D)N+='\n ("'+A+'", ',N+=D[A]+"),";N=N.trim().substring(0,N.length-1),N+="]),"}}catch(e){E.e(e)}finally{E.f()}N=N.trim().substring(0,N.length-1),n="data:application/vhs;charset=utf-8,"+(N="])")}return n}},download:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"txt",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"export-to";if("string"==typeof e){var n=t+"."+r.toLowerCase(),o=encodeURI(e),a=document.createElement("a");a.href=o,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a)}},printed:function(e){if("object"===i(e)){var r=Array.from(e),t=document.createElement("table"),n=document.createElement("thead"),o=document.createElement("tbody");t.appendChild(n),t.appendChild(o);var a=document.createElement("tr");for(var u in r[0]){var l=document.createElement("th");l.textContent=u.replace(/^\w/,(function(e){return e.toUpperCase()})),a.appendChild(l)}n.appendChild(a);for(var f=0,h=r;f<h.length;f++){var c=h[f],s=document.createElement("tr");for(var m in c){var g=document.createElement("td");g.textContent=c[m],s.appendChild(g)}o.appendChild(s)}var w=window.open();w.document.body.appendChild(t),w.focus(),w.print()}}}),ye=function(e,r,t){var n;if(t){var o=new Date;o.setTime(o.getTime()+24*t*60*60*1e3),n="expires="+o.toGMTString()}else n="";document.cookie=e+"="+r+"; SameSite=Lax;"+n+"; path=/"},pe=function(e){for(var r=e+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var o=t[n];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return o.substring(r.length,o.length)}return null},be=function(e){return"object"===("undefined"==typeof window?"undefined":i(window))&&"".concat(e,"Storage")in window},Ne=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(be(r))return!!window["".concat(r,"Storage")].getItem(e)},Ee=Object.freeze({__proto__:null,setCookie:ye,getCookie:pe,hasCookie:function(e){return!!pe(e)},removeCookie:function(e){ye(e,"",-1)},clearCookie:function(){for(var e=document.cookie.split(";"),r=0;r<e.length;r++){var t=e[r],n=t.indexOf("="),o=n>-1?t.substr(0,n):t;document.cookie=o+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}},isStorage:be,isCookie:function(){return"object"===("undefined"==typeof document?"undefined":i(document))&&"cookie"in document},setStorage:function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local";be(t)&&window["".concat(t,"Storage")].setItem(e,r)},getStorage:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(be(r))return window["".concat(r,"Storage")].getItem(e)},hasStorage:Ne,removeStorage:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";be(r)&&Ne(e,r)&&window["".concat(r,"Storage")].removeItem(e)},clearStorage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"local";be(e)&&window["".concat(e,"Storage")].clear()}}),De=Object.freeze({__proto__:null,ternary:function(e,r,t){if(!C(e)&&!C(r)&&!C(t))throw new Error("All arguments here only accept value in function");return e()?r():t()}});e.array=R,e.char=v,e.date=de,e.file=ve,e.func=De,e.int=r,e.number=d,e.object=Z,e.storage=Ee,e.string=y,Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -1,1 +0,1 @@

var r=Object.freeze({__proto__:null,random:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:255,e=Number(r)+1;return Math.floor(Math.random()*e)}}),e=function(r){return!isNaN(r)&&"number"==typeof Number(r)},t=function(r){if("number"!=typeof r&&"string"!=typeof r)throw new Error("You must input only number format here");return 1===Math.sign(r)},n=function(r){if("number"!=typeof r&&"string"!=typeof r)throw new Error("You must input only number format here");return-1===Math.sign(r)},o=function(r){return"string"==typeof r};function a(r){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function i(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function u(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function l(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function f(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?l(Object(t),!0).forEach((function(e){u(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function h(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(r)))return;var t=[],n=!0,o=!1,a=void 0;try{for(var i,u=r[Symbol.iterator]();!(n=(i=u.next()).done)&&(t.push(i.value),!e||t.length!==e);n=!0);}catch(r){o=!0,a=r}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return t}(r,e)||s(r,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(r){return function(r){if(Array.isArray(r))return m(r)}(r)||function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}(r)||s(r)||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 s(r,e){if(r){if("string"==typeof r)return m(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(r,e):void 0}}function m(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function g(r,e){var t;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(t=s(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,o=function(){};return{s:o,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){t=r[Symbol.iterator]()},n:function(){var r=t.next();return i=r.done,r},e:function(r){u=!0,a=r},f:function(){try{i||null==t.return||t.return()}finally{if(u)throw a}}}}var v=function(r){return"object"===a(r)&&null!==r&&"[object Object]"===Object.prototype.toString.call(r)},w=Object.freeze({__proto__:null,random:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if("number"!=typeof r&&r<=0)throw new Error("You have to add a number at least 1");for(var e="",t="0123456789",n=0;n<r;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},loop:function(r,e){if("number"!=typeof r&r<=-1)throw new Error("Only accept number here, start from 0");if("number"!=typeof e&e<=0)throw new Error("Only accept number here, start from 1");for(var t=[];r<=e;)t.push(r++);return t},isNumber:e,isPositive:t,isNegative:n,calc:function(r,t,n){if(!e(r))throw new Error("This is left operand and must be in number type");if(!e(t))throw new Error("This is left operand and must be in number type");if(!o(n))throw new Error("Operator must be one of these: add, subtract, multiply, divide, reminder or exponent");var a=0;return"add"===n||"addition"===n||"plus"===n||"+"===n?a=Number(r)+Number(t):"subtract"===n||"subtraction"===n||"minus"===n||"-"===n?a=Number(r)-Number(t):"multiply"===n||"multiplication"===n||"×"===n||"*"===n?a=Number(r)*Number(t):"divide"===n||"division"===n||"÷"===n||"/"===n?a=Number(r)/Number(t):"remainder"===n||"modulo"===n||"%"===n?a=Number(r)%Number(t):"exponent"!==n&&"exponentiation"!==n&&"**"!==n||(a=Math.pow(Number(r),Number(t))),a},currency:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e(r))throw new Error("Amount must be in a number type");if(!o(t)&&3===t.length)throw new Error("Currency code must have at least 3 uppercase character");if(!o(n))throw new Error("Locale code must contain 2 languages and 2 country code and separated by dash (-)");if(!v(a))throw new Error("Currency options must be in object type");return new Intl.NumberFormat(n,f({style:"currency",currency:t.toUpperCase()},a)).format(r)}}),d=Object.freeze({__proto__:null,random:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_~!@#$%^&*()+={}[]|:;<>,./?";"short"===e||"alphadash"===e?n=n.slice(0,64):"narrow"===e||"alphanumeric"===e?n=n.slice(0,62):"alpha"===e?n=n.slice(10,62):"hex"===e?n=n.slice(0,16):"number"!==e&&"numeric"!==e||(n=n.slice(0,10));for(var o=0;o<r;o++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}}),y=Object.freeze({__proto__:null,split:function(r){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];return"string"==typeof r&&(e>=1&&n.push(r.slice(0,e)),null!==t?(n.push(r.slice(e,t)),n.push(r.slice(t))):n.push(r.slice(e))),n}},capitalize:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"single";if("string"==typeof r){var t=r;return t="multiple"===e?t.toLowerCase().replace(/\w\S*/g,(function(r){return r.replace(/^\w/,(function(r){return r.toUpperCase()}))})):t.trimStart().replace(/^\w/,(function(r){return r.toUpperCase()}))}},includes:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return-1!==r.indexOf(e,t)},isString:o}),b=function(r){return!("object"!==a(r)||null===r||!Array.isArray(r))},p=function(){function r(e,t){!function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.valArr=e,this.toArr=t}var e,t,n;return e=r,(t=[{key:"first",value:function(){return[].concat(c(this.valArr),c(this.toArr))}},{key:"last",value:function(){return[].concat(c(this.toArr),c(this.valArr))}},{key:"before",value:function(r){var e=isNaN(r)?1:r;return this.toArr.splice(Number(e)-1,0,this.valArr),this.toArr.flat()}},{key:"after",value:function(r){var e=isNaN(r)?0:r;return this.toArr.splice(Number(e)+1,0,this.valArr),this.toArr.flat()}}])&&i(e.prototype,t),n&&i(e,n),r}(),N=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{key:"id",value:0};if(!b(r))throw new Error("You must enter the first argument in array only");var t=Array.from(r),n=-1;return"key"in e&&"value"in e?n=t.length>=1?t.findIndex((function(r){return r[e.key]===e.value})):-1:t.length>=1&&(n=t.findIndex((function(r){for(var t=0,n=Object.entries(e);t<n.length;t++){var o=h(n[t],2),a=o[0],i=o[1];if(a in r&&r[a]===i)return!0}}))),n},E=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dense";if(!b(r))throw new Error("You must enter the first argument in array only");return"sparse"===e?Object.keys(r).map((function(r){return Number(r)})):c(r.keys())},D=function(r){if(!b(r))throw new Error("You must enter the argument in array only");var e=E(r);return Number(e[Math.floor(Math.random()*e.length)])},A=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e){for(var n={},o=0,a=e;o<a.length;o++)for(var i=a[o],u=0,l=Object.entries(i);u<l.length;u++){var f=h(l[u],2),c=f[0],s=f[1];n[c]=s}return n}},Y=function(r){if(!b(r))throw new Error("Please provide array that you want to remove its element");for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("On the last of argument, you have to enter at least one argument");for(var o=Array.from(r),i=[],u=function(){var r=f[l];if("string"==typeof r&&"first"===r)o=o.map((function(r,e){return 0===e?null:r})),i=o;else if("string"==typeof r&&"last"===r)o=o.map((function(r,e){return e===o.length-1?null:r})),i=o;else if("number"==typeof r)o=o.map((function(e,t){return t===r?null:e})),i=o;else if("object"===a(r)&&null!==r){var e=N(o,r);o=o.map((function(r,t){return t===e?null:r})),i=o}},l=0,f=t;l<f.length;l++)u();return i.filter((function(r){return null!==r}))},S=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!b(r))throw new Error("");var t=Array.from(r),n=[];if("string"==typeof e){var o,a=new Set,i=g(t);try{for(i.s();!(o=i.n()).done;){var u=o.value;a.has(u[e])||a.add(u[e])}}catch(r){i.e(r)}finally{i.f()}n=c(a)}else n=Array.from(new Set(t));return n},M=function(r){if(!v(r))throw new Error("This is object helper, you must provide the first argument in an object");for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("The next arguments must be in a string or in a number and at least one argument");for(var o={},a=new Set(t),i=0,u=Object.entries(r);i<u.length;i++){var l=h(u[i],1),f=l[0];a.has(r[f])||(o[f]=r[f])}return o},j=function(r,t){if(!b(r))throw new Error("The first argument must be in array of objects");if(!v(t))throw new Error("The second argument must be in object type and must have at least one property");for(var n=Array.from(r),a=function(){var r=h(u[i],2),t=r[0],a=r[1],l=n.filter((function(r){if(t in r){if(e(r[t])&&Number(r[t])===Number(a))return!0;if(o(r[t])&&r[t].toLowerCase().includes(a.toLowerCase()))return!0}return!1}));n=l},i=0,u=Object.entries(M(t,"",0));i<u.length;i++)a();return n},O=function(r){return"function"==typeof r},T=function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";if(!b(r))throw new Error("Only array of objects accepted");if(!o(t))throw new Error("The second argument must be in a string and a value must be object property key or name");if(!o(n))throw new Error('The third argument must be in a string and a value either "", "asc" or "desc"');var a=Array.from(r);return"asc"===n?a.sort((function(r,n){if(t in r&&t in n){if(e(r[t])&&e(n[t]))return Number(r[t])-Number(n[t]);if(o(r[t])&&o(n[t])){var a=r[t].toLowerCase(),i=n[t].toLowerCase(),u=0;return a<i?u=-1:a>i&&(u=1),u}}})):"desc"===n&&a.sort((function(r,n){if(t in r&&t in n){if(e(r[t])&&e(n[t]))return Number(n[t])-Number(r[t]);if(o(r[t])&&o(n[t])){var a=r[t].toLowerCase(),i=n[t].toLowerCase(),u=0;return i<a?u=-1:i>a&&(u=1),u}}})),a},C=function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!b(r))throw new Error("On the first argument, here only accept array");if(!e(t))throw new Error("This is the page active number, please enter number only");if(!e(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var o=Array.from(r),a=Number(n)*Number(t)-(Number(n)-1),i=Number(n)*Number(t);return{from:a,to:i<=o.length?i:o.length,of:o.length}},k=function(r){if(!b(r))throw new Error("This argument only accept array");var e,t={},n=new Set,o=g(new Set(r));try{var a=function(){var o=e.value,a=Array.from(r).filter((function(r){return r===o}));n.has(a.length)||(n.add(a.length),t[a.length]=[]),a.forEach((function(r){t[a.length].push(r)}))};for(o.s();!(e=o.n()).done;)a()}catch(r){o.e(r)}finally{o.f()}return t},x=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");var n=[],o={};e.forEach((function(r,e){if(b(r)?o[e]=new Set(r):o[e]=(new Set).add(r),0!==e){var t,a=g(r);try{for(a.s();!(t=a.n()).done;){var i=t.value;o[e-1].has(i)&&n.push(i)}}catch(r){a.e(r)}finally{a.f()}}}));var a=k(n);return Array.from(new Set(a[e.length-1]))},I=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(!b(r)&&r.length<=0)throw new Error("You need to provide more values to your array");if(!t&&t.length<=0)throw new Error("You have to provide here at least 1 value");var o,a=[],i=g(r);try{for(i.s();!(o=i.n()).done;){var u=o.value;t.flat().includes(u)||a.push(u)}}catch(r){i.e(r)}finally{i.f()}return a},B=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<2&&!b(e[0])&&!b(e[1])&&Number(e[0].length)!==Number(e[1].length))throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(e[0]).map((function(r){return[]})),o=0,a=e;o<a.length;o++){var i=a[o];i.forEach((function(r,e){e in n&&n[e].push(r)}))}return n},_=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(e),o=[],a=n.shift(),i=function(){var r=l[u],e=new Map;r.forEach((function(r,t){a[t]&&e.set(a[t],r)})),o.push(Object.fromEntries(e))},u=0,l=n;u<l.length;u++)i();return o},P=function(){if(0===arguments.length||arguments.length>=4)throw new Error("Here only accept 3 arguments, so you have to provide at least 1 argument");var r=1===arguments.length?0:Number(arguments.length<=0?void 0:arguments[0]),e=Number(arguments.length>=2?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0]),o=3===arguments.length?Number(arguments.length<=2?void 0:arguments[2]):1;arguments.length<3&&n(e)&&(o=-1);var a=[],i=0,u=0;if(n(r)&&t(e)?i=r-1:t(r)&&n(e)?i=r+1:t(r)&&t(e)?i=r-1:n(r)&&n(e)&&(i=r+1),i<e){for(;i<e;)i++,o>1?(u+=o)<e&&a.push(u):i<e&&a.push(i);0!==r||a.includes(0)||a.unshift(0)}else if(i>e){for(;i>e;)i--,o<-1?(u-=o)>e&&a.unshift(u):i>e&&a.unshift(i);0!==r||a.includes(0)||a.push(0)}return 1===a.length&&0===a[0]?[]:a},U=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Accept index of array elements only and you add at least one index in number");return function(r){if(!b(r))throw new Error("Please enter array only here");for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(0===n.length&&n.length!==e.length&&0!==x(e,n).length)throw new Error("Only accept index of array elements and the number of the first indexes must be the same as the second indexes and also, both indexes must be different");for(var a=Array.from(r),i=Array.from(r),u=0;u<e.length;u++)void 0!==e[u]&&void 0!==n[u]&&(i.splice(e[u],1,a[n[u]]),i.splice(n[u],1,a[e[u]]));return i}},L=function(r,e,t){if(!b(r))throw new Error("On the first argument, you have to provide array only");if(!o(e))throw new Error("New property must be in string type");if(!O(t))throw new Error("Callback must be in function or method");return Array.from(r).map((function(r){return r[e]=t.apply(void 0,c(Object.values(r).filter((function(r){return!1===isNaN(r)})))),r}))},H=Object.freeze({__proto__:null,insert:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<1)throw new Error("You have to enter at least one value");var n=function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!b(r))throw new Error("Only array accept here");var o=Array.from(r),a=new p(e,o);return"first"===t?a=a.first():"last"===t?a=a.last():"before"===t?a=a.before(n):"after"===t&&(a=a.after(n)),a};return n},insertBefore:function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];if(t.length<1)throw new Error("You have to enter at least one value");return function(r,n){if(!b(r))throw new Error("In the first argument, here only accept array type");if(!e(n))throw new Error("In the second argument, accept only numeric or number type");var o=Array.from(r),a=isNaN(n)?1:n;return o.splice(Number(a)-1,0,t),o.flat()}},insertAfter:function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];if(t.length<1)throw new Error("You have to enter at least one value");return function(r,n){if(!b(r))throw new Error("In the first argument, here only accept array type");if(!e(n))throw new Error("In the second argument, accept only numeric or number type");var o=Array.from(r),a=isNaN(n)?0:n;return o.splice(Number(a)+1,0,t),o.flat()}},update:function(r){if(!v(r))throw new Error("You must enter object only here");return function(e,t){if(!b(e))throw new Error("You have to enter array only on the first argument");if(!v(t))throw new Error("You must enter object only on the second argument");var n=Array.from(e),o=N(n,t);return n.map((function(e,t){var n=e;return t===o&&(n=A(e,r)),n}))}},destroy:Y,select:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(!b(r))throw new Error("On the first argument, you have to provide array only");if(t.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(r);return o.map((function(r){var e,n={},o=g(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;a in r&&(n[a]=r[a])}}catch(r){o.e(r)}finally{o.f()}return n}))},hidden:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(!b(r))throw new Error("On the first argument, you have to provide array only");if(t.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(r);return o.map((function(r){var e,n=r,o=g(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;a in r&&delete n[a]}}catch(r){o.e(r)}finally{o.f()}return n}))},toggle:function(r){return function(e){var t=Array.from(e);if(t.includes(r)){var n=t.findIndex((function(e){return e===r}));t.splice(n,1)}else t.push(r);return t}},flatten:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],n={};n.id=e.id||"id",n.parent=e.parent||"parent",n.children=e.children||"children";var o=function(){Array.from(r).forEach((function(r){if("object"===a(r)&&null!==r){var e=r;e[n.parent]="0","object"===a(e[n.children])&&Array.isArray(e[n.children])&&(i(e[n.children],r),delete e[n.children]),t.push(e)}}))},i=function r(e,o){e.length>=1&&Array.from(e).forEach((function(e){if("object"===a(e)&&null!==e){var i=e;i[n.parent]=o[n.id],"object"===a(i[n.children])&&Array.isArray(i[n.children])&&(r(i[n.children],e),delete i[n.children]),t.push(i)}}))};return o(),t},nested:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],n=Array.from(r),o={};o.id=e.id||"id",o.parent=e.parent||"parent",o.children=e.children||"children";var i=function(r){r.forEach((function(r){if("object"===a(r)&&null!==r){var e=null;("string"==typeof r[o.parent]&&"0"===r[o.parent]||"number"==typeof r[o.parent]&&0===r[o.parent])&&(e=u(r)),null!==e&&t.push(e)}}))},u=function(r){var e=r;return void 0!==r[o.children]&&null!==r[o.children]||(e[o.children]=l(r[o.id]),e[o.children].length<=0&&delete e[o.children]),delete e[o.parent],e},l=function(r){var e=[];return f(r).length>=1&&f(r).forEach((function(r){e.push(u(r))})),e},f=function(r){return n.filter((function(e){return e.parent===r}))};return i(n),t},index:N,toIndex:E,randomIndex:D,search:function(r){if(!b)throw new Error("The first argument must be in array");for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];if(n.length<1)throw new Error("On the next arguments, you must provide at least one argument in either string or number");for(var i=[],u=function(){var t=f[l],n=Array.from(r).filter((function(r){if(e(r)&&Number(r)===Number(t))return!0;if(o(r)&&r.toLowerCase().includes(t.toLowerCase()))return!0;if(v(r))for(var n=0,a=Object.entries(r);n<a.length;n++){var i=h(a[n],2),u=i[0],l=i[1];if(e(r[u])&&Number(l)===Number(t))return!0;if(o(r[u])&&l.toLowerCase().includes(t.toLowerCase()))return!0}return!1}));i=S(i.concat(n))},l=0,f=n;l<f.length;l++)u();return i},searchBy:function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];if(t.length<1)throw new Error("This argument must have at least one argument in either string or number");return function(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];if(!b(r))throw new Error("Array of objects is needed in order to be searched");if(a.length<1)throw new Error("The last argument required at least one argument in either string or number");var u,l=[],f=g(t);try{var h=function(){var t=u.value,n=Array.from(r).filter((function(r){for(var n=0,i=Array.from(a);n<i.length;n++){var u=i[n];if(u in r){if(e(r[u])&&Number(r[u])===Number(t))return!0;if(o(r[u])&&-1!==r[u].toLowerCase().indexOf(t.toLowerCase()))return!0}}return!1}));l=S(l.concat(n))};for(f.s();!(u=f.n()).done;)h()}catch(r){f.e(r)}finally{f.f()}return l}},filter:j,filtered:j,sort:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";if(!b(r))throw new Error("Only array of strings or numbers accepted");if(!o(t))throw new Error('The second argument must be in a string and a value either "", "asc" or "desc"');var n=Array.from(r);return"asc"===t?n.sort((function(r,t){if(e(r)&&e(t))return Number(r)-Number(t);if(o(r)&&o(t)){var n=r.toLowerCase(),a=t.toLowerCase(),i=0;return n<a?i=-1:n>a&&(i=1),i}})):"desc"===t&&n.sort((function(r,t){if(e(r)&&e(t))return Number(t)-Number(r);if(o(r)&&o(t)){var n=r.toLowerCase(),a=t.toLowerCase(),i=0;return a<n?i=-1:a>n&&(i=1),i}})),n},sortBy:T,sorted:T,sortWith:function(r,e){if(!b(r))throw new Error("The first argument must be in an array type");if(!O(e))throw new Error("The second argument is a compare or callback function");var t=Array.from(r);return t.sort((function(r,t){return-1===Math.sign(e(r,t))?-1:1})),t},paginate:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!b(r))throw new Error("On the first argument, here only accept array");if(!e(t))throw new Error("This is the page active number, please enter number only");if(!e(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var o=Array.from(r),a=Number(n)*Number(t)-(Number(n)-1),i=Number(n)*Number(t);return o.slice(a-1,i<=o.length?i:o.length)},pages:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(!b(r))throw new Error("On the first argument, here only accept array");if(!e(t))throw new Error("This is the limit of entries in one page in a number, please enter number only");var n=Array.from(r),o=n.length/Number(t),a=Math.ceil(o);return a},pageInfo:C,show:C,pagination:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e(r))throw new Error("This is the total or all pages in numbers, please enter number only");if(!e(t))throw new Error("This is the page active number, please enter number only");if(!e(n))throw new Error("This is the position of ellipsis [...], please enter number only");var o=[],a=Number(r)<Number(t)?Number(r):Number(t),i=Number(t)<1?1:Number(t),u=a+Number(n),l=i-Number(n);if(0===Number(n))for(var f=1;f<=Number(r);f++)o.push(f);else{if(i>1)for(var h=l;h<i;h++)o.push(h);for(var c=a;c<=u;c++)o.push(c)}var s=o.filter((function(r){return r>0})),m=s.filter((function(e){return e<=Number(r)}));return u<Number(r)&&0!==Number(n)&&m.push("..."),l>1&&0!==Number(n)&&m.unshift("..."),m},sum:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!b(r))throw new Error("In the first argument, you must enter a data in array");var t=Array.from(r),n=0;if("string"==typeof e&&""!==e){var o=t.map((function(r){return e in r?Number(r[e]):0}));n=o.reduce((function(r,e){return Number(r)+Number(e)}))}else n=t.reduce((function(r,e){return Number(r)+Number(e)}));return n},calculate:L,calc:L,unique:S,isArray:b,isSuperset:function(r,e){if(!b(r)&&!b(e))throw new Error("The both of arguments must be in arrays");var t,n=new Set(r),o=g(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(!n.has(a))return!1}}catch(r){o.e(r)}finally{o.f()}return!0},union:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return Array.from(new Set(e.flat()))},intersection:x,difference:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");var n=new Set,o=x.apply(void 0,e);return e.forEach((function(r){if(!b(r))throw new Error("Here only accept arrays from all arguments");var e,t=g(r);try{for(t.s();!(e=t.n()).done;){var a=e.value;o.includes(a)||n.has(a)||n.add(a)}}catch(r){t.e(r)}finally{t.f()}})),Array.from(n)},asymmetricDifference:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");for(var n=new Set,o=[],a=0,i=e;a<i.length;a++){var u=i[a];if(!b(u))throw new Error("Here only accept arrays from all arguments");u.forEach((function(r){n.has(r)?(n.delete(r),o.push(r)):o.includes(r)||n.add(r)}))}return Array.from(n)},complement:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 1 value");var n=Array.from(e);n.shift();var o=new Set(I.apply(void 0,[e[0]].concat(c(n))));return Array.from(o)},without:I,transpose:B,zip:_,unzip:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(e),o=Object.keys(n[0]),a={},i=0,u=o;i<u.length;i++){var l=u[i];a[l]=[]}for(var f=0,h=n;f<h.length;f++){var s=h[f];for(var m in s)a[m].push(s[m])}return[o].concat(c(B.apply(void 0,c(Object.values(a)))))},range:P,move:function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Only accept index of array elements and you must input at least one index in number type");return function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!b(r))throw new Error("Please enter array only here");if(!e(n))throw new Error("Input only index number here");var a,i=Array.from(r),u=[],l=g(t);try{for(l.s();!(a=l.n()).done;){var f=a.value;void 0!==i[Number(f)]&&u.push(i[Number(f)])}}catch(r){l.e(r)}finally{l.f()}var h=Y.apply(void 0,[i].concat(t));return h.splice.apply(h,[n,o].concat(u)),h}},switched:U,transfer:function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Only accept index of array elements and you must enter at least one index in number type");return function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!b(r))throw new Error("Accept array only here");if(!b(n))throw new Error("Accept array only here");if(!e(o))throw new Error("Input only index number here");var a,i=Array.from(r),u=Array.from(n),l=[],f=g(t);try{for(f.s();!(a=f.n()).done;){var h=a.value;void 0!==i[Number(h)]&&l.push(i[Number(h)])}}catch(r){f.e(r)}finally{f.f()}var c=null===o?Number(u.length):o;u.splice.apply(u,[c,0].concat(l));var s=Y.apply(void 0,[i].concat(t));return{from:s,to:u}}},compact:function(r){if(!b(r))throw new Error("Enter only array type here");return Array.from(r).filter((function(r){return null!=r&&!1!==r&&!isNaN(r)&&""!==r&&r>0}))},chunk:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!b(r)&&r.length<=2)throw new Error("Please insert array only on the first argument and must have 3 values at least");if("number"!=typeof e)throw new Error("On the second argument, you must input in a number type only");var t,n=P(e,r.length,e),o=[],a=g(n);try{for(a.s();!(t=a.n()).done;){var i=t.value,u=r.slice(Number(i)-Number(e),i);o.push(u)}}catch(r){a.e(r)}finally{a.f()}return n[Number(n.length)-1]<=r.length&&o.push(r.slice(n[Number(n.length)-1],r.length)),o},shuffle:function(r){if(!b(r)&&r.length<=2)throw new Error("This shuffle method only work on data in array type");for(var e=Array.from(r),t=Number(e.length)-1;t>2;t--){var n=e.slice(0,Number(t)+1);e=U(t)(e,D(n))}return e},group:function(r,e){if(!b(r))throw new Error("You must enter array literal here");if(!O(e))throw new Error("You have to enter a function or callback on the second argument");var t,n={},o=g(r);try{for(o.s();!(t=o.n()).done;){var a=t.value;void 0===n[e(a).toString()]&&(n[e(a).toString()]=[]),n[e(a).toString()].push(a)}}catch(r){o.e(r)}finally{o.f()}return n},countDuplication:k,countBy:function(r,e){if(!b(r))throw new Error("The first paramenter only accept array");if(!O(e))throw new Error("The second paramenter only accept callback function");return r.filter((function(r){return e(r)})).length}}),F=Object.freeze({__proto__:null,remove:function(r){if(!v(r))throw new Error("This is object helper, you must provide the first argument in an object");for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("The next arguments must be in a string and at least one argument");for(var o=Object.assign({},r),a=0,i=t;a<i.length;a++){var u=i[a];u in o&&delete o[u]}return o},removeBy:M,merge:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e){for(var n={},o=new Map,a=0,i=e;a<i.length;a++)for(var u=i[a],l=0,f=Object.entries(u);l<f.length;l++){var c=h(f[l],2),s=c[0],m=c[1];o.has(s)||(o.set(s,m),n[s]=m)}return n}},replace:A,isObject:v,isObjectValues:function(r){return!!Object.values(r).filter((function(r){return""!==r&&0!==r&&r!=={}&&r!==[]})).join("")},invert:function(r){if(!v(r))throw new Error("You have to input object only here");var e=Object.keys(r),t=Object.values(r);return _(t,e)[0]},clone:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<1)throw new Error("In this argument must have at least one argument and please provide it in object type");return Object.assign.apply(Object,[{}].concat(e))}}),z=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|T|H{1,2}|h{1,2}|a|A|i{1,2}|s{1,2}|Z{1,2}|SSS/g,R=function(r){return"number"==typeof r||"string"==typeof r},Z=function(r){return"number"==typeof r||"string"==typeof r},G=function(r){return"number"==typeof r||"string"==typeof r},q=function(r){return!!("object"===a(new Date(r))&&null!==r||"string"==typeof r&&new RegExp(z).test(r))},W=function(r){return!("string"!=typeof r||!new RegExp($).test(r))},J=function(r){return r%400==0||r%100!=0&&r%4==0},K="Year must be in a number or a string type, the length of year either 4 or 2",V="Month must be in a number or a string type, the month number start from 1 to 12",Q="Date must be in a number or a string type, the date number start from 1 to 31",X="Full date must be in string or array type",rr=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t=[],n=4;n<=10;n++){var o=new Date(Date.UTC(2021,3,n));t.push(new Intl.DateTimeFormat(r,{weekday:e}).format(o))}return t},er=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);var t=[28,29,30,31],n=new Date(Date.UTC(Number(r),Number(e),0)).getUTCDate();return t.includes(n)?n:31},tr=function(r){if(!R(r))throw new Error(K);return J(r)?366:365},nr=function(r,e){if(!q(r))throw new Error("Error in the first argument: "+X);if(!q(e))throw new Error("Error in the second argument: "+X);var t=new Date(r),n=new Date(e);return(Number(n.getTime())-Number(t.getTime()))/864e5},or=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t=[],n=0;n<=11;n++){var o=Date.UTC(2021,n);t.push(new Intl.DateTimeFormat(r,{month:e}).format(new Date(o)))}return t},ar=function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!q(r))throw new Error('You\'re entering the wrong date string, please use this statement "new Date(\'yourdateParam\').toString()" instead or array "[year, monthIndex, dateNumber]"');if(!W(e))throw new Error("Please enter the correct date format");var o,a=new Date(r),i=e,u=e,l={YY:function(){var r=a.getFullYear().toString().slice(-2),e=a.getFullYear();return"00"!==r&&(e=Number(r)),e},YYYY:a.getFullYear(),M:Number(a.getMonth())+1,MM:function(){var r=Number(Number(a.getMonth())+1).toString();return 1===r.length?"0"+r:r},m:or(t,n)[a.getMonth()].slice(0,3),mm:or(t,n)[a.getMonth()],D:a.getDate,DD:function(){var r=a.getDate().toString(),e=r;1===r.length&&(e="0"+r);return e},d:rr(t,n)[a.getDay()].slice(0,3),dd:rr(t,n)[a.getDay()],H:a.getHours(),HH:function(){var r=a.getHours().toString();return 1===r.length?"0"+r:r},h:function(){var r=Number(a.getHours()+1),e=r;return r>12&&(e=r-(r-1)),e},hh:function(){var r=Number(a.getHours()+1),e=r;r>12&&(e=r-(r-1));var t=e.toString();return 1===t.length?"0"+t:t},k:function(){return 0===Number(a.getHours())?24:a.getHours()},kk:function(){var r=Number(a.getHours()).toString();if(1===r.length){var e="0"+r;return 0===Number(e)?24:e}return 0===Number(r)?24:r},i:a.getMinutes(),ii:function(){var r=a.getMinutes().toString();return 1===r.length?"0"+r:r},s:a.getSeconds(),ss:function(){var r=a.getSeconds().toString();return 1===r.length?"0"+r:r},uuu:a.getMilliseconds(),A:a.getHours()<12?"AM":"PM",a:a.getHours()<12?"am":"pm",Do:a.getDate().toString()+"st"},f=i.split(/-|\/|\.|:|\s/),h=g(f);try{for(h.s();!(o=h.n()).done;){var c=o.value;"YY"===c?u=u.replace(c,l.YY()):"YYYY"===c?u=u.replace(c,l.YYYY):"M"===c?u=u.replace(c,l.M):"MM"===c?u=u.replace(c,l.MM()):"m"===c?u=u.replace(c,l.m):"mm"===c?u=u.replace(c,l.mm):"D"===c?u=u.replace(c,l.D):"DD"===c?u=u.replace(c,l.DD()):"d"===c?u=u.replace(c,l.d):"dd"===c?u=u.replace(c,l.dd):"H"===c?u=u.replace(c,l.H):"HH"===c?u=u.replace(c,l.HH()):"h"===c?u=u.replace(c,l.h()):"hh"===c?u=u.replace(c,l.hh()):"k"===c?u=u.replace(c,l.k()):"kk"===c?u=u.replace(c,l.kk()):"i"===c?u=u.replace(c,l.i):"ii"===c?u=u.replace(c,l.ii()):"s"===c?u=u.replace(c,l.s):"ss"===c?u=u.replace(c,l.ss()):"uuu"===c?u=u.replace(c,l.uuu):"A"===c?u=u.replace(c,l.A):"a"===c?u=u.replace(c,l.a):"Do"===c&&(u=u.replace(c,l.Do))}}catch(r){h.e(r)}finally{h.f()}return u},ir=function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!q(r))throw new Error("On the first argument, you have to input only the correct date");if(!W(e))throw new Error("For format date, you must always input the correct one by using characters like these: Y, M, m, D, d, H, h, k, i, S, s, A, a or Do");var o=r.split(/-|\/|\.|T|Z|:|\s/).filter((function(r){return r.length>=1&&" "!==r})).map((function(r){return r.trim()})),a=e.split(/-|\/|\.|T|Z|:|\s/).filter((function(r){return r.length>=1&&" "!==r})).map((function(r){return r.trim()})),i={year:(new Date).getFullYear(),month:Number((new Date).getMonth())+1,day:(new Date).getDate(),hour:(new Date).getHours(),minute:(new Date).getMinutes(),second:(new Date).getSeconds(),millisecond:(new Date).getMilliseconds()};if(o.length!==a.length)throw new Error("The numbers and the formats must be in place, so when we check the length of both of these arguments then the result will be the same");for(var u=0;u<o.length;u++)4===o[u].length&&!1===isNaN(o[u])&&"YYYY"===a[u]||2===o[u].length&&!1===isNaN(o[u])&&"YY"===a[u]?i.year=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"M"===a[u]||"MM"===a[u]?i.month=Number(o[u])-1:3===o[u].length&&or(t,n).map((function(r){return r.slice(0,3)})).includes(o[u])&&"m"===a[u]?i.month=or(t,n).map((function(r){return r.slice(0,3)})).findIndex(o[u]):o[u].length>=3&&or(t,n).includes(o[u])&&"mm"===a[u]?i.month=or(t,n).findIndex(o[u]):1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"D"===a[u]||"DD"===a[u]?i.day=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"H"===a[u]||"HH"===a[u]?i.hour=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"h"===a[u]||"hh"===a[u]?i.hour=o[u]>12?Number(o[u])-(Number(o[u])-1):o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"k"===a[u]||"kk"===a[u]?i.hour=24===Number(o[u])?0:o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"i"===a[u]||"ii"===a[u]?i.minute=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"s"===a[u]||"ss"===a[u]?i.second=o[u]:o[u].length>=3&&!1===isNaN(o[u])&&"uuu"===a[u]?i.millisecond=o[u]:("st"===o[u].slice(-2)||"nd"===o[u].slice(-2)||"th"===o[u].slice(-2)&&"Do"===a[u])&&(i.second=Number(o[u].slice(0,-2)));return new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond).toString()},ur=function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!q(r))throw new Error("Please enter a date in correct way, either in string or array type");if(!e(t))throw new Error("Only accept number type on second argument");var o=new Date(r),a=Number(o.getDate())+Number(t),i=Number(er(Number(o.getFullYear()),o.getMonth()+1));if(a>i){var u=a-i;o=11===Number(o.getMonth())?new Date(Number(o.getFullYear())+1,0,u):new Date(Number(o.getFullYear()),Number(o.getMonth())+1,u)}else o=new Date(Number(o.getFullYear()),Number(o.getMonth()),a);var l=null!==n&&!1!==W(n)?ar(o,n):o;return l},lr=function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!q(n))throw new Error("Error in the first argument: "+X);if(!q(o))throw new Error("Error in the second argument: "+X);for(var n=new Date(r),o=new Date(e),a=[],i=n;i<=o;){var u=null!==t&&!1!==W(t)?ar(i,t):i;a.push(u),i=ur(i,1)}return a},fr=function(r,e,t){if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);if(!G(t))throw new Error(Q);var n=nr(new Date(Number(r),0,1),new Date(Number(r),Number(e)-1,Number(t))),o=Number(new Date(r,0,1).getDay()),a=0;o>0&&(a=6-(o-1));var i=Number(new Date(Number(r),Number(e)-1,Number(t)).getDay()),u=0;return i<6&&(u=6-i),Math.ceil((Number(n)+u-a)/7)},hr=function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!R(r))throw new Error(K);if(!e(t))throw new Error("You have to enter a number");if(!W(n))throw new Error("Please enter a format of date correctly");var o=Number(new Date(Number(r),0,1).getDay()),a=0;o>0&&(a=6-(o-1));for(var i=[],u=a+1,l=0,f=r,h=1;h<=Number(t);h++){if(h===Number(t)){i.push(ar(new Date(f,l,u),n));for(var c=0;c<6;)c++,i.push(ar(ur(new Date(f,l,u),c),n))}u+=7,l<12&&u>Number(er(r,l+1))&&(u-=Number(er(r,l+1)),11!==l?l+=1:(l=1,f+=1))}return i},cr=function(r,e){if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);for(var t=sr(r,52,"M"),n=[],o=0,a=Object.entries(t);o<a.length;o++){var i=h(a[o],2),u=i[0];i[1].includes(e.toString())&&n.push(u)}return 1===Number(e)?n.filter((function(r){return"52"!==r})):n},sr=function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!R(r))throw new Error(K);if(!e(t))throw new Error("You have to enter a number");if(!W(n))throw new Error("Please enter a format of date correctly");var o=Number(new Date(Number(r),0,1).getDay()),a=0;o>0&&(a=6-(o-1));for(var i={},u=a+1,l=0,f=r,h=1;h<=t;h++)i[h.toString()]=[ar(new Date(f,l,u),n),ar(ur(new Date(f,l,u),6),n)],u+=7,l<12&&u>Number(er(r,l+1))&&(u-=Number(er(r,l+1)),11!==l?l+=1:(l=1,f+=1));return i},mr=Object.freeze({__proto__:null,now:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=(new Date).toString();return"string"==typeof r&&(e=ar(e,r)),e},nowHijri:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",e=Date.UTC(Number((new Date).getFullYear()),Number((new Date).getMonth()),Number((new Date).getDate()),Number((new Date).getHours()),Number((new Date).getMinutes()),Number((new Date).getSeconds()),Number((new Date).getMilliseconds())),t=new Intl.DateTimeFormat(r,{calendar:"islamic",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h24"}).format(new Date(e));return t},parse:ir,parseDate:ir,utc:function(){return new Date(Date.UTC.apply(Date,arguments))},addDate:ur,subtractDate:function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!q(r))throw new Error("Please enter a date in correct way, either in string or array type");if(!e(t))throw new Error("Only accept number type on second argument");var o=new Date(r),a=Number(o.getDate())-Number(t),i=Number(er(Number(o.getFullYear()),o.getMonth()));if(a<1){var u=i+(a-1);o=0===Number(o.getMonth())?new Date(Number(o.getFullYear())-1,0,u):new Date(Number(o.getFullYear()),Number(o.getMonth())+1,u)}else o=new Date(Number(o.getFullYear()),Number(o.getMonth()),a);var l=null!==n&&!1!==W(n)?ar(o,n):o;return l},rangeDate:lr,day:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"en-US",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"long";if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);if(!G(t))throw new Error(Q);var a=new Date(Date.UTC(Number(r),Number(e)-1,Number(t)));return new Intl.DateTimeFormat(n,{weekday:o}).format(a)},days:rr,daysInMonth:er,daysInYear:tr,daysInBetween:nr,week:fr,weeks:hr,weeksInMonth:cr,weeksInYear:function(r){if(!R(r))throw new Error(K);var e=Number(new Date(Number(r),0,1).getDay()),t=0;e>0&&(t=6-(e-1));var n=Number(new Date(Number(r),11,31).getDay()),o=0;return n<6&&(o=6-n),Math.ceil((Number(tr(r))+o-t)/7)},month:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);var o=Date.UTC(r,Number(e)-1);return new Intl.DateTimeFormat(t,{month:n}).format(new Date(o))},months:or,isYear:R,isMonth:Z,isDate:G,isFullDate:q,isFormatDate:W,isLeapYear:J,calendar:function(r,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);if(!W(n))throw new Error("Please enter a format of date correctly");var a=rr(o),i=lr(new Date(r,Number(e)-1,1),new Date(r,Number(e)-1,er(r,e)),n),u=Number(new Date(r,Number(e)-1,1).getDay()),l=[];if(u>0){var f=u-1;l=lr(new Date(r,Number(e)-2,Number(er(r,Number(e)-1))-f),new Date(r,Number(e)-2,er(r,Number(e)-1)),n)}var h=Number(new Date(r,Number(e)-1,er(r,e)).getDay()),c=[];if(h<6){var s=6-(h+1);c=lr(new Date(r,Number(e),1),new Date(r,Number(e),1+s),n)}var m=[a,l,i,c];return!0===t?m.flat():m},daysInCalendar:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);if(!W(t))throw new Error("Please enter a format of date correctly");return lr(new Date(r,Number(e)-1,1),new Date(r,Number(e)-1,er(r,e)),t)},prevDaysInCalendar:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);if(!W(t))throw new Error("Please enter a format of date correctly");var n=Number(new Date(r,Number(e)-1,1).getDay()),o=[];if(n>0){var a=n-1;o=lr(new Date(r,Number(e)-2,Number(er(r,Number(e)-1))-a),new Date(r,Number(e)-2,er(r,Number(e)-1)),t)}return o},nextDaysInCalendar:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);if(!W(t))throw new Error("Please enter a format of date correctly");var n=Number(new Date(r,Number(e)-1,er(r,e)).getDay()),o=[];if(n<6){var a=6-(n+1);o=lr(new Date(r,Number(e),1),new Date(r,Number(e),1+a),t)}return o},weeklyCalendar:function(r,e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);if(!G(t))throw new Error(Q);if(!W(n))throw new Error("Please enter a format of date correctly");var a=rr(o),i=fr(r,e,t),u=hr(r,i,n);return _(a,u)[0]},calendarWithWeeks:function(r,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!R(r))throw new Error(K);if(!Z(e))throw new Error(V);if(!W(n))throw new Error("Please enter a format of date correctly");var a=rr(o),i=cr(r,e),u=[];0!==Number(new Date(r,Number(e)-1,1).getDay())&&1===Number(e)&&(u.push("52"),u.push(hr(Number(r)-1,52,n)));var l,f=g(i);try{for(f.s();!(l=f.n()).done;){var h=l.value;u.push(h),u.push(hr(r,h,n))}}catch(r){f.e(r)}finally{f.f()}var c=["Week",a].concat(u);return!0===t?c.flat():c},dateToArray:function(r){if(!q(r))throw new Error("Please enter a valid date");return new Date(r).toJSON().replace("Z","").split(/-|:|\s|\.|T/g)}}),gr=Object.freeze({__proto__:null,size:function(r,e){if(0===r)return"0 Bytes";var t=e||1,n=Math.floor(Math.log(r)/Math.log(1e3));return parseFloat((r/Math.pow(1e3,n)).toFixed(t))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][n]},name:function(r){if("string"==typeof r)return r.indexOf("",41)>40?r.slice(0,41)+"...":r},type:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type",t=r.split("/");return"format"==e?t.shift():t.pop(),t.join("")},image:function(r){if("name"in r&&"string"==typeof r.name)return URL.createObjectURL(r)},date:function(r){return new Date(r).toDateString()},loadImage:function(r){"name"in r&&"string"==typeof r.name&&URL.revokeObjectURL(r)},formatSize:function(r){for(var e=0,t=r,n=t.length,o=0;o<n;o++)e+=t[o].size;for(var a=e+" bytes",i=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],u=0,l=e/1024;l>1;l/=1024,u++)a=l.toFixed(3)+" "+i[u]+" ("+e+" bytes)";return a},humanSize:function(r){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=e?1e3:1024;if(Math.abs(r)<n)return r+" B";var o=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=-1,i=Math.pow(10,t);do{r/=n,++a}while(Math.round(Math.abs(r)*i)/i>=n&&a<o.length-1);return r.toFixed(t)+" "+o[a]},exported:function(r,e){if("object"===a(r)&&"string"==typeof e){var t=Array.from(r),n="";if("json"===e.toLowerCase())n="data:application/json;charset=utf-8,"+JSON.stringify(t,null,2);else if("csv"===e.toLowerCase()){var o,i="",u=g(t);try{for(u.s();!(o=u.n()).done;){var l=o.value;for(var f in l)i+=l[f]+",";i=i.trim().substring(0,i.length-1),i+="\n"}}catch(r){u.e(r)}finally{u.f()}n="data:text/csv;charset=utf-8,"+(i=i.trim().substring(0,i.length-1))}else if("sql"===e.toLowerCase()){var h="INSERT INTO `export_table` (";for(var c in t[0])h+="`"+c+"`,";h=h.trim().substring(0,h.length-1),h+=") VALUES ";var s,m=g(t);try{for(m.s();!(s=m.n()).done;){var v=s.value;for(var w in h+="(",v)h+="`"+v[w]+"`,";h=h.trim().substring(0,h.length-1),h+="),"}}catch(r){m.e(r)}finally{m.f()}h=h.trim().substring(0,h.length-1),n="data:application/sql;charset=utf-8,"+(h+=";")}else if("xml"===e.toLowerCase()){var d='<?xml version="1.0" encoding="UTF-8"?>\n<data>';for(var y in t){for(var b in d+="\n <entry>",y)d+="\n <"+b+"`>"+y[b]+"</"+b+"`>";d+="\n </entry>"}n="data:application/xml;charset=utf-8,"+(d+="\n</data>")}else if("vhs"===e.toLowerCase()){var p,N='//visit official site: http://vhs-file-format.glitch.me \n("data", [',E=g(t);try{for(E.s();!(p=E.n()).done;){var D=p.value;for(var A in N+='\n ("entry", [',D)N+='\n ("'+A+'", ',N+=D[A]+"),";N=N.trim().substring(0,N.length-1),N+="]),"}}catch(r){E.e(r)}finally{E.f()}N=N.trim().substring(0,N.length-1),n="data:application/vhs;charset=utf-8,"+(N="])")}return n}},download:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"txt",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"export-to";if("string"==typeof r){var n=t+"."+e.toLowerCase(),o=encodeURI(r),a=document.createElement("a");a.href=o,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a)}},printed:function(r){if("object"===a(r)){var e=Array.from(r),t=document.createElement("table"),n=document.createElement("thead"),o=document.createElement("tbody");t.appendChild(n),t.appendChild(o);var i=document.createElement("tr");for(var u in e[0]){var l=document.createElement("th");l.textContent=u.replace(/^\w/,(function(r){return r.toUpperCase()})),i.appendChild(l)}n.appendChild(i);for(var f=0,h=e;f<h.length;f++){var c=h[f],s=document.createElement("tr");for(var m in c){var g=document.createElement("td");g.textContent=c[m],s.appendChild(g)}o.appendChild(s)}var v=window.open();v.document.body.appendChild(t),v.focus(),v.print()}}}),vr=function(r,e,t){var n;if(t){var o=new Date;o.setTime(o.getTime()+24*t*60*60*1e3),n="expires="+o.toGMTString()}else n="";document.cookie=r+"="+e+"; SameSite=Lax;"+n+"; path=/"},wr=function(r){for(var e=r+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var o=t[n];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(e))return o.substring(e.length,o.length)}return null},dr=function(r){return"object"===("undefined"==typeof window?"undefined":a(window))&&"".concat(r,"Storage")in window},yr=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(dr(e))return!!window["".concat(e,"Storage")].getItem(r)},br=Object.freeze({__proto__:null,setCookie:vr,getCookie:wr,hasCookie:function(r){return!!wr(r)},removeCookie:function(r){vr(r,"",-1)},clearCookie:function(){for(var r=document.cookie.split(";"),e=0;e<r.length;e++){var t=r[e],n=t.indexOf("="),o=n>-1?t.substr(0,n):t;document.cookie=o+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}},isStorage:dr,isCookie:function(){return"object"===("undefined"==typeof document?"undefined":a(document))&&"cookie"in document},setStorage:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local";dr(t)&&window["".concat(t,"Storage")].setItem(r,e)},getStorage:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(dr(e))return window["".concat(e,"Storage")].getItem(r)},hasStorage:yr,removeStorage:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";dr(e)&&yr(r,e)&&window["".concat(e,"Storage")].removeItem(r)},clearStorage:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"local";dr(r)&&window["".concat(r,"Storage")].clear()}}),pr=Object.freeze({__proto__:null,ternary:function(r,e,t){if(!O(r)&&!O(e)&&!O(t))throw new Error("All arguments here only accept value in function");return r()?e():t()}});export{H as $array,d as $char,mr as $date,gr as $file,r as $int,w as $number,F as $object,y as $string,H as array,d as char,mr as date,gr as file,pr as func,r as int,w as number,F as object,br as storage,y as string};
var r=Object.freeze({__proto__:null,random:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:255,e=Number(r)+1;return Math.floor(Math.random()*e)}}),e=function(r){return!isNaN(r)&&"number"==typeof Number(r)},t=function(r){if("number"!=typeof r&&"string"!=typeof r)throw new Error("You must input only number format here");return 1===Math.sign(r)},n=function(r){if("number"!=typeof r&&"string"!=typeof r)throw new Error("You must input only number format here");return-1===Math.sign(r)},o=function(r){return"string"==typeof r};function a(r){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function i(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function u(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function l(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?u(Object(t),!0).forEach((function(e){i(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function f(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(r)))return;var t=[],n=!0,o=!1,a=void 0;try{for(var i,u=r[Symbol.iterator]();!(n=(i=u.next()).done)&&(t.push(i.value),!e||t.length!==e);n=!0);}catch(r){o=!0,a=r}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return t}(r,e)||c(r,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 h(r){return function(r){if(Array.isArray(r))return s(r)}(r)||function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}(r)||c(r)||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 c(r,e){if(r){if("string"==typeof r)return s(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(r,e):void 0}}function s(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function m(r,e){var t;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(t=c(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,o=function(){};return{s:o,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){t=r[Symbol.iterator]()},n:function(){var r=t.next();return i=r.done,r},e:function(r){u=!0,a=r},f:function(){try{i||null==t.return||t.return()}finally{if(u)throw a}}}}var g=function(r){return"object"===a(r)&&null!==r&&"[object Object]"===Object.prototype.toString.call(r)},w=Object.freeze({__proto__:null,random:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if("number"!=typeof r&&r<=0)throw new Error("You have to add a number at least 1");for(var e="",t="0123456789",n=0;n<r;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},loop:function(r,e){if("number"!=typeof r&r<=-1)throw new Error("Only accept number here, start from 0");if("number"!=typeof e&e<=0)throw new Error("Only accept number here, start from 1");for(var t=[];r<=e;)t.push(r++);return t},isNumber:e,isPositive:t,isNegative:n,calc:function(r,t,n){if(!e(r))throw new Error("This is left operand and must be in number type");if(!e(t))throw new Error("This is left operand and must be in number type");if(!o(n))throw new Error("Operator must be one of these: add, subtract, multiply, divide, reminder or exponent");var a=0;return"add"===n||"addition"===n||"plus"===n||"+"===n?a=Number(r)+Number(t):"subtract"===n||"subtraction"===n||"minus"===n||"-"===n?a=Number(r)-Number(t):"multiply"===n||"multiplication"===n||"×"===n||"*"===n?a=Number(r)*Number(t):"divide"===n||"division"===n||"÷"===n||"/"===n?a=Number(r)/Number(t):"remainder"===n||"modulo"===n||"%"===n?a=Number(r)%Number(t):"exponent"!==n&&"exponentiation"!==n&&"**"!==n||(a=Math.pow(Number(r),Number(t))),a},currency:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e(r))throw new Error("Amount must be in a number type");if(!o(t)&&3===t.length)throw new Error("Currency code must have at least 3 uppercase character");if(!o(n))throw new Error("Locale code must contain 2 languages and 2 country code and separated by dash (-)");if(!g(a))throw new Error("Currency options must be in object type");return new Intl.NumberFormat(n,l({style:"currency",currency:t.toUpperCase()},a)).format(r)}}),v=Object.freeze({__proto__:null,random:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_~!@#$%^&*()+={}[]|:;<>,./?";"short"===e||"alphadash"===e?n=n.slice(0,64):"narrow"===e||"alphanumeric"===e?n=n.slice(0,62):"alpha"===e?n=n.slice(10,62):"hex"===e?n=n.slice(0,16):"number"!==e&&"numeric"!==e||(n=n.slice(0,10));for(var o=0;o<r;o++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}}),d=Object.freeze({__proto__:null,split:function(r){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];return"string"==typeof r&&(e>=1&&n.push(r.slice(0,e)),null!==t?(n.push(r.slice(e,t)),n.push(r.slice(t))):n.push(r.slice(e))),n}},capitalize:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"single";if("string"==typeof r){var t=r;return t="multiple"===e?t.toLowerCase().replace(/\w\S*/g,(function(r){return r.replace(/^\w/,(function(r){return r.toUpperCase()}))})):t.trimStart().replace(/^\w/,(function(r){return r.toUpperCase()}))}},includes:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return-1!==r.indexOf(e,t)},isString:o}),y=function(r){return!("object"!==a(r)||null===r||!Array.isArray(r))},p=function(r){if(!y(r))throw new Error("On the first argument must be in array type");for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("On the next arguments, you have to provide at least one argument");var o=Array.from(r);return o.unshift.apply(o,t),o},b=function(r){if(!y(r))throw new Error("On the first argument must be in array type");for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("On the next arguments, you have to provide at least one argument");var o=Array.from(r);return o.push.apply(o,t),o},N=function(r,t){if(!y(r))throw new Error("On the first argument, here only accept array type");if(!e(t))throw new Error("On the second argument, accept only numeric or number type");for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];if(o.length<1)throw new Error("On the next arguments, you have to enter at least one value");var i=Array.from(r),u=isNaN(t)?1:t;return i.splice.apply(i,[Number(u)-1,0].concat(o)),i},E=function(r,t){if(!y(r))throw new Error("On the first argument, here only accept array type");if(!e(t))throw new Error("On the second argument, accept only numeric or number type");for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];if(o.length<1)throw new Error("On the next arguments, you have to enter at least one value");var i=Array.from(r),u=isNaN(t)?0:t;return i.splice.apply(i,[Number(u)+1,0].concat(o)),i},D=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{key:"id",value:0};if(!y(r))throw new Error("You must enter the first argument in array only");var t=Array.from(r),n=-1;return"key"in e&&"value"in e?n=t.length>=1?t.findIndex((function(r){return r[e.key]===e.value})):-1:t.length>=1&&(n=t.findIndex((function(r){for(var t=0,n=Object.entries(e);t<n.length;t++){var o=f(n[t],2),a=o[0],i=o[1];if(a in r&&r[a]===i)return!0}}))),n},A=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dense";if(!y(r))throw new Error("You must enter the first argument in array only");return"sparse"===e?Object.keys(r).map((function(r){return Number(r)})):h(r.keys())},Y=function(r){if(!y(r))throw new Error("You must enter the argument in array only");var e=A(r);return Number(e[Math.floor(Math.random()*e.length)])},O=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e){for(var n={},o=0,a=e;o<a.length;o++)for(var i=a[o],u=0,l=Object.entries(i);u<l.length;u++){var h=f(l[u],2),c=h[0],s=h[1];n[c]=s}return n}},S=function(r){if(!y(r))throw new Error("Please provide array that you want to remove its element");for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("On the last of argument, you have to enter at least one argument");for(var o=Array.from(r),i=[],u=function(){var r=f[l];if("string"==typeof r&&"first"===r)o=o.map((function(r,e){return 0===e?null:r})),i=o;else if("string"==typeof r&&"last"===r)o=o.map((function(r,e){return e===o.length-1?null:r})),i=o;else if("number"==typeof r)o=o.map((function(e,t){return t===r?null:e})),i=o;else if("object"===a(r)&&null!==r){var e=D(o,r);o=o.map((function(r,t){return t===e?null:r})),i=o}},l=0,f=t;l<f.length;l++)u();return i.filter((function(r){return null!==r}))},j=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!y(r))throw new Error("");var t=Array.from(r),n=[];if("string"==typeof e){var o,a=new Set,i=m(t);try{for(i.s();!(o=i.n()).done;){var u=o.value;a.has(u[e])||a.add(u[e])}}catch(r){i.e(r)}finally{i.f()}n=h(a)}else n=Array.from(new Set(t));return n},M=function(r){if(!g(r))throw new Error("This is object helper, you must provide the first argument in an object");for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("The next arguments must be in a string or in a number and at least one argument");for(var o={},a=new Set(t),i=0,u=Object.entries(r);i<u.length;i++){var l=f(u[i],1),h=l[0];a.has(r[h])||(o[h]=r[h])}return o},T=function(r,t){if(!y(r))throw new Error("The first argument must be in array of objects");if(!g(t))throw new Error("The second argument must be in object type and must have at least one property");for(var n=Array.from(r),a=function(){var r=f(u[i],2),t=r[0],a=r[1],l=n.filter((function(r){if(t in r){if(e(r[t])&&Number(r[t])===Number(a))return!0;if(o(r[t])&&r[t].toLowerCase().includes(a.toLowerCase()))return!0}return!1}));n=l},i=0,u=Object.entries(M(t,"",0));i<u.length;i++)a();return n},x=function(r){return"function"==typeof r},C=function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";if(!y(r))throw new Error("Only array of objects accepted");if(!o(t))throw new Error("The second argument must be in a string and a value must be object property key or name");if(!o(n))throw new Error('The third argument must be in a string and a value either "", "asc" or "desc"');var a=Array.from(r);return"asc"===n?a.sort((function(r,n){if(t in r&&t in n){if(e(r[t])&&e(n[t]))return Number(r[t])-Number(n[t]);if(o(r[t])&&o(n[t])){var a=r[t].toLowerCase(),i=n[t].toLowerCase(),u=0;return a<i?u=-1:a>i&&(u=1),u}}})):"desc"===n&&a.sort((function(r,n){if(t in r&&t in n){if(e(r[t])&&e(n[t]))return Number(n[t])-Number(r[t]);if(o(r[t])&&o(n[t])){var a=r[t].toLowerCase(),i=n[t].toLowerCase(),u=0;return i<a?u=-1:i>a&&(u=1),u}}})),a},k=function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!y(r))throw new Error("On the first argument, here only accept array");if(!e(t))throw new Error("This is the page active number, please enter number only");if(!e(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var o=Array.from(r),a=Number(n)*Number(t)-(Number(n)-1),i=Number(n)*Number(t);return{from:a,to:i<=o.length?i:o.length,of:o.length}},B=function(r){if(!y(r))throw new Error("This argument only accept array");var e,t={},n=new Set,o=m(new Set(r));try{var a=function(){var o=e.value,a=Array.from(r).filter((function(r){return r===o}));n.has(a.length)||(n.add(a.length),t[a.length]=[]),a.forEach((function(r){t[a.length].push(r)}))};for(o.s();!(e=o.n()).done;)a()}catch(r){o.e(r)}finally{o.f()}return t},I=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");var n=[],o={};e.forEach((function(r,e){if(y(r)?o[e]=new Set(r):o[e]=(new Set).add(r),0!==e){var t,a=m(r);try{for(a.s();!(t=a.n()).done;){var i=t.value;o[e-1].has(i)&&n.push(i)}}catch(r){a.e(r)}finally{a.f()}}}));var a=B(n);return Array.from(new Set(a[e.length-1]))},_=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(!y(r)&&r.length<=0)throw new Error("You need to provide more values to your array");if(!t&&t.length<=0)throw new Error("You have to provide here at least 1 value");var o,a=[],i=m(r);try{for(i.s();!(o=i.n()).done;){var u=o.value;t.flat().includes(u)||a.push(u)}}catch(r){i.e(r)}finally{i.f()}return a},L=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<2&&!y(e[0])&&!y(e[1])&&Number(e[0].length)!==Number(e[1].length))throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(e[0]).map((function(r){return[]})),o=0,a=e;o<a.length;o++){var i=a[o];i.forEach((function(r,e){e in n&&n[e].push(r)}))}return n},P=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(e),o=[],a=n.shift(),i=function(){var r=l[u],e=new Map;r.forEach((function(r,t){a[t]&&e.set(a[t],r)})),o.push(Object.fromEntries(e))},u=0,l=n;u<l.length;u++)i();return o},U=function(){if(0===arguments.length||arguments.length>=4)throw new Error("Here only accept 3 arguments, so you have to provide at least 1 argument");var r=1===arguments.length?0:Number(arguments.length<=0?void 0:arguments[0]),e=Number(arguments.length>=2?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0]),o=3===arguments.length?Number(arguments.length<=2?void 0:arguments[2]):1;arguments.length<3&&n(e)&&(o=-1);var a=[],i=0,u=0;if(n(r)&&t(e)?i=r-1:t(r)&&n(e)?i=r+1:t(r)&&t(e)?i=r-1:n(r)&&n(e)&&(i=r+1),i<e){for(;i<e;)i++,o>1?(u+=o)<e&&a.push(u):i<e&&a.push(i);0!==r||a.includes(0)||a.unshift(0)}else if(i>e){for(;i>e;)i--,o<-1?(u-=o)>e&&a.unshift(u):i>e&&a.unshift(i);0!==r||a.includes(0)||a.push(0)}return 1===a.length&&0===a[0]?[]:a},F=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Accept index of array elements only and you add at least one index in number");return function(r){if(!y(r))throw new Error("Please enter array only here");for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(0===n.length&&n.length!==e.length&&0!==I(e,n).length)throw new Error("Only accept index of array elements and the number of the first indexes must be the same as the second indexes and also, both indexes must be different");for(var a=Array.from(r),i=Array.from(r),u=0;u<e.length;u++)void 0!==e[u]&&void 0!==n[u]&&(i.splice(e[u],1,a[n[u]]),i.splice(n[u],1,a[e[u]]));return i}},H=function(r,e,t){if(!y(r))throw new Error("On the first argument, you have to provide array only");if(!o(e))throw new Error("New property must be in string type");if(!x(t))throw new Error("Callback must be in function or method");return Array.from(r).map((function(r){return r[e]=t.apply(void 0,h(Object.values(r).filter((function(r){return!1===isNaN(r)})))),r}))},z=Object.freeze({__proto__:null,insert:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{position:null,index:null};if(!y(r))throw new Error("On the first argument, only array accept here");if(!g(e))throw new Error("On the second argument, only object with 2 properties (position and index property) accepted");for(var t=arguments.length,n=new Array(t>2?t-2:0),o=2;o<t;o++)n[o-2]=arguments[o];if(n.length<1)throw new Error("On the third or the next arguments, you have to enter at least one argument");var a=[];return"first"===e.position?a=p.apply(void 0,[r].concat(n)):"last"===e.position?a=b.apply(void 0,[r].concat(n)):"before"===e.position?a=N.apply(void 0,[r,e.index].concat(n)):"after"===e.position&&(a=E.apply(void 0,[r,e.index].concat(n))),a},insertFirst:p,insertLast:b,insertBefore:N,insertAfter:E,update:function(r,t,n){if(!y(r))throw new Error("You have to enter array only on the first argument");if(!g(t))throw new Error("You must enter object only here on the second argument");if(!g(n)&&!e(n))throw new Error("You must enter object only on the second argument");var o=Array.from(r),a=g(n)?D(o,n):Number(n);return o.map((function(r,e){var n=r;return e===a&&(n=O(r,t)),n}))},updateBy:function(r,e,t){if(!y(r))throw new Error("You have to enter array only on the first argument");if(!g(e))throw new Error("You must enter object only here on the second argument");if(!y(t))throw new Error("You must enter array of objects or numbers on the second argument");var n=Array.from(r);return n.map((function(r,o){var a,i=r,u=m(t);try{for(u.s();!(a=u.n()).done;){var l=a.value;o===(g(l)?D(n,l):Number(l))&&(i=O(r,e))}}catch(r){u.e(r)}finally{u.f()}return i}))},destroy:S,select:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(!y(r))throw new Error("On the first argument, you have to provide array only");if(t.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(r);return o.map((function(r){var e,n={},o=m(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;a in r&&(n[a]=r[a])}}catch(r){o.e(r)}finally{o.f()}return n}))},hidden:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(!y(r))throw new Error("On the first argument, you have to provide array only");if(t.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(r);return o.map((function(r){var e,n=r,o=m(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;a in r&&delete n[a]}}catch(r){o.e(r)}finally{o.f()}return n}))},toggle:function(r){return function(e){var t=Array.from(e);if(t.includes(r)){var n=t.findIndex((function(e){return e===r}));t.splice(n,1)}else t.push(r);return t}},flatten:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],n={};n.id=e.id||"id",n.parent=e.parent||"parent",n.children=e.children||"children";var o=function(){Array.from(r).forEach((function(r){if("object"===a(r)&&null!==r){var e=r;e[n.parent]="0","object"===a(e[n.children])&&Array.isArray(e[n.children])&&(i(e[n.children],r),delete e[n.children]),t.push(e)}}))},i=function r(e,o){e.length>=1&&Array.from(e).forEach((function(e){if("object"===a(e)&&null!==e){var i=e;i[n.parent]=o[n.id],"object"===a(i[n.children])&&Array.isArray(i[n.children])&&(r(i[n.children],e),delete i[n.children]),t.push(i)}}))};return o(),t},nested:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],n=Array.from(r),o={};o.id=e.id||"id",o.parent=e.parent||"parent",o.children=e.children||"children";var i=function(r){r.forEach((function(r){if("object"===a(r)&&null!==r){var e=null;("string"==typeof r[o.parent]&&"0"===r[o.parent]||"number"==typeof r[o.parent]&&0===r[o.parent])&&(e=u(r)),null!==e&&t.push(e)}}))},u=function(r){var e=r;return void 0!==r[o.children]&&null!==r[o.children]||(e[o.children]=l(r[o.id]),e[o.children].length<=0&&delete e[o.children]),delete e[o.parent],e},l=function(r){var e=[];return f(r).length>=1&&f(r).forEach((function(r){e.push(u(r))})),e},f=function(r){return n.filter((function(e){return e.parent===r}))};return i(n),t},index:D,toIndex:A,randomIndex:Y,search:function(r){if(!y)throw new Error("The first argument must be in array");for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];if(n.length<1)throw new Error("On the next arguments, you must provide at least one argument in either string or number");for(var i=[],u=function(){var t=h[l],n=Array.from(r).filter((function(r){if(e(r)&&Number(r)===Number(t))return!0;if(o(r)&&r.toLowerCase().includes(t.toLowerCase()))return!0;if(g(r))for(var n=0,a=Object.entries(r);n<a.length;n++){var i=f(a[n],2),u=i[0],l=i[1];if(e(r[u])&&Number(l)===Number(t))return!0;if(o(r[u])&&l.toLowerCase().includes(t.toLowerCase()))return!0}return!1}));i=j(i.concat(n))},l=0,h=n;l<h.length;l++)u();return i},searchBy:function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];if(t.length<1)throw new Error("This argument must have at least one argument in either string or number");return function(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];if(!y(r))throw new Error("Array of objects is needed in order to be searched");if(a.length<1)throw new Error("The last argument required at least one argument in either string or number");var u,l=[],f=m(t);try{var h=function(){var t=u.value,n=Array.from(r).filter((function(r){for(var n=0,i=Array.from(a);n<i.length;n++){var u=i[n];if(u in r){if(e(r[u])&&Number(r[u])===Number(t))return!0;if(o(r[u])&&-1!==r[u].toLowerCase().indexOf(t.toLowerCase()))return!0}}return!1}));l=j(l.concat(n))};for(f.s();!(u=f.n()).done;)h()}catch(r){f.e(r)}finally{f.f()}return l}},filter:T,filtered:T,sort:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";if(!y(r))throw new Error("Only array of strings or numbers accepted");if(!o(t))throw new Error('The second argument must be in a string and a value either "", "asc" or "desc"');var n=Array.from(r);return"asc"===t?n.sort((function(r,t){if(e(r)&&e(t))return Number(r)-Number(t);if(o(r)&&o(t)){var n=r.toLowerCase(),a=t.toLowerCase(),i=0;return n<a?i=-1:n>a&&(i=1),i}})):"desc"===t&&n.sort((function(r,t){if(e(r)&&e(t))return Number(t)-Number(r);if(o(r)&&o(t)){var n=r.toLowerCase(),a=t.toLowerCase(),i=0;return a<n?i=-1:a>n&&(i=1),i}})),n},sortBy:C,sorted:C,sortWith:function(r,e){if(!y(r))throw new Error("The first argument must be in an array type");if(!x(e))throw new Error("The second argument is a compare or callback function");var t=Array.from(r);return t.sort((function(r,t){return-1===Math.sign(e(r,t))?-1:1})),t},paginate:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!y(r))throw new Error("On the first argument, here only accept array");if(!e(t))throw new Error("This is the page active number, please enter number only");if(!e(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var o=Array.from(r),a=Number(n)*Number(t)-(Number(n)-1),i=Number(n)*Number(t);return o.slice(a-1,i<=o.length?i:o.length)},pages:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(!y(r))throw new Error("On the first argument, here only accept array");if(!e(t))throw new Error("This is the limit of entries in one page in a number, please enter number only");var n=Array.from(r),o=n.length/Number(t),a=Math.ceil(o);return a},pageInfo:k,show:k,pagination:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e(r))throw new Error("This is the total or all pages in numbers, please enter number only");if(!e(t))throw new Error("This is the page active number, please enter number only");if(!e(n))throw new Error("This is the position of ellipsis [...], please enter number only");var o=[],a=Number(r)<Number(t)?Number(r):Number(t),i=Number(t)<1?1:Number(t),u=a+Number(n),l=i-Number(n);if(0===Number(n))for(var f=1;f<=Number(r);f++)o.push(f);else{if(i>1)for(var h=l;h<i;h++)o.push(h);for(var c=a;c<=u;c++)o.push(c)}var s=o.filter((function(r){return r>0})),m=s.filter((function(e){return e<=Number(r)}));return u<Number(r)&&0!==Number(n)&&m.push("..."),l>1&&0!==Number(n)&&m.unshift("..."),m},sum:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!y(r))throw new Error("In the first argument, you must enter a data in array");var t=Array.from(r),n=0;if("string"==typeof e&&""!==e){var o=t.map((function(r){return e in r?Number(r[e]):0}));n=o.reduce((function(r,e){return Number(r)+Number(e)}))}else n=t.reduce((function(r,e){return Number(r)+Number(e)}));return n},calculate:H,calc:H,unique:j,isArray:y,isSuperset:function(r,e){if(!y(r)&&!y(e))throw new Error("The both of arguments must be in arrays");var t,n=new Set(r),o=m(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(!n.has(a))return!1}}catch(r){o.e(r)}finally{o.f()}return!0},union:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return Array.from(new Set(e.flat()))},intersection:I,difference:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");var n=new Set,o=I.apply(void 0,e);return e.forEach((function(r){if(!y(r))throw new Error("Here only accept arrays from all arguments");var e,t=m(r);try{for(t.s();!(e=t.n()).done;){var a=e.value;o.includes(a)||n.has(a)||n.add(a)}}catch(r){t.e(r)}finally{t.f()}})),Array.from(n)},asymmetricDifference:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");for(var n=new Set,o=[],a=0,i=e;a<i.length;a++){var u=i[a];if(!y(u))throw new Error("Here only accept arrays from all arguments");u.forEach((function(r){n.has(r)?(n.delete(r),o.push(r)):o.includes(r)||n.add(r)}))}return Array.from(n)},complement:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 1 value");var n=Array.from(e);n.shift();var o=new Set(_.apply(void 0,[e[0]].concat(h(n))));return Array.from(o)},without:_,transpose:L,zip:P,unzip:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var n=Array.from(e),o=Object.keys(n[0]),a={},i=0,u=o;i<u.length;i++){var l=u[i];a[l]=[]}for(var f=0,c=n;f<c.length;f++){var s=c[f];for(var m in s)a[m].push(s[m])}return[o].concat(h(L.apply(void 0,h(Object.values(a)))))},range:U,move:function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Only accept index of array elements and you must input at least one index in number type");return function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!y(r))throw new Error("Please enter array only here");if(!e(n))throw new Error("Input only index number here");var a,i=Array.from(r),u=[],l=m(t);try{for(l.s();!(a=l.n()).done;){var f=a.value;void 0!==i[Number(f)]&&u.push(i[Number(f)])}}catch(r){l.e(r)}finally{l.f()}var h=S.apply(void 0,[i].concat(t));return h.splice.apply(h,[n,o].concat(u)),h}},switched:F,transfer:function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Only accept index of array elements and you must enter at least one index in number type");return function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!y(r))throw new Error("Accept array only here");if(!y(n))throw new Error("Accept array only here");if(!e(o))throw new Error("Input only index number here");var a,i=Array.from(r),u=Array.from(n),l=[],f=m(t);try{for(f.s();!(a=f.n()).done;){var h=a.value;void 0!==i[Number(h)]&&l.push(i[Number(h)])}}catch(r){f.e(r)}finally{f.f()}var c=null===o?Number(u.length):o;u.splice.apply(u,[c,0].concat(l));var s=S.apply(void 0,[i].concat(t));return{from:s,to:u}}},compact:function(r){if(!y(r))throw new Error("Enter only array type here");return Array.from(r).filter((function(r){return null!=r&&!1!==r&&!isNaN(r)&&""!==r&&r>0}))},chunk:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!y(r)&&r.length<=2)throw new Error("Please insert array only on the first argument and must have 3 values at least");if("number"!=typeof e)throw new Error("On the second argument, you must input in a number type only");var t,n=U(e,r.length,e),o=[],a=m(n);try{for(a.s();!(t=a.n()).done;){var i=t.value,u=r.slice(Number(i)-Number(e),i);o.push(u)}}catch(r){a.e(r)}finally{a.f()}return n[Number(n.length)-1]<=r.length&&o.push(r.slice(n[Number(n.length)-1],r.length)),o},shuffle:function(r){if(!y(r)&&r.length<=2)throw new Error("This shuffle method only work on data in array type");for(var e=Array.from(r),t=Number(e.length)-1;t>2;t--){var n=e.slice(0,Number(t)+1);e=F(t)(e,Y(n))}return e},group:function(r,e){if(!y(r))throw new Error("You must enter array literal here");if(!x(e))throw new Error("You have to enter a function or callback on the second argument");var t,n={},o=m(r);try{for(o.s();!(t=o.n()).done;){var a=t.value;void 0===n[e(a).toString()]&&(n[e(a).toString()]=[]),n[e(a).toString()].push(a)}}catch(r){o.e(r)}finally{o.f()}return n},countDuplication:B,countBy:function(r,e){if(!y(r))throw new Error("The first paramenter only accept array");if(!x(e))throw new Error("The second paramenter only accept callback function");return r.filter((function(r){return e(r)})).length}}),$=Object.freeze({__proto__:null,remove:function(r){if(!g(r))throw new Error("This is object helper, you must provide the first argument in an object");for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(t.length<1)throw new Error("The next arguments must be in a string and at least one argument");for(var o=Object.assign({},r),a=0,i=t;a<i.length;a++){var u=i[a];u in o&&delete o[u]}return o},removeBy:M,merge:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e){for(var n={},o=new Map,a=0,i=e;a<i.length;a++)for(var u=i[a],l=0,h=Object.entries(u);l<h.length;l++){var c=f(h[l],2),s=c[0],m=c[1];o.has(s)||(o.set(s,m),n[s]=m)}return n}},replace:O,isObject:g,isObjectValues:function(r){return!!Object.values(r).filter((function(r){return""!==r&&0!==r&&r!=={}&&r!==[]})).join("")},invert:function(r){if(!g(r))throw new Error("You have to input object only here");var e=Object.keys(r),t=Object.values(r);return P(t,e)[0]},clone:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<1)throw new Error("In this argument must have at least one argument and please provide it in object type");return Object.assign.apply(Object,[{}].concat(e))}}),R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Z=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|T|H{1,2}|h{1,2}|a|A|i{1,2}|s{1,2}|Z{1,2}|SSS/g,G=function(r){return"number"==typeof r||"string"==typeof r},q=function(r){return"number"==typeof r||"string"==typeof r},W=function(r){return"number"==typeof r||"string"==typeof r},J=function(r){return!!("object"===a(new Date(r))&&null!==r||"string"==typeof r&&new RegExp(R).test(r))},K=function(r){return!("string"!=typeof r||!new RegExp(Z).test(r))},V=function(r){return r%400==0||r%100!=0&&r%4==0},Q="Year must be in a number or a string type, the length of year either 4 or 2",X="Month must be in a number or a string type, the month number start from 1 to 12",rr="Date must be in a number or a string type, the date number start from 1 to 31",er="Full date must be in string or array type",tr=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t=[],n=4;n<=10;n++){var o=new Date(Date.UTC(2021,3,n));t.push(new Intl.DateTimeFormat(r,{weekday:e}).format(o))}return t},nr=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);var t=[28,29,30,31],n=new Date(Date.UTC(Number(r),Number(e),0)).getUTCDate();return t.includes(n)?n:31},or=function(r){if(!G(r))throw new Error(Q);return V(r)?366:365},ar=function(r,e){if(!J(r))throw new Error("Error in the first argument: "+er);if(!J(e))throw new Error("Error in the second argument: "+er);var t=new Date(r),n=new Date(e);return(Number(n.getTime())-Number(t.getTime()))/864e5},ir=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",t=[],n=0;n<=11;n++){var o=Date.UTC(2021,n);t.push(new Intl.DateTimeFormat(r,{month:e}).format(new Date(o)))}return t},ur=function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!J(r))throw new Error('You\'re entering the wrong date string, please use this statement "new Date(\'yourdateParam\').toString()" instead or array "[year, monthIndex, dateNumber]"');if(!K(e))throw new Error("Please enter the correct date format");var o,a=new Date(r),i=e,u=e,l={YY:function(){var r=a.getFullYear().toString().slice(-2),e=a.getFullYear();return"00"!==r&&(e=Number(r)),e},YYYY:a.getFullYear(),M:Number(a.getMonth())+1,MM:function(){var r=Number(Number(a.getMonth())+1).toString();return 1===r.length?"0"+r:r},m:ir(t,n)[a.getMonth()].slice(0,3),mm:ir(t,n)[a.getMonth()],D:a.getDate,DD:function(){var r=a.getDate().toString(),e=r;1===r.length&&(e="0"+r);return e},d:tr(t,n)[a.getDay()].slice(0,3),dd:tr(t,n)[a.getDay()],H:a.getHours(),HH:function(){var r=a.getHours().toString();return 1===r.length?"0"+r:r},h:function(){var r=Number(a.getHours()+1),e=r;return r>12&&(e=r-(r-1)),e},hh:function(){var r=Number(a.getHours()+1),e=r;r>12&&(e=r-(r-1));var t=e.toString();return 1===t.length?"0"+t:t},k:function(){return 0===Number(a.getHours())?24:a.getHours()},kk:function(){var r=Number(a.getHours()).toString();if(1===r.length){var e="0"+r;return 0===Number(e)?24:e}return 0===Number(r)?24:r},i:a.getMinutes(),ii:function(){var r=a.getMinutes().toString();return 1===r.length?"0"+r:r},s:a.getSeconds(),ss:function(){var r=a.getSeconds().toString();return 1===r.length?"0"+r:r},uuu:a.getMilliseconds(),A:a.getHours()<12?"AM":"PM",a:a.getHours()<12?"am":"pm",Do:a.getDate().toString()+"st"},f=i.split(/-|\/|\.|:|\s/),h=m(f);try{for(h.s();!(o=h.n()).done;){var c=o.value;"YY"===c?u=u.replace(c,l.YY()):"YYYY"===c?u=u.replace(c,l.YYYY):"M"===c?u=u.replace(c,l.M):"MM"===c?u=u.replace(c,l.MM()):"m"===c?u=u.replace(c,l.m):"mm"===c?u=u.replace(c,l.mm):"D"===c?u=u.replace(c,l.D):"DD"===c?u=u.replace(c,l.DD()):"d"===c?u=u.replace(c,l.d):"dd"===c?u=u.replace(c,l.dd):"H"===c?u=u.replace(c,l.H):"HH"===c?u=u.replace(c,l.HH()):"h"===c?u=u.replace(c,l.h()):"hh"===c?u=u.replace(c,l.hh()):"k"===c?u=u.replace(c,l.k()):"kk"===c?u=u.replace(c,l.kk()):"i"===c?u=u.replace(c,l.i):"ii"===c?u=u.replace(c,l.ii()):"s"===c?u=u.replace(c,l.s):"ss"===c?u=u.replace(c,l.ss()):"uuu"===c?u=u.replace(c,l.uuu):"A"===c?u=u.replace(c,l.A):"a"===c?u=u.replace(c,l.a):"Do"===c&&(u=u.replace(c,l.Do))}}catch(r){h.e(r)}finally{h.f()}return u},lr=function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!J(r))throw new Error("On the first argument, you have to input only the correct date");if(!K(e))throw new Error("For format date, you must always input the correct one by using characters like these: Y, M, m, D, d, H, h, k, i, S, s, A, a or Do");var o=r.split(/-|\/|\.|T|Z|:|\s/).filter((function(r){return r.length>=1&&" "!==r})).map((function(r){return r.trim()})),a=e.split(/-|\/|\.|T|Z|:|\s/).filter((function(r){return r.length>=1&&" "!==r})).map((function(r){return r.trim()})),i={year:(new Date).getFullYear(),month:Number((new Date).getMonth())+1,day:(new Date).getDate(),hour:(new Date).getHours(),minute:(new Date).getMinutes(),second:(new Date).getSeconds(),millisecond:(new Date).getMilliseconds()};if(o.length!==a.length)throw new Error("The numbers and the formats must be in place, so when we check the length of both of these arguments then the result will be the same");for(var u=0;u<o.length;u++)4===o[u].length&&!1===isNaN(o[u])&&"YYYY"===a[u]||2===o[u].length&&!1===isNaN(o[u])&&"YY"===a[u]?i.year=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"M"===a[u]||"MM"===a[u]?i.month=Number(o[u])-1:3===o[u].length&&ir(t,n).map((function(r){return r.slice(0,3)})).includes(o[u])&&"m"===a[u]?i.month=ir(t,n).map((function(r){return r.slice(0,3)})).findIndex(o[u]):o[u].length>=3&&ir(t,n).includes(o[u])&&"mm"===a[u]?i.month=ir(t,n).findIndex(o[u]):1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"D"===a[u]||"DD"===a[u]?i.day=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"H"===a[u]||"HH"===a[u]?i.hour=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"h"===a[u]||"hh"===a[u]?i.hour=o[u]>12?Number(o[u])-(Number(o[u])-1):o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"k"===a[u]||"kk"===a[u]?i.hour=24===Number(o[u])?0:o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"i"===a[u]||"ii"===a[u]?i.minute=o[u]:1===o[u].length||2===o[u].length&&!1===isNaN(o[u])&&"s"===a[u]||"ss"===a[u]?i.second=o[u]:o[u].length>=3&&!1===isNaN(o[u])&&"uuu"===a[u]?i.millisecond=o[u]:("st"===o[u].slice(-2)||"nd"===o[u].slice(-2)||"th"===o[u].slice(-2)&&"Do"===a[u])&&(i.second=Number(o[u].slice(0,-2)));return new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond).toString()},fr=function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!J(r))throw new Error("Please enter a date in correct way, either in string or array type");if(!e(t))throw new Error("Only accept number type on second argument");var o=new Date(r),a=Number(o.getDate())+Number(t),i=Number(nr(Number(o.getFullYear()),o.getMonth()+1));if(a>i){var u=a-i;o=11===Number(o.getMonth())?new Date(Number(o.getFullYear())+1,0,u):new Date(Number(o.getFullYear()),Number(o.getMonth())+1,u)}else o=new Date(Number(o.getFullYear()),Number(o.getMonth()),a);var l=null!==n&&!1!==K(n)?ur(o,n):o;return l},hr=function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!J(n))throw new Error("Error in the first argument: "+er);if(!J(o))throw new Error("Error in the second argument: "+er);for(var n=new Date(r),o=new Date(e),a=[],i=n;i<=o;){var u=null!==t&&!1!==K(t)?ur(i,t):i;a.push(u),i=fr(i,1)}return a},cr=function(r,e,t){if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);if(!W(t))throw new Error(rr);var n=ar(new Date(Number(r),0,1),new Date(Number(r),Number(e)-1,Number(t))),o=Number(new Date(r,0,1).getDay()),a=0;o>0&&(a=6-(o-1));var i=Number(new Date(Number(r),Number(e)-1,Number(t)).getDay()),u=0;return i<6&&(u=6-i),Math.ceil((Number(n)+u-a)/7)},sr=function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(r))throw new Error(Q);if(!e(t))throw new Error("You have to enter a number");if(!K(n))throw new Error("Please enter a format of date correctly");var o=Number(new Date(Number(r),0,1).getDay()),a=0;o>0&&(a=6-(o-1));for(var i=[],u=a+1,l=0,f=r,h=1;h<=Number(t);h++){if(h===Number(t)){i.push(ur(new Date(f,l,u),n));for(var c=0;c<6;)c++,i.push(ur(fr(new Date(f,l,u),c),n))}u+=7,l<12&&u>Number(nr(r,l+1))&&(u-=Number(nr(r,l+1)),11!==l?l+=1:(l=1,f+=1))}return i},mr=function(r,e){if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);for(var t=gr(r,52,"M"),n=[],o=0,a=Object.entries(t);o<a.length;o++){var i=f(a[o],2),u=i[0];i[1].includes(e.toString())&&n.push(u)}return 1===Number(e)?n.filter((function(r){return"52"!==r})):n},gr=function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(r))throw new Error(Q);if(!e(t))throw new Error("You have to enter a number");if(!K(n))throw new Error("Please enter a format of date correctly");var o=Number(new Date(Number(r),0,1).getDay()),a=0;o>0&&(a=6-(o-1));for(var i={},u=a+1,l=0,f=r,h=1;h<=t;h++)i[h.toString()]=[ur(new Date(f,l,u),n),ur(fr(new Date(f,l,u),6),n)],u+=7,l<12&&u>Number(nr(r,l+1))&&(u-=Number(nr(r,l+1)),11!==l?l+=1:(l=1,f+=1));return i},wr=Object.freeze({__proto__:null,now:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=(new Date).toString();return"string"==typeof r&&(e=ur(e,r)),e},nowHijri:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",e=Date.UTC(Number((new Date).getFullYear()),Number((new Date).getMonth()),Number((new Date).getDate()),Number((new Date).getHours()),Number((new Date).getMinutes()),Number((new Date).getSeconds()),Number((new Date).getMilliseconds())),t=new Intl.DateTimeFormat(r,{calendar:"islamic",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h24"}).format(new Date(e));return t},parse:lr,parseDate:lr,utc:function(){return new Date(Date.UTC.apply(Date,arguments))},addDate:fr,subtractDate:function(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!J(r))throw new Error("Please enter a date in correct way, either in string or array type");if(!e(t))throw new Error("Only accept number type on second argument");var o=new Date(r),a=Number(o.getDate())-Number(t),i=Number(nr(Number(o.getFullYear()),o.getMonth()));if(a<1){var u=i+(a-1);o=0===Number(o.getMonth())?new Date(Number(o.getFullYear())-1,0,u):new Date(Number(o.getFullYear()),Number(o.getMonth())+1,u)}else o=new Date(Number(o.getFullYear()),Number(o.getMonth()),a);var l=null!==n&&!1!==K(n)?ur(o,n):o;return l},rangeDate:hr,day:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"en-US",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"long";if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);if(!W(t))throw new Error(rr);var a=new Date(Date.UTC(Number(r),Number(e)-1,Number(t)));return new Intl.DateTimeFormat(n,{weekday:o}).format(a)},days:tr,daysInMonth:nr,daysInYear:or,daysInBetween:ar,week:cr,weeks:sr,weeksInMonth:mr,weeksInYear:function(r){if(!G(r))throw new Error(Q);var e=Number(new Date(Number(r),0,1).getDay()),t=0;e>0&&(t=6-(e-1));var n=Number(new Date(Number(r),11,31).getDay()),o=0;return n<6&&(o=6-n),Math.ceil((Number(or(r))+o-t)/7)},month:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"long";if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);var o=Date.UTC(r,Number(e)-1);return new Intl.DateTimeFormat(t,{month:n}).format(new Date(o))},months:ir,isYear:G,isMonth:q,isDate:W,isFullDate:J,isFormatDate:K,isLeapYear:V,calendar:function(r,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);if(!K(n))throw new Error("Please enter a format of date correctly");var a=tr(o),i=hr(new Date(r,Number(e)-1,1),new Date(r,Number(e)-1,nr(r,e)),n),u=Number(new Date(r,Number(e)-1,1).getDay()),l=[];if(u>0){var f=u-1;l=hr(new Date(r,Number(e)-2,Number(nr(r,Number(e)-1))-f),new Date(r,Number(e)-2,nr(r,Number(e)-1)),n)}var h=Number(new Date(r,Number(e)-1,nr(r,e)).getDay()),c=[];if(h<6){var s=6-(h+1);c=hr(new Date(r,Number(e),1),new Date(r,Number(e),1+s),n)}var m=[a,l,i,c];return!0===t?m.flat():m},daysInCalendar:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);if(!K(t))throw new Error("Please enter a format of date correctly");return hr(new Date(r,Number(e)-1,1),new Date(r,Number(e)-1,nr(r,e)),t)},prevDaysInCalendar:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);if(!K(t))throw new Error("Please enter a format of date correctly");var n=Number(new Date(r,Number(e)-1,1).getDay()),o=[];if(n>0){var a=n-1;o=hr(new Date(r,Number(e)-2,Number(nr(r,Number(e)-1))-a),new Date(r,Number(e)-2,nr(r,Number(e)-1)),t)}return o},nextDaysInCalendar:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);if(!K(t))throw new Error("Please enter a format of date correctly");var n=Number(new Date(r,Number(e)-1,nr(r,e)).getDay()),o=[];if(n<6){var a=6-(n+1);o=hr(new Date(r,Number(e),1),new Date(r,Number(e),1+a),t)}return o},weeklyCalendar:function(r,e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);if(!W(t))throw new Error(rr);if(!K(n))throw new Error("Please enter a format of date correctly");var a=tr(o),i=cr(r,e,t),u=sr(r,i,n);return P(a,u)[0]},calendarWithWeeks:function(r,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"YYYY-MM-DD",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US";if(!G(r))throw new Error(Q);if(!q(e))throw new Error(X);if(!K(n))throw new Error("Please enter a format of date correctly");var a=tr(o),i=mr(r,e),u=[];0!==Number(new Date(r,Number(e)-1,1).getDay())&&1===Number(e)&&(u.push("52"),u.push(sr(Number(r)-1,52,n)));var l,f=m(i);try{for(f.s();!(l=f.n()).done;){var h=l.value;u.push(h),u.push(sr(r,h,n))}}catch(r){f.e(r)}finally{f.f()}var c=["Week",a].concat(u);return!0===t?c.flat():c},dateToArray:function(r){if(!J(r))throw new Error("Please enter a valid date");return new Date(r).toJSON().replace("Z","").split(/-|:|\s|\.|T/g)}}),vr=Object.freeze({__proto__:null,size:function(r,e){if(0===r)return"0 Bytes";var t=e||1,n=Math.floor(Math.log(r)/Math.log(1e3));return parseFloat((r/Math.pow(1e3,n)).toFixed(t))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][n]},name:function(r){if("string"==typeof r)return r.indexOf("",41)>40?r.slice(0,41)+"...":r},type:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type",t=r.split("/");return"format"==e?t.shift():t.pop(),t.join("")},image:function(r){if("name"in r&&"string"==typeof r.name)return URL.createObjectURL(r)},date:function(r){return new Date(r).toDateString()},loadImage:function(r){"name"in r&&"string"==typeof r.name&&URL.revokeObjectURL(r)},formatSize:function(r){for(var e=0,t=r,n=t.length,o=0;o<n;o++)e+=t[o].size;for(var a=e+" bytes",i=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],u=0,l=e/1024;l>1;l/=1024,u++)a=l.toFixed(3)+" "+i[u]+" ("+e+" bytes)";return a},humanSize:function(r){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=e?1e3:1024;if(Math.abs(r)<n)return r+" B";var o=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=-1,i=Math.pow(10,t);do{r/=n,++a}while(Math.round(Math.abs(r)*i)/i>=n&&a<o.length-1);return r.toFixed(t)+" "+o[a]},exported:function(r,e){if("object"===a(r)&&"string"==typeof e){var t=Array.from(r),n="";if("json"===e.toLowerCase())n="data:application/json;charset=utf-8,"+JSON.stringify(t,null,2);else if("csv"===e.toLowerCase()){var o,i="",u=m(t);try{for(u.s();!(o=u.n()).done;){var l=o.value;for(var f in l)i+=l[f]+",";i=i.trim().substring(0,i.length-1),i+="\n"}}catch(r){u.e(r)}finally{u.f()}n="data:text/csv;charset=utf-8,"+(i=i.trim().substring(0,i.length-1))}else if("sql"===e.toLowerCase()){var h="INSERT INTO `export_table` (";for(var c in t[0])h+="`"+c+"`,";h=h.trim().substring(0,h.length-1),h+=") VALUES ";var s,g=m(t);try{for(g.s();!(s=g.n()).done;){var w=s.value;for(var v in h+="(",w)h+="`"+w[v]+"`,";h=h.trim().substring(0,h.length-1),h+="),"}}catch(r){g.e(r)}finally{g.f()}h=h.trim().substring(0,h.length-1),n="data:application/sql;charset=utf-8,"+(h+=";")}else if("xml"===e.toLowerCase()){var d='<?xml version="1.0" encoding="UTF-8"?>\n<data>';for(var y in t){for(var p in d+="\n <entry>",y)d+="\n <"+p+"`>"+y[p]+"</"+p+"`>";d+="\n </entry>"}n="data:application/xml;charset=utf-8,"+(d+="\n</data>")}else if("vhs"===e.toLowerCase()){var b,N='//visit official site: http://vhs-file-format.glitch.me \n("data", [',E=m(t);try{for(E.s();!(b=E.n()).done;){var D=b.value;for(var A in N+='\n ("entry", [',D)N+='\n ("'+A+'", ',N+=D[A]+"),";N=N.trim().substring(0,N.length-1),N+="]),"}}catch(r){E.e(r)}finally{E.f()}N=N.trim().substring(0,N.length-1),n="data:application/vhs;charset=utf-8,"+(N="])")}return n}},download:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"txt",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"export-to";if("string"==typeof r){var n=t+"."+e.toLowerCase(),o=encodeURI(r),a=document.createElement("a");a.href=o,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a)}},printed:function(r){if("object"===a(r)){var e=Array.from(r),t=document.createElement("table"),n=document.createElement("thead"),o=document.createElement("tbody");t.appendChild(n),t.appendChild(o);var i=document.createElement("tr");for(var u in e[0]){var l=document.createElement("th");l.textContent=u.replace(/^\w/,(function(r){return r.toUpperCase()})),i.appendChild(l)}n.appendChild(i);for(var f=0,h=e;f<h.length;f++){var c=h[f],s=document.createElement("tr");for(var m in c){var g=document.createElement("td");g.textContent=c[m],s.appendChild(g)}o.appendChild(s)}var w=window.open();w.document.body.appendChild(t),w.focus(),w.print()}}}),dr=function(r,e,t){var n;if(t){var o=new Date;o.setTime(o.getTime()+24*t*60*60*1e3),n="expires="+o.toGMTString()}else n="";document.cookie=r+"="+e+"; SameSite=Lax;"+n+"; path=/"},yr=function(r){for(var e=r+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var o=t[n];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(e))return o.substring(e.length,o.length)}return null},pr=function(r){return"object"===("undefined"==typeof window?"undefined":a(window))&&"".concat(r,"Storage")in window},br=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(pr(e))return!!window["".concat(e,"Storage")].getItem(r)},Nr=Object.freeze({__proto__:null,setCookie:dr,getCookie:yr,hasCookie:function(r){return!!yr(r)},removeCookie:function(r){dr(r,"",-1)},clearCookie:function(){for(var r=document.cookie.split(";"),e=0;e<r.length;e++){var t=r[e],n=t.indexOf("="),o=n>-1?t.substr(0,n):t;document.cookie=o+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}},isStorage:pr,isCookie:function(){return"object"===("undefined"==typeof document?"undefined":a(document))&&"cookie"in document},setStorage:function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local";pr(t)&&window["".concat(t,"Storage")].setItem(r,e)},getStorage:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(pr(e))return window["".concat(e,"Storage")].getItem(r)},hasStorage:br,removeStorage:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";pr(e)&&br(r,e)&&window["".concat(e,"Storage")].removeItem(r)},clearStorage:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"local";pr(r)&&window["".concat(r,"Storage")].clear()}}),Er=Object.freeze({__proto__:null,ternary:function(r,e,t){if(!x(r)&&!x(e)&&!x(t))throw new Error("All arguments here only accept value in function");return r()?e():t()}});export{z as $array,v as $char,wr as $date,vr as $file,r as $int,w as $number,$ as $object,d as $string,z as array,v as char,wr as date,vr as file,Er as func,r as int,w as number,$ as object,Nr as storage,d as string};

@@ -1,3 +0,3 @@

import { insert, insertBefore, insertAfter } from './insertArray.js'
import { update } from './updateArray.js'
import { insert, insertFirst, insertLast, insertBefore, insertAfter } from './insertArray.js'
import { update, updateBy } from './updateArray.js'
import { destroy } from './destroyArray.js'

@@ -33,5 +33,8 @@ import { select, hidden } from './selectArray.js'

insert,
insertFirst,
insertLast,
insertBefore,
insertAfter,
update,
updateBy,
destroy,

@@ -38,0 +41,0 @@ select,

import { isArray } from './isArray.js'
import { isNumber } from '../number/isNumber.js'
import { isObject } from '../object/isObject.js'
class Insert {
constructor(valArr, toArr) {
this.valArr = valArr
this.toArr = toArr
export const insert = (fromArr, at = {position: null, index: null}, ...restVal) => {
if(!isArray(fromArr)) {
throw new Error('On the first argument, only array accept here')
}
first() {
return [...this.valArr, ...this.toArr] // unshift(value)
if(!isObject(at)) {
throw new Error('On the second argument, only object with 2 properties (position and index property) accepted')
}
last() {
return [...this.toArr, ...this.valArr] // push(value)
if(restVal.length < 1) {
throw new Error('On the third or the next arguments, you have to enter at least one argument')
}
before(index) {
const indexBefore = (isNaN(index)) ? 1 : index;
this.toArr.splice(Number(indexBefore) - 1, 0, this.valArr);
return this.toArr.flat()
}
after(index) {
const indexAfter = (isNaN(index)) ? 0 : index;
this.toArr.splice(Number(indexAfter) + 1, 0, this.valArr);
return this.toArr.flat()
let newArray = []
if(at.position === 'first') {
newArray = insertFirst(fromArr, ...restVal)
} else if(at.position === 'last') {
newArray = insertLast(fromArr, ...restVal)
} else if(at.position === 'before') {
newArray = insertBefore(fromArr, at.index, ...restVal)
} else if(at.position === 'after') {
newArray = insertAfter(fromArr, at.index, ...restVal)
}
return newArray
}
export const insert = (...value) => {
if(value.length < 1) {
throw new Error('You have to enter at least one value')
export const insertFirst = (fromArr, ...restVal) => {
if(!isArray(fromArr)) {
throw new Error('On the first argument must be in array type')
}
if(restVal.length < 1) {
throw new Error('On the next arguments, you have to provide at least one argument')
}
const to = (toArr, toPosition = null, atIndex = null) => {
if(!isArray(toArr)) {
throw new Error('Only array accept here')
}
const arrVal = Array.from(toArr)
let resArr = new Insert(value, arrVal)
if(toPosition === 'first') {
resArr = resArr.first()
} else if(toPosition === 'last') {
resArr = resArr.last()
} else if(toPosition === 'before') {
resArr = resArr.before(atIndex)
} else if(toPosition === 'after') {
resArr = resArr.after(atIndex)
}
return resArr
const fromArray = Array.from(fromArr)
fromArray.unshift(...restVal)
return fromArray
}
export const insertLast = (fromArr, ...restVal) => {
if(!isArray(fromArr)) {
throw new Error('On the first argument must be in array type')
}
if(restVal.length < 1) {
throw new Error('On the next arguments, you have to provide at least one argument')
}
return to
const fromArray = Array.from(fromArr)
fromArray.push(...restVal)
return fromArray
}
export const insertBefore = (...value) => {
if(value.length < 1) {
throw new Error('You have to enter at least one value')
export const insertBefore = (fromArr, atIndex, ...restVal) => {
if(!isArray(fromArr)) {
throw new Error('On the first argument, here only accept array type')
}
return (toArr, atIndex) => {
if(!isArray(toArr)) {
throw new Error('In the first argument, here only accept array type')
}
if(!isNumber(atIndex)) {
throw new Error('In the second argument, accept only numeric or number type')
}
if(!isNumber(atIndex)) {
throw new Error('On the second argument, accept only numeric or number type')
}
if(restVal.length < 1) {
throw new Error('On the next arguments, you have to enter at least one value')
}
const toArray = Array.from(toArr)
//return new Insert(value, toArray).before(atIndex)
const indexBefore = (isNaN(atIndex)) ? 1 : atIndex;
toArray.splice(Number(indexBefore) - 1, 0, value);
return toArray.flat()
}
const fromArray = Array.from(fromArr)
const indexBefore = (isNaN(atIndex)) ? 1 : atIndex;
fromArray.splice(Number(indexBefore) - 1, 0, ...restVal);
return fromArray
}
export const insertAfter = (...value) => {
if(value.length < 1) {
throw new Error('You have to enter at least one value')
export const insertAfter = (fromArr, atIndex, ...restVal) => {
if(!isArray(fromArr)) {
throw new Error('On the first argument, here only accept array type')
}
return (toArr, atIndex) => {
if(!isArray(toArr)) {
throw new Error('In the first argument, here only accept array type')
}
if(!isNumber(atIndex)) {
throw new Error('In the second argument, accept only numeric or number type')
}
if(!isNumber(atIndex)) {
throw new Error('On the second argument, accept only numeric or number type')
}
if(restVal.length < 1) {
throw new Error('On the next arguments, you have to enter at least one value')
}
const toArray = Array.from(toArr)
//return new Insert(value, toArray).after(atIndex)
const indexAfter = (isNaN(atIndex)) ? 0 : atIndex;
toArray.splice(Number(indexAfter) + 1, 0, value);
return toArray.flat()
}
const fromArray = Array.from(fromArr)
const indexAfter = (isNaN(atIndex)) ? 0 : atIndex;
fromArray.splice(Number(indexAfter) + 1, 0, ...restVal);
return fromArray
}

@@ -5,32 +5,52 @@ import { index } from './indexArray.js'

import { isObject } from '../object/isObject.js'
import { isNumber } from '../number/isNumber.js'
const update = (setObj) => {
export const update = (fromArr, setObj, whereArg) => {
if(!isArray(fromArr)) {
throw new Error('You have to enter array only on the first argument')
}
if(!isObject(setObj)) {
throw new Error('You must enter object only here')
throw new Error('You must enter object only here on the second argument')
}
return (oriArr, whereObj) => {
if(!isArray(oriArr)) {
throw new Error('You have to enter array only on the first argument')
if(!isObject(whereArg) && !isNumber(whereArg)) {
throw new Error('You must enter object only on the second argument')
}
const fromArray = Array.from(fromArr)
let newArray = []
const indexNum = isObject(whereArg) ? index(fromArray, whereArg) : Number(whereArg)
newArray = fromArray.map((obj, ind) => {
let resMap = obj
if(ind === indexNum) {
resMap = replace(obj, setObj)
}
if(!isObject(whereObj)) {
throw new Error('You must enter object only on the second argument')
}
return resMap
})
return newArray
}
export const updateBy = (fromArr, setObj, whereArr) => {
if(!isArray(fromArr)) {
throw new Error('You have to enter array only on the first argument')
}
if(!isObject(setObj)) {
throw new Error('You must enter object only here on the second argument')
}
if(!isArray(whereArr)) {
throw new Error('You must enter array of objects or numbers on the second argument')
}
const oriArray = Array.from(oriArr)
let newArray = []
const indexNum = index(oriArray, whereObj)
newArray = oriArray.map((obj, ind) => {
let resMap = obj
const fromArray = Array.from(fromArr)
let newArray = []
newArray = fromArray.map((obj, ind) => {
let resMap = obj
for(let where of whereArr) {
const indexNum = isObject(where) ? index(fromArray, where) : Number(where)
if(ind === indexNum) {
resMap = replace(obj, setObj)
}
return resMap
})
return newArray
}
}
return resMap
})
return newArray
}
export {
update
}

@@ -1,1 +0,1 @@

function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function e(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function n(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(r)))return;var n=[],t=!0,o=!1,a=void 0;try{for(var i,u=r[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!e||n.length!==e);t=!0);}catch(r){o=!0,a=r}finally{try{t||null==u.return||u.return()}finally{if(o)throw a}}return n}(r,e)||o(r,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 t(r){return function(r){if(Array.isArray(r))return a(r)}(r)||function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}(r)||o(r)||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(r,e){if(r){if("string"==typeof r)return a(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(r,e):void 0}}function a(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function i(r,e){var n;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(n=o(r))||e&&r&&"number"==typeof r.length){n&&(r=n);var t=0,a=function(){};return{s:a,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,f=!1;return{s:function(){n=r[Symbol.iterator]()},n:function(){var r=n.next();return u=r.done,r},e:function(r){f=!0,i=r},f:function(){try{u||null==n.return||n.return()}finally{if(f)throw i}}}}var u=function(e){return!("object"!==r(e)||null===e||!Array.isArray(e))},f=function(r,e){if(!u(r)&&!u(e))throw new Error("The both of arguments must be in arrays");var n,t=new Set(r),o=i(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(!t.has(a))return!1}}catch(r){o.e(r)}finally{o.f()}return!0},l=function(r){return!isNaN(r)&&"number"==typeof Number(r)},h=function(r){if("number"!=typeof r&&"string"!=typeof r)throw new Error("You must input only number format here");return 1===Math.sign(r)},c=function(r){if("number"!=typeof r&&"string"!=typeof r)throw new Error("You must input only number format here");return-1===Math.sign(r)},s=function(){function r(e,n){!function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.valArr=e,this.toArr=n}var n,o,a;return n=r,(o=[{key:"first",value:function(){return[].concat(t(this.valArr),t(this.toArr))}},{key:"last",value:function(){return[].concat(t(this.toArr),t(this.valArr))}},{key:"before",value:function(r){var e=isNaN(r)?1:r;return this.toArr.splice(Number(e)-1,0,this.valArr),this.toArr.flat()}},{key:"after",value:function(r){var e=isNaN(r)?0:r;return this.toArr.splice(Number(e)+1,0,this.valArr),this.toArr.flat()}}])&&e(n.prototype,o),a&&e(n,a),r}(),y=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<1)throw new Error("You have to enter at least one value");var t=function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!u(r))throw new Error("Only array accept here");var o=Array.from(r),a=new s(e,o);return"first"===n?a=a.first():"last"===n?a=a.last():"before"===n?a=a.before(t):"after"===n&&(a=a.after(t)),a};return t},m=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<1)throw new Error("You have to enter at least one value");return function(r,n){if(!u(r))throw new Error("In the first argument, here only accept array type");if(!l(n))throw new Error("In the second argument, accept only numeric or number type");var t=Array.from(r),o=isNaN(n)?1:n;return t.splice(Number(o)-1,0,e),t.flat()}},v=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<1)throw new Error("You have to enter at least one value");return function(r,n){if(!u(r))throw new Error("In the first argument, here only accept array type");if(!l(n))throw new Error("In the second argument, accept only numeric or number type");var t=Array.from(r),o=isNaN(n)?0:n;return t.splice(Number(o)+1,0,e),t.flat()}},w=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{key:"id",value:0};if(!u(r))throw new Error("You must enter the first argument in array only");var t=Array.from(r),o=-1;return"key"in e&&"value"in e?o=t.length>=1?t.findIndex((function(r){return r[e.key]===e.value})):-1:t.length>=1&&(o=t.findIndex((function(r){for(var t=0,o=Object.entries(e);t<o.length;t++){var a=n(o[t],2),i=a[0],u=a[1];if(i in r&&r[i]===u)return!0}}))),o},g=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dense";if(!u(r))throw new Error("You must enter the first argument in array only");return"sparse"===e?Object.keys(r).map((function(r){return Number(r)})):t(r.keys())},d=function(r){if(!u(r))throw new Error("You must enter the argument in array only");var e=g(r);return Number(e[Math.floor(Math.random()*e.length)])},p=function(e){return"object"===r(e)&&null!==e&&"[object Object]"===Object.prototype.toString.call(e)},b=function(r){if(!p(r))throw new Error("You must enter object only here");return function(e,t){if(!u(e))throw new Error("You have to enter array only on the first argument");if(!p(t))throw new Error("You must enter object only on the second argument");var o=Array.from(e),a=w(o,t);return o.map((function(e,t){var o=e;return t===a&&(o=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e){for(var o={},a=0,i=e;a<i.length;a++)for(var u=i[a],f=0,l=Object.entries(u);f<l.length;f++){var h=n(l[f],2),c=h[0],s=h[1];o[c]=s}return o}}(e,r)),o}))}},E=function(e){if(!u(e))throw new Error("Please provide array that you want to remove its element");for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];if(t.length<1)throw new Error("On the last of argument, you have to enter at least one argument");for(var a=Array.from(e),i=[],f=function(){var e=h[l];if("string"==typeof e&&"first"===e)a=a.map((function(r,e){return 0===e?null:r})),i=a;else if("string"==typeof e&&"last"===e)a=a.map((function(r,e){return e===a.length-1?null:r})),i=a;else if("number"==typeof e)a=a.map((function(r,n){return n===e?null:r})),i=a;else if("object"===r(e)&&null!==e){var n=w(a,e);a=a.map((function(r,e){return e===n?null:r})),i=a}},l=0,h=t;l<h.length;l++)f();return i.filter((function(r){return null!==r}))},A=function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];if(!u(r))throw new Error("On the first argument, you have to provide array only");if(n.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(r);return o.map((function(r){var e,t={},o=i(n);try{for(o.s();!(e=o.n()).done;){var a=e.value;a in r&&(t[a]=r[a])}}catch(r){o.e(r)}finally{o.f()}return t}))},N=function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];if(!u(r))throw new Error("On the first argument, you have to provide array only");if(n.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(r);return o.map((function(r){var e,t=r,o=i(n);try{for(o.s();!(e=o.n()).done;){var a=e.value;a in r&&delete t[a]}}catch(r){o.e(r)}finally{o.f()}return t}))},j=function(r){return function(e){var n=Array.from(e);if(n.includes(r)){var t=n.findIndex((function(e){return e===r}));n.splice(t,1)}else n.push(r);return n}},O=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],o={};o.id=n.id||"id",o.parent=n.parent||"parent",o.children=n.children||"children";var a=function(){Array.from(e).forEach((function(e){if("object"===r(e)&&null!==e){var n=e;n[o.parent]="0","object"===r(n[o.children])&&Array.isArray(n[o.children])&&(i(n[o.children],e),delete n[o.children]),t.push(n)}}))},i=function e(n,a){n.length>=1&&Array.from(n).forEach((function(n){if("object"===r(n)&&null!==n){var i=n;i[o.parent]=a[o.id],"object"===r(i[o.children])&&Array.isArray(i[o.children])&&(e(i[o.children],n),delete i[o.children]),t.push(i)}}))};return a(),t},S=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],o=Array.from(e),a={};a.id=n.id||"id",a.parent=n.parent||"parent",a.children=n.children||"children";var i=function(e){e.forEach((function(e){if("object"===r(e)&&null!==e){var n=null;("string"==typeof e[a.parent]&&"0"===e[a.parent]||"number"==typeof e[a.parent]&&0===e[a.parent])&&(n=u(e)),null!==n&&t.push(n)}}))},u=function(r){var e=r;return void 0!==r[a.children]&&null!==r[a.children]||(e[a.children]=f(r[a.id]),e[a.children].length<=0&&delete e[a.children]),delete e[a.parent],e},f=function(r){var e=[];return l(r).length>=1&&l(r).forEach((function(r){e.push(u(r))})),e},l=function(r){return o.filter((function(e){return e.parent===r}))};return i(o),t},T=function(r){return"string"==typeof r},Y=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!u(r))throw new Error("");var n=Array.from(r),o=[];if("string"==typeof e){var a,f=new Set,l=i(n);try{for(l.s();!(a=l.n()).done;){var h=a.value;f.has(h[e])||f.add(h[e])}}catch(r){l.e(r)}finally{l.f()}o=t(f)}else o=Array.from(new Set(n));return o},x=function(r){if(!u)throw new Error("The first argument must be in array");for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o<e;o++)t[o-1]=arguments[o];if(t.length<1)throw new Error("On the next arguments, you must provide at least one argument in either string or number");for(var a=[],i=function(){var e=h[f],t=Array.from(r).filter((function(r){if(l(r)&&Number(r)===Number(e))return!0;if(T(r)&&r.toLowerCase().includes(e.toLowerCase()))return!0;if(p(r))for(var t=0,o=Object.entries(r);t<o.length;t++){var a=n(o[t],2),i=a[0],u=a[1];if(l(r[i])&&Number(u)===Number(e))return!0;if(T(r[i])&&u.toLowerCase().includes(e.toLowerCase()))return!0}return!1}));a=Y(a.concat(t))},f=0,h=t;f<h.length;f++)i();return a},C=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<1)throw new Error("This argument must have at least one argument in either string or number");return function(r){for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];if(!u(r))throw new Error("Array of objects is needed in order to be searched");if(t.length<1)throw new Error("The last argument required at least one argument in either string or number");var a,f=[],h=i(e);try{var c=function(){var e=a.value,n=Array.from(r).filter((function(r){for(var n=0,o=Array.from(t);n<o.length;n++){var a=o[n];if(a in r){if(l(r[a])&&Number(r[a])===Number(e))return!0;if(T(r[a])&&-1!==r[a].toLowerCase().indexOf(e.toLowerCase()))return!0}}return!1}));f=Y(f.concat(n))};for(h.s();!(a=h.n()).done;)c()}catch(r){h.e(r)}finally{h.f()}return f}},k=function(r,e){if(!u(r))throw new Error("The first argument must be in array of objects");if(!p(e))throw new Error("The second argument must be in object type and must have at least one property");for(var t=Array.from(r),o=function(){var r=n(i[a],2),e=r[0],o=r[1],u=t.filter((function(r){if(e in r){if(l(r[e])&&Number(r[e])===Number(o))return!0;if(T(r[e])&&r[e].toLowerCase().includes(o.toLowerCase()))return!0}return!1}));t=u},a=0,i=Object.entries(function(r){if(!p(r))throw new Error("This is object helper, you must provide the first argument in an object");for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o<e;o++)t[o-1]=arguments[o];if(t.length<1)throw new Error("The next arguments must be in a string or in a number and at least one argument");for(var a={},i=new Set(t),u=0,f=Object.entries(r);u<f.length;u++){var l=n(f[u],1)[0];i.has(r[l])||(a[l]=r[l])}return a}(e,"",0));a<i.length;a++)o();return t},I=function(r){return"function"==typeof r},L=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";if(!u(r))throw new Error("Only array of strings or numbers accepted");if(!T(e))throw new Error('The second argument must be in a string and a value either "", "asc" or "desc"');var n=Array.from(r);return"asc"===e?n.sort((function(r,e){if(l(r)&&l(e))return Number(r)-Number(e);if(T(r)&&T(e)){var n=r.toLowerCase(),t=e.toLowerCase(),o=0;return n<t?o=-1:n>t&&(o=1),o}})):"desc"===e&&n.sort((function(r,e){if(l(r)&&l(e))return Number(e)-Number(r);if(T(r)&&T(e)){var n=r.toLowerCase(),t=e.toLowerCase(),o=0;return t<n?o=-1:t>n&&(o=1),o}})),n},M=function(r,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";if(!u(r))throw new Error("Only array of objects accepted");if(!T(e))throw new Error("The second argument must be in a string and a value must be object property key or name");if(!T(n))throw new Error('The third argument must be in a string and a value either "", "asc" or "desc"');var t=Array.from(r);return"asc"===n?t.sort((function(r,n){if(e in r&&e in n){if(l(r[e])&&l(n[e]))return Number(r[e])-Number(n[e]);if(T(r[e])&&T(n[e])){var t=r[e].toLowerCase(),o=n[e].toLowerCase(),a=0;return t<o?a=-1:t>o&&(a=1),a}}})):"desc"===n&&t.sort((function(r,n){if(e in r&&e in n){if(l(r[e])&&l(n[e]))return Number(n[e])-Number(r[e]);if(T(r[e])&&T(n[e])){var t=r[e].toLowerCase(),o=n[e].toLowerCase(),a=0;return o<t?a=-1:o>t&&(a=1),a}}})),t},P=function(r,e){if(!u(r))throw new Error("The first argument must be in an array type");if(!I(e))throw new Error("The second argument is a compare or callback function");var n=Array.from(r);return n.sort((function(r,n){return-1===Math.sign(e(r,n))?-1:1})),n},H=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!u(r))throw new Error("On the first argument, here only accept array");if(!l(e))throw new Error("This is the page active number, please enter number only");if(!l(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var t=Array.from(r),o=Number(n)*Number(e)-(Number(n)-1),a=Number(n)*Number(e);return t.slice(o-1,a<=t.length?a:t.length)},q=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(!u(r))throw new Error("On the first argument, here only accept array");if(!l(e))throw new Error("This is the limit of entries in one page in a number, please enter number only");var n=Array.from(r),t=n.length/Number(e),o=Math.ceil(t);return o},U=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!u(r))throw new Error("On the first argument, here only accept array");if(!l(e))throw new Error("This is the page active number, please enter number only");if(!l(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var t=Array.from(r),o=Number(n)*Number(e)-(Number(n)-1),a=Number(n)*Number(e);return{from:o,to:a<=t.length?a:t.length,of:t.length}},$=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!l(r))throw new Error("This is the total or all pages in numbers, please enter number only");if(!l(e))throw new Error("This is the page active number, please enter number only");if(!l(n))throw new Error("This is the position of ellipsis [...], please enter number only");var t=[],o=Number(r)<Number(e)?Number(r):Number(e),a=Number(e)<1?1:Number(e),i=o+Number(n),u=a-Number(n);if(0===Number(n))for(var f=1;f<=Number(r);f++)t.push(f);else{if(a>1)for(var h=u;h<a;h++)t.push(h);for(var c=o;c<=i;c++)t.push(c)}var s=t.filter((function(r){return r>0})),y=s.filter((function(e){return e<=Number(r)}));return i<Number(r)&&0!==Number(n)&&y.push("..."),u>1&&0!==Number(n)&&y.unshift("..."),y},z=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!u(r))throw new Error("In the first argument, you must enter a data in array");var n=Array.from(r),t=0;if("string"==typeof e&&""!==e){var o=n.map((function(r){return e in r?Number(r[e]):0}));t=o.reduce((function(r,e){return Number(r)+Number(e)}))}else t=n.reduce((function(r,e){return Number(r)+Number(e)}));return t},B=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return Array.from(new Set(e.flat()))},D=function(r){if(!u(r))throw new Error("This argument only accept array");var e,n={},t=new Set,o=i(new Set(r));try{var a=function(){var o=e.value,a=Array.from(r).filter((function(r){return r===o}));t.has(a.length)||(t.add(a.length),n[a.length]=[]),a.forEach((function(r){n[a.length].push(r)}))};for(o.s();!(e=o.n()).done;)a()}catch(r){o.e(r)}finally{o.f()}return n},F=function(r,e){if(!u(r))throw new Error("The first paramenter only accept array");if(!I(e))throw new Error("The second paramenter only accept callback function");return r.filter((function(r){return e(r)})).length},G=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");var t=[],o={};e.forEach((function(r,e){if(u(r)?o[e]=new Set(r):o[e]=(new Set).add(r),0!==e){var n,a=i(r);try{for(a.s();!(n=a.n()).done;){var f=n.value;o[e-1].has(f)&&t.push(f)}}catch(r){a.e(r)}finally{a.f()}}}));var a=D(t);return Array.from(new Set(a[e.length-1]))},J=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");var t=new Set,o=G.apply(void 0,e);return e.forEach((function(r){if(!u(r))throw new Error("Here only accept arrays from all arguments");var e,n=i(r);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.includes(a)||t.has(a)||t.add(a)}}catch(r){n.e(r)}finally{n.f()}})),Array.from(t)},K=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");for(var t=new Set,o=[],a=0,i=e;a<i.length;a++){var f=i[a];if(!u(f))throw new Error("Here only accept arrays from all arguments");f.forEach((function(r){t.has(r)?(t.delete(r),o.push(r)):o.includes(r)||t.add(r)}))}return Array.from(t)},Q=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(!e&&e.length<=1)throw new Error("You have to provide here at least 1 value");var o=Array.from(e);o.shift();var a=new Set(R.apply(void 0,[e[0]].concat(t(o))));return Array.from(a)},R=function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];if(!u(r)&&r.length<=0)throw new Error("You need to provide more values to your array");if(!n&&n.length<=0)throw new Error("You have to provide here at least 1 value");var o,a=[],f=i(r);try{for(f.s();!(o=f.n()).done;){var l=o.value;n.flat().includes(l)||a.push(l)}}catch(r){f.e(r)}finally{f.f()}return a},V=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<2&&!u(e[0])&&!u(e[1])&&Number(e[0].length)!==Number(e[1].length))throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var t=Array.from(e[0]).map((function(r){return[]})),o=0,a=e;o<a.length;o++){var i=a[o];i.forEach((function(r,e){e in t&&t[e].push(r)}))}return t},W=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var t=Array.from(e),o=[],a=t.shift(),i=function(){var r=f[u],e=new Map;r.forEach((function(r,n){a[n]&&e.set(a[n],r)})),o.push(Object.fromEntries(e))},u=0,f=t;u<f.length;u++)i();return o},X=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var o=Array.from(e),a=Object.keys(o[0]),i={},u=0,f=a;u<f.length;u++){var l=f[u];i[l]=[]}for(var h=0,c=o;h<c.length;h++){var s=c[h];for(var y in s)i[y].push(s[y])}return[a].concat(t(V.apply(void 0,t(Object.values(i)))))},Z=function(){if(0===arguments.length||arguments.length>=4)throw new Error("Here only accept 3 arguments, so you have to provide at least 1 argument");var r=1===arguments.length?0:Number(arguments.length<=0?void 0:arguments[0]),e=Number(arguments.length>=2?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0]),n=3===arguments.length?Number(arguments.length<=2?void 0:arguments[2]):1;arguments.length<3&&c(e)&&(n=-1);var t=[],o=0,a=0;if(c(r)&&h(e)?o=r-1:h(r)&&c(e)?o=r+1:h(r)&&h(e)?o=r-1:c(r)&&c(e)&&(o=r+1),o<e){for(;o<e;)o++,n>1?(a+=n)<e&&t.push(a):o<e&&t.push(o);0!==r||t.includes(0)||t.unshift(0)}else if(o>e){for(;o>e;)o--,n<-1?(a-=n)>e&&t.unshift(a):o>e&&t.unshift(o);0!==r||t.includes(0)||t.push(0)}return 1===t.length&&0===t[0]?[]:t},_=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Only accept index of array elements and you must input at least one index in number type");return function(r,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!u(r))throw new Error("Please enter array only here");if(!l(n))throw new Error("Input only index number here");var o,a=Array.from(r),f=[],h=i(e);try{for(h.s();!(o=h.n()).done;){var c=o.value;void 0!==a[Number(c)]&&f.push(a[Number(c)])}}catch(r){h.e(r)}finally{h.f()}var s=E.apply(void 0,[a].concat(e));return s.splice.apply(s,[n,t].concat(f)),s}},rr=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Accept index of array elements only and you add at least one index in number");return function(r){if(!u(r))throw new Error("Please enter array only here");for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];if(0===t.length&&t.length!==e.length&&0!==G(e,t).length)throw new Error("Only accept index of array elements and the number of the first indexes must be the same as the second indexes and also, both indexes must be different");for(var a=Array.from(r),i=Array.from(r),f=0;f<e.length;f++)void 0!==e[f]&&void 0!==t[f]&&(i.splice(e[f],1,a[t[f]]),i.splice(t[f],1,a[e[f]]));return i}},er=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Only accept index of array elements and you must enter at least one index in number type");return function(r,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!u(r))throw new Error("Accept array only here");if(!u(n))throw new Error("Accept array only here");if(!l(t))throw new Error("Input only index number here");var o,a=Array.from(r),f=Array.from(n),h=[],c=i(e);try{for(c.s();!(o=c.n()).done;){var s=o.value;void 0!==a[Number(s)]&&h.push(a[Number(s)])}}catch(r){c.e(r)}finally{c.f()}var y=null===t?Number(f.length):t;f.splice.apply(f,[y,0].concat(h));var m=E.apply(void 0,[a].concat(e));return{from:m,to:f}}},nr=function(r){if(!u(r))throw new Error("Enter only array type here");return Array.from(r).filter((function(r){return null!=r&&!1!==r&&!isNaN(r)&&""!==r&&r>0}))},tr=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!u(r)&&r.length<=2)throw new Error("Please insert array only on the first argument and must have 3 values at least");if("number"!=typeof e)throw new Error("On the second argument, you must input in a number type only");var n,t=Z(e,r.length,e),o=[],a=i(t);try{for(a.s();!(n=a.n()).done;){var f=n.value,l=r.slice(Number(f)-Number(e),f);o.push(l)}}catch(r){a.e(r)}finally{a.f()}return t[Number(t.length)-1]<=r.length&&o.push(r.slice(t[Number(t.length)-1],r.length)),o},or=function(r){if(!u(r)&&r.length<=2)throw new Error("This shuffle method only work on data in array type");for(var e=Array.from(r),n=Number(e.length)-1;n>2;n--){var t=e.slice(0,Number(n)+1);e=rr(n)(e,d(t))}return e},ar=function(r,e){if(!u(r))throw new Error("You must enter array literal here");if(!I(e))throw new Error("You have to enter a function or callback on the second argument");var n,t={},o=i(r);try{for(o.s();!(n=o.n()).done;){var a=n.value;void 0===t[e(a).toString()]&&(t[e(a).toString()]=[]),t[e(a).toString()].push(a)}}catch(r){o.e(r)}finally{o.f()}return t},ir=function(r,e,n){if(!u(r))throw new Error("On the first argument, you have to provide array only");if(!T(e))throw new Error("New property must be in string type");if(!I(n))throw new Error("Callback must be in function or method");return Array.from(r).map((function(r){return r[e]=n.apply(void 0,t(Object.values(r).filter((function(r){return!1===isNaN(r)})))),r}))};export{K as asymmetricDifference,ir as calc,ir as calculate,tr as chunk,nr as compact,Q as complement,F as countBy,D as countDuplication,E as destroy,J as difference,k as filter,k as filtered,O as flatten,ar as group,N as hidden,w as index,y as insert,v as insertAfter,m as insertBefore,G as intersection,u as isArray,f as isSuperset,_ as move,S as nested,U as pageInfo,q as pages,H as paginate,$ as pagination,d as randomIndex,Z as range,x as search,C as searchBy,A as select,U as show,or as shuffle,L as sort,M as sortBy,P as sortWith,M as sorted,z as sum,rr as switched,g as toIndex,j as toggle,er as transfer,V as transpose,B as union,Y as unique,X as unzip,b as update,R as without,W as zip};
function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function e(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(r)))return;var n=[],t=!0,o=!1,a=void 0;try{for(var i,u=r[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!e||n.length!==e);t=!0);}catch(r){o=!0,a=r}finally{try{t||null==u.return||u.return()}finally{if(o)throw a}}return n}(r,e)||t(r,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 n(r){return function(r){if(Array.isArray(r))return o(r)}(r)||function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}(r)||t(r)||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 t(r,e){if(r){if("string"==typeof r)return o(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(r,e):void 0}}function o(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function a(r,e){var n;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(n=t(r))||e&&r&&"number"==typeof r.length){n&&(r=n);var o=0,a=function(){};return{s:a,n:function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,f=!1;return{s:function(){n=r[Symbol.iterator]()},n:function(){var r=n.next();return u=r.done,r},e:function(r){f=!0,i=r},f:function(){try{u||null==n.return||n.return()}finally{if(f)throw i}}}}var i=function(e){return!("object"!==r(e)||null===e||!Array.isArray(e))},u=function(r,e){if(!i(r)&&!i(e))throw new Error("The both of arguments must be in arrays");var n,t=new Set(r),o=a(e);try{for(o.s();!(n=o.n()).done;){var u=n.value;if(!t.has(u))return!1}}catch(r){o.e(r)}finally{o.f()}return!0},f=function(r){return!isNaN(r)&&"number"==typeof Number(r)},l=function(r){if("number"!=typeof r&&"string"!=typeof r)throw new Error("You must input only number format here");return 1===Math.sign(r)},h=function(r){if("number"!=typeof r&&"string"!=typeof r)throw new Error("You must input only number format here");return-1===Math.sign(r)},c=function(e){return"object"===r(e)&&null!==e&&"[object Object]"===Object.prototype.toString.call(e)},s=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{position:null,index:null};if(!i(r))throw new Error("On the first argument, only array accept here");if(!c(e))throw new Error("On the second argument, only object with 2 properties (position and index property) accepted");for(var n=arguments.length,t=new Array(n>2?n-2:0),o=2;o<n;o++)t[o-2]=arguments[o];if(t.length<1)throw new Error("On the third or the next arguments, you have to enter at least one argument");var a=[];return"first"===e.position?a=y.apply(void 0,[r].concat(t)):"last"===e.position?a=m.apply(void 0,[r].concat(t)):"before"===e.position?a=v.apply(void 0,[r,e.index].concat(t)):"after"===e.position&&(a=w.apply(void 0,[r,e.index].concat(t))),a},y=function(r){if(!i(r))throw new Error("On the first argument must be in array type");for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];if(n.length<1)throw new Error("On the next arguments, you have to provide at least one argument");var o=Array.from(r);return o.unshift.apply(o,n),o},m=function(r){if(!i(r))throw new Error("On the first argument must be in array type");for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];if(n.length<1)throw new Error("On the next arguments, you have to provide at least one argument");var o=Array.from(r);return o.push.apply(o,n),o},v=function(r,e){if(!i(r))throw new Error("On the first argument, here only accept array type");if(!f(e))throw new Error("On the second argument, accept only numeric or number type");for(var n=arguments.length,t=new Array(n>2?n-2:0),o=2;o<n;o++)t[o-2]=arguments[o];if(t.length<1)throw new Error("On the next arguments, you have to enter at least one value");var a=Array.from(r),u=isNaN(e)?1:e;return a.splice.apply(a,[Number(u)-1,0].concat(t)),a},w=function(r,e){if(!i(r))throw new Error("On the first argument, here only accept array type");if(!f(e))throw new Error("On the second argument, accept only numeric or number type");for(var n=arguments.length,t=new Array(n>2?n-2:0),o=2;o<n;o++)t[o-2]=arguments[o];if(t.length<1)throw new Error("On the next arguments, you have to enter at least one value");var a=Array.from(r),u=isNaN(e)?0:e;return a.splice.apply(a,[Number(u)+1,0].concat(t)),a},g=function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{key:"id",value:0};if(!i(r))throw new Error("You must enter the first argument in array only");var t=Array.from(r),o=-1;return"key"in n&&"value"in n?o=t.length>=1?t.findIndex((function(r){return r[n.key]===n.value})):-1:t.length>=1&&(o=t.findIndex((function(r){for(var t=0,o=Object.entries(n);t<o.length;t++){var a=e(o[t],2),i=a[0],u=a[1];if(i in r&&r[i]===u)return!0}}))),o},p=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dense";if(!i(r))throw new Error("You must enter the first argument in array only");return"sparse"===e?Object.keys(r).map((function(r){return Number(r)})):n(r.keys())},d=function(r){if(!i(r))throw new Error("You must enter the argument in array only");var e=p(r);return Number(e[Math.floor(Math.random()*e.length)])},b=function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];if(n){for(var o={},a=0,i=n;a<i.length;a++)for(var u=i[a],f=0,l=Object.entries(u);f<l.length;f++){var h=e(l[f],2),c=h[0],s=h[1];o[c]=s}return o}},E=function(r,e,n){if(!i(r))throw new Error("You have to enter array only on the first argument");if(!c(e))throw new Error("You must enter object only here on the second argument");if(!c(n)&&!f(n))throw new Error("You must enter object only on the second argument");var t=Array.from(r),o=c(n)?g(t,n):Number(n);return t.map((function(r,n){var t=r;return n===o&&(t=b(r,e)),t}))},A=function(r,e,n){if(!i(r))throw new Error("You have to enter array only on the first argument");if(!c(e))throw new Error("You must enter object only here on the second argument");if(!i(n))throw new Error("You must enter array of objects or numbers on the second argument");var t=Array.from(r);return t.map((function(r,o){var i,u=r,f=a(n);try{for(f.s();!(i=f.n()).done;){var l=i.value;o===(c(l)?g(t,l):Number(l))&&(u=b(r,e))}}catch(r){f.e(r)}finally{f.f()}return u}))},N=function(e){if(!i(e))throw new Error("Please provide array that you want to remove its element");for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];if(t.length<1)throw new Error("On the last of argument, you have to enter at least one argument");for(var a=Array.from(e),u=[],f=function(){var e=h[l];if("string"==typeof e&&"first"===e)a=a.map((function(r,e){return 0===e?null:r})),u=a;else if("string"==typeof e&&"last"===e)a=a.map((function(r,e){return e===a.length-1?null:r})),u=a;else if("number"==typeof e)a=a.map((function(r,n){return n===e?null:r})),u=a;else if("object"===r(e)&&null!==e){var n=g(a,e);a=a.map((function(r,e){return e===n?null:r})),u=a}},l=0,h=t;l<h.length;l++)f();return u.filter((function(r){return null!==r}))},O=function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];if(!i(r))throw new Error("On the first argument, you have to provide array only");if(n.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(r);return o.map((function(r){var e,t={},o=a(n);try{for(o.s();!(e=o.n()).done;){var i=e.value;i in r&&(t[i]=r[i])}}catch(r){o.e(r)}finally{o.f()}return t}))},j=function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];if(!i(r))throw new Error("On the first argument, you have to provide array only");if(n.length<1)throw new Error("On the second argument, you must enter at least one value");var o=Array.from(r);return o.map((function(r){var e,t=r,o=a(n);try{for(o.s();!(e=o.n()).done;){var i=e.value;i in r&&delete t[i]}}catch(r){o.e(r)}finally{o.f()}return t}))},S=function(r){return function(e){var n=Array.from(e);if(n.includes(r)){var t=n.findIndex((function(e){return e===r}));n.splice(t,1)}else n.push(r);return n}},x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],o={};o.id=n.id||"id",o.parent=n.parent||"parent",o.children=n.children||"children";var a=function(){Array.from(e).forEach((function(e){if("object"===r(e)&&null!==e){var n=e;n[o.parent]="0","object"===r(n[o.children])&&Array.isArray(n[o.children])&&(i(n[o.children],e),delete n[o.children]),t.push(n)}}))},i=function e(n,a){n.length>=1&&Array.from(n).forEach((function(n){if("object"===r(n)&&null!==n){var i=n;i[o.parent]=a[o.id],"object"===r(i[o.children])&&Array.isArray(i[o.children])&&(e(i[o.children],n),delete i[o.children]),t.push(i)}}))};return a(),t},T=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],o=Array.from(e),a={};a.id=n.id||"id",a.parent=n.parent||"parent",a.children=n.children||"children";var i=function(e){e.forEach((function(e){if("object"===r(e)&&null!==e){var n=null;("string"==typeof e[a.parent]&&"0"===e[a.parent]||"number"==typeof e[a.parent]&&0===e[a.parent])&&(n=u(e)),null!==n&&t.push(n)}}))},u=function(r){var e=r;return void 0!==r[a.children]&&null!==r[a.children]||(e[a.children]=f(r[a.id]),e[a.children].length<=0&&delete e[a.children]),delete e[a.parent],e},f=function(r){var e=[];return l(r).length>=1&&l(r).forEach((function(r){e.push(u(r))})),e},l=function(r){return o.filter((function(e){return e.parent===r}))};return i(o),t},Y=function(r){return"string"==typeof r},C=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!i(r))throw new Error("");var t=Array.from(r),o=[];if("string"==typeof e){var u,f=new Set,l=a(t);try{for(l.s();!(u=l.n()).done;){var h=u.value;f.has(h[e])||f.add(h[e])}}catch(r){l.e(r)}finally{l.f()}o=n(f)}else o=Array.from(new Set(t));return o},L=function(r){if(!i)throw new Error("The first argument must be in array");for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];if(t.length<1)throw new Error("On the next arguments, you must provide at least one argument in either string or number");for(var a=[],u=function(){var n=h[l],t=Array.from(r).filter((function(r){if(f(r)&&Number(r)===Number(n))return!0;if(Y(r)&&r.toLowerCase().includes(n.toLowerCase()))return!0;if(c(r))for(var t=0,o=Object.entries(r);t<o.length;t++){var a=e(o[t],2),i=a[0],u=a[1];if(f(r[i])&&Number(u)===Number(n))return!0;if(Y(r[i])&&u.toLowerCase().includes(n.toLowerCase()))return!0}return!1}));a=C(a.concat(t))},l=0,h=t;l<h.length;l++)u();return a},I=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<1)throw new Error("This argument must have at least one argument in either string or number");return function(r){for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];if(!i(r))throw new Error("Array of objects is needed in order to be searched");if(t.length<1)throw new Error("The last argument required at least one argument in either string or number");var u,l=[],h=a(e);try{var c=function(){var e=u.value,n=Array.from(r).filter((function(r){for(var n=0,o=Array.from(t);n<o.length;n++){var a=o[n];if(a in r){if(f(r[a])&&Number(r[a])===Number(e))return!0;if(Y(r[a])&&-1!==r[a].toLowerCase().indexOf(e.toLowerCase()))return!0}}return!1}));l=C(l.concat(n))};for(h.s();!(u=h.n()).done;)c()}catch(r){h.e(r)}finally{h.f()}return l}},k=function(r,n){if(!i(r))throw new Error("The first argument must be in array of objects");if(!c(n))throw new Error("The second argument must be in object type and must have at least one property");for(var t=Array.from(r),o=function(){var r=e(u[a],2),n=r[0],o=r[1],i=t.filter((function(r){if(n in r){if(f(r[n])&&Number(r[n])===Number(o))return!0;if(Y(r[n])&&r[n].toLowerCase().includes(o.toLowerCase()))return!0}return!1}));t=i},a=0,u=Object.entries(function(r){if(!c(r))throw new Error("This is object helper, you must provide the first argument in an object");for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];if(t.length<1)throw new Error("The next arguments must be in a string or in a number and at least one argument");for(var a={},i=new Set(t),u=0,f=Object.entries(r);u<f.length;u++){var l=e(f[u],1)[0];i.has(r[l])||(a[l]=r[l])}return a}(n,"",0));a<u.length;a++)o();return t},M=function(r){return"function"==typeof r},P=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";if(!i(r))throw new Error("Only array of strings or numbers accepted");if(!Y(e))throw new Error('The second argument must be in a string and a value either "", "asc" or "desc"');var n=Array.from(r);return"asc"===e?n.sort((function(r,e){if(f(r)&&f(e))return Number(r)-Number(e);if(Y(r)&&Y(e)){var n=r.toLowerCase(),t=e.toLowerCase(),o=0;return n<t?o=-1:n>t&&(o=1),o}})):"desc"===e&&n.sort((function(r,e){if(f(r)&&f(e))return Number(e)-Number(r);if(Y(r)&&Y(e)){var n=r.toLowerCase(),t=e.toLowerCase(),o=0;return t<n?o=-1:t>n&&(o=1),o}})),n},H=function(r,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";if(!i(r))throw new Error("Only array of objects accepted");if(!Y(e))throw new Error("The second argument must be in a string and a value must be object property key or name");if(!Y(n))throw new Error('The third argument must be in a string and a value either "", "asc" or "desc"');var t=Array.from(r);return"asc"===n?t.sort((function(r,n){if(e in r&&e in n){if(f(r[e])&&f(n[e]))return Number(r[e])-Number(n[e]);if(Y(r[e])&&Y(n[e])){var t=r[e].toLowerCase(),o=n[e].toLowerCase(),a=0;return t<o?a=-1:t>o&&(a=1),a}}})):"desc"===n&&t.sort((function(r,n){if(e in r&&e in n){if(f(r[e])&&f(n[e]))return Number(n[e])-Number(r[e]);if(Y(r[e])&&Y(n[e])){var t=r[e].toLowerCase(),o=n[e].toLowerCase(),a=0;return o<t?a=-1:o>t&&(a=1),a}}})),t},q=function(r,e){if(!i(r))throw new Error("The first argument must be in an array type");if(!M(e))throw new Error("The second argument is a compare or callback function");var n=Array.from(r);return n.sort((function(r,n){return-1===Math.sign(e(r,n))?-1:1})),n},U=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!i(r))throw new Error("On the first argument, here only accept array");if(!f(e))throw new Error("This is the page active number, please enter number only");if(!f(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var t=Array.from(r),o=Number(n)*Number(e)-(Number(n)-1),a=Number(n)*Number(e);return t.slice(o-1,a<=t.length?a:t.length)},$=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(!i(r))throw new Error("On the first argument, here only accept array");if(!f(e))throw new Error("This is the limit of entries in one page in a number, please enter number only");var n=Array.from(r),t=n.length/Number(e),o=Math.ceil(t);return o},z=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(!i(r))throw new Error("On the first argument, here only accept array");if(!f(e))throw new Error("This is the page active number, please enter number only");if(!f(n))throw new Error("This is the limit of entries in one page in a number, please enter number only");var t=Array.from(r),o=Number(n)*Number(e)-(Number(n)-1),a=Number(n)*Number(e);return{from:o,to:a<=t.length?a:t.length,of:t.length}},B=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!f(r))throw new Error("This is the total or all pages in numbers, please enter number only");if(!f(e))throw new Error("This is the page active number, please enter number only");if(!f(n))throw new Error("This is the position of ellipsis [...], please enter number only");var t=[],o=Number(r)<Number(e)?Number(r):Number(e),a=Number(e)<1?1:Number(e),i=o+Number(n),u=a-Number(n);if(0===Number(n))for(var l=1;l<=Number(r);l++)t.push(l);else{if(a>1)for(var h=u;h<a;h++)t.push(h);for(var c=o;c<=i;c++)t.push(c)}var s=t.filter((function(r){return r>0})),y=s.filter((function(e){return e<=Number(r)}));return i<Number(r)&&0!==Number(n)&&y.push("..."),u>1&&0!==Number(n)&&y.unshift("..."),y},D=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!i(r))throw new Error("In the first argument, you must enter a data in array");var n=Array.from(r),t=0;if("string"==typeof e&&""!==e){var o=n.map((function(r){return e in r?Number(r[e]):0}));t=o.reduce((function(r,e){return Number(r)+Number(e)}))}else t=n.reduce((function(r,e){return Number(r)+Number(e)}));return t},F=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return Array.from(new Set(e.flat()))},G=function(r){if(!i(r))throw new Error("This argument only accept array");var e,n={},t=new Set,o=a(new Set(r));try{var u=function(){var o=e.value,a=Array.from(r).filter((function(r){return r===o}));t.has(a.length)||(t.add(a.length),n[a.length]=[]),a.forEach((function(r){n[a.length].push(r)}))};for(o.s();!(e=o.n()).done;)u()}catch(r){o.e(r)}finally{o.f()}return n},J=function(r,e){if(!i(r))throw new Error("The first paramenter only accept array");if(!M(e))throw new Error("The second paramenter only accept callback function");return r.filter((function(r){return e(r)})).length},K=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");var t=[],o={};e.forEach((function(r,e){if(i(r)?o[e]=new Set(r):o[e]=(new Set).add(r),0!==e){var n,u=a(r);try{for(u.s();!(n=u.n()).done;){var f=n.value;o[e-1].has(f)&&t.push(f)}}catch(r){u.e(r)}finally{u.f()}}}));var u=G(t);return Array.from(new Set(u[e.length-1]))},Q=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");var t=new Set,o=K.apply(void 0,e);return e.forEach((function(r){if(!i(r))throw new Error("Here only accept arrays from all arguments");var e,n=a(r);try{for(n.s();!(e=n.n()).done;){var u=e.value;o.includes(u)||t.has(u)||t.add(u)}}catch(r){n.e(r)}finally{n.f()}})),Array.from(t)},R=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(!e&&e.length<=1)throw new Error("You have to provide here at least 2 arguments");for(var t=new Set,o=[],a=0,u=e;a<u.length;a++){var f=u[a];if(!i(f))throw new Error("Here only accept arrays from all arguments");f.forEach((function(r){t.has(r)?(t.delete(r),o.push(r)):o.includes(r)||t.add(r)}))}return Array.from(t)},V=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(!e&&e.length<=1)throw new Error("You have to provide here at least 1 value");var o=Array.from(e);o.shift();var a=new Set(W.apply(void 0,[e[0]].concat(n(o))));return Array.from(a)},W=function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];if(!i(r)&&r.length<=0)throw new Error("You need to provide more values to your array");if(!n&&n.length<=0)throw new Error("You have to provide here at least 1 value");var o,u=[],f=a(r);try{for(f.s();!(o=f.n()).done;){var l=o.value;n.flat().includes(l)||u.push(l)}}catch(r){f.e(r)}finally{f.f()}return u},X=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<2&&!i(e[0])&&!i(e[1])&&Number(e[0].length)!==Number(e[1].length))throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var t=Array.from(e[0]).map((function(r){return[]})),o=0,a=e;o<a.length;o++){var u=a[o];u.forEach((function(r,e){e in t&&t[e].push(r)}))}return t},Z=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(e.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var t=Array.from(e),o=[],a=t.shift(),i=function(){var r=f[u],e=new Map;r.forEach((function(r,n){a[n]&&e.set(a[n],r)})),o.push(Object.fromEntries(e))},u=0,f=t;u<f.length;u++)i();return o},_=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<2)throw new Error("You have to provide at least 2 arguments, both in arrays with the same length");for(var o=Array.from(e),a=Object.keys(o[0]),i={},u=0,f=a;u<f.length;u++){var l=f[u];i[l]=[]}for(var h=0,c=o;h<c.length;h++){var s=c[h];for(var y in s)i[y].push(s[y])}return[a].concat(n(X.apply(void 0,n(Object.values(i)))))},rr=function(){if(0===arguments.length||arguments.length>=4)throw new Error("Here only accept 3 arguments, so you have to provide at least 1 argument");var r=1===arguments.length?0:Number(arguments.length<=0?void 0:arguments[0]),e=Number(arguments.length>=2?arguments.length<=1?void 0:arguments[1]:arguments.length<=0?void 0:arguments[0]),n=3===arguments.length?Number(arguments.length<=2?void 0:arguments[2]):1;arguments.length<3&&h(e)&&(n=-1);var t=[],o=0,a=0;if(h(r)&&l(e)?o=r-1:l(r)&&h(e)?o=r+1:l(r)&&l(e)?o=r-1:h(r)&&h(e)&&(o=r+1),o<e){for(;o<e;)o++,n>1?(a+=n)<e&&t.push(a):o<e&&t.push(o);0!==r||t.includes(0)||t.unshift(0)}else if(o>e){for(;o>e;)o--,n<-1?(a-=n)>e&&t.unshift(a):o>e&&t.unshift(o);0!==r||t.includes(0)||t.push(0)}return 1===t.length&&0===t[0]?[]:t},er=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Only accept index of array elements and you must input at least one index in number type");return function(r,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!i(r))throw new Error("Please enter array only here");if(!f(n))throw new Error("Input only index number here");var o,u=Array.from(r),l=[],h=a(e);try{for(h.s();!(o=h.n()).done;){var c=o.value;void 0!==u[Number(c)]&&l.push(u[Number(c)])}}catch(r){h.e(r)}finally{h.f()}var s=N.apply(void 0,[u].concat(e));return s.splice.apply(s,[n,t].concat(l)),s}},nr=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Accept index of array elements only and you add at least one index in number");return function(r){if(!i(r))throw new Error("Please enter array only here");for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];if(0===t.length&&t.length!==e.length&&0!==K(e,t).length)throw new Error("Only accept index of array elements and the number of the first indexes must be the same as the second indexes and also, both indexes must be different");for(var a=Array.from(r),u=Array.from(r),f=0;f<e.length;f++)void 0!==e[f]&&void 0!==t[f]&&(u.splice(e[f],1,a[t[f]]),u.splice(t[f],1,a[e[f]]));return u}},tr=function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Only accept index of array elements and you must enter at least one index in number type");return function(r,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!i(r))throw new Error("Accept array only here");if(!i(n))throw new Error("Accept array only here");if(!f(t))throw new Error("Input only index number here");var o,u=Array.from(r),l=Array.from(n),h=[],c=a(e);try{for(c.s();!(o=c.n()).done;){var s=o.value;void 0!==u[Number(s)]&&h.push(u[Number(s)])}}catch(r){c.e(r)}finally{c.f()}var y=null===t?Number(l.length):t;l.splice.apply(l,[y,0].concat(h));var m=N.apply(void 0,[u].concat(e));return{from:m,to:l}}},or=function(r){if(!i(r))throw new Error("Enter only array type here");return Array.from(r).filter((function(r){return null!=r&&!1!==r&&!isNaN(r)&&""!==r&&r>0}))},ar=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!i(r)&&r.length<=2)throw new Error("Please insert array only on the first argument and must have 3 values at least");if("number"!=typeof e)throw new Error("On the second argument, you must input in a number type only");var n,t=rr(e,r.length,e),o=[],u=a(t);try{for(u.s();!(n=u.n()).done;){var f=n.value,l=r.slice(Number(f)-Number(e),f);o.push(l)}}catch(r){u.e(r)}finally{u.f()}return t[Number(t.length)-1]<=r.length&&o.push(r.slice(t[Number(t.length)-1],r.length)),o},ir=function(r){if(!i(r)&&r.length<=2)throw new Error("This shuffle method only work on data in array type");for(var e=Array.from(r),n=Number(e.length)-1;n>2;n--){var t=e.slice(0,Number(n)+1);e=nr(n)(e,d(t))}return e},ur=function(r,e){if(!i(r))throw new Error("You must enter array literal here");if(!M(e))throw new Error("You have to enter a function or callback on the second argument");var n,t={},o=a(r);try{for(o.s();!(n=o.n()).done;){var u=n.value;void 0===t[e(u).toString()]&&(t[e(u).toString()]=[]),t[e(u).toString()].push(u)}}catch(r){o.e(r)}finally{o.f()}return t},fr=function(r,e,t){if(!i(r))throw new Error("On the first argument, you have to provide array only");if(!Y(e))throw new Error("New property must be in string type");if(!M(t))throw new Error("Callback must be in function or method");return Array.from(r).map((function(r){return r[e]=t.apply(void 0,n(Object.values(r).filter((function(r){return!1===isNaN(r)})))),r}))};export{R as asymmetricDifference,fr as calc,fr as calculate,ar as chunk,or as compact,V as complement,J as countBy,G as countDuplication,N as destroy,Q as difference,k as filter,k as filtered,x as flatten,ur as group,j as hidden,g as index,s as insert,w as insertAfter,v as insertBefore,y as insertFirst,m as insertLast,K as intersection,i as isArray,u as isSuperset,er as move,T as nested,z as pageInfo,$ as pages,U as paginate,B as pagination,d as randomIndex,rr as range,L as search,I as searchBy,O as select,z as show,ir as shuffle,P as sort,H as sortBy,q as sortWith,H as sorted,D as sum,nr as switched,p as toIndex,S as toggle,tr as transfer,X as transpose,F as union,C as unique,_ as unzip,E as update,A as updateBy,W as without,Z as zip};
{
"name": "alga-js",
"version": "0.0.6",
"version": "0.0.7",
"description": "Alga.js is a JavaScript helper to help build UI components by using any of modern web frameworks or libraries",

@@ -5,0 +5,0 @@ "module": "dist/alga.min.js",

import { insert } from "./insertArray.js";
import { insertFirst } from "./insertArray.js";
import { insertLast } from "./insertArray.js";
import { insertBefore } from "./insertArray.js";
import { insertAfter } from "./insertArray.js";
import { update } from "./updateArray.js";
import { updateBy } from "./updateArray.js";
import { destroy } from "./destroyArray.js";

@@ -48,2 +51,2 @@ import { select } from "./selectArray.js";

import { countBy } from "./countArray.js";
export { insert, insertBefore, insertAfter, update, destroy, select, hidden, toggle, flatten, nested, index, toIndex, randomIndex, search, searchBy, filter, filter as filtered, sort, sortBy, sortBy as sorted, sortWith, paginate, pages, pageInfo, pageInfo as show, pagination, sum, calculate, calculate as calc, unique, isArray, isSuperset, union, intersection, difference, asymmetricDifference, complement, without, transpose, zip, unzip, range, move, switched, transfer, compact, chunk, shuffle, group, countDuplication, countBy };
export { insert, insertFirst, insertLast, insertBefore, insertAfter, update, updateBy, destroy, select, hidden, toggle, flatten, nested, index, toIndex, randomIndex, search, searchBy, filter, filter as filtered, sort, sortBy, sortBy as sorted, sortWith, paginate, pages, pageInfo, pageInfo as show, pagination, sum, calculate, calculate as calc, unique, isArray, isSuperset, union, intersection, difference, asymmetricDifference, complement, without, transpose, zip, unzip, range, move, switched, transfer, compact, chunk, shuffle, group, countDuplication, countBy };

@@ -1,13 +0,8 @@

export function insert(...value: any[]): (toArr: any, toPosition?: any, atIndex?: any) => Insert;
export function insertBefore(...value: any[]): (toArr: any, atIndex: any) => any;
export function insertAfter(...value: any[]): (toArr: any, atIndex: any) => any;
declare class Insert {
constructor(valArr: any, toArr: any);
valArr: any;
toArr: any;
first(): any[];
last(): any[];
before(index: any): any;
after(index: any): any;
}
export {};
export function insert(fromArr: any, at?: {
position: any;
index: any;
}, ...restVal: any[]): any[];
export function insertFirst(fromArr: any, ...restVal: any[]): any[];
export function insertLast(fromArr: any, ...restVal: any[]): any[];
export function insertBefore(fromArr: any, atIndex: any, ...restVal: any[]): any[];
export function insertAfter(fromArr: any, atIndex: any, ...restVal: any[]): any[];

@@ -1,1 +0,2 @@

export function update(setObj: any): (oriArr: any, whereObj: any) => any[];
export function update(fromArr: any, setObj: any, whereArg: any): any[];
export function updateBy(fromArr: any, setObj: any, whereArr: any): any[];
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc