2024-12-15 18:40:40 +00:00
|
|
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PejiInspektor=t():e.PejiInspektor=t()}(this,(()=>(()=>{var e={645:function(e){var t;t=()=>(()=>{var e={814:()=>{Array.isEmpty=function(e){return"array"!=Object.getDataType(e)||e.length<=0},Array.toFlatten=function(e,t,n){for(let r=0;r<e.length;r++)n.push(e[r]),null!=typeof e[r][t]&&e[r][t].length>0&&Array.toFlatten(e[r][t],t,n)},Array.prototype.addRange=function(e){return null==e||e.forEach((e=>{this.push(e)})),this},Array.prototype.all=function(e,t){for(let n=0;n<this.length;n++)if(null==e){if(this[n]!=t)return!1}else if(void 0!==this[n][e]&&this[n][e]!=t)return!1;return!0},Array.prototype.any=function(e,t){for(let n=0;n<this.length;n++)if(null==e){if(this[n]==t)return!0}else if(void 0!==this[n][e]&&this[n][e]==t)return!0;return!1},Array.prototype.copy=function(){return JSON.parse(JSON.stringify(this))},Array.prototype.count=function(e,t){let n=0;for(let r=0;r<this.length;r++)null==e?this[r]==t&&n++:void 0!==this[r][e]&&this[r][e]==t&&n++;return n},Array.prototype.countMany=function(...e){let t=0;return e.forEach((e=>{t+=this.count(e.propName,e.value)})),t},Array.prototype.create=function(e,t){let n=[];for(let r=0;r<e;r++)n.push(t);return n},Array.prototype.distinct=function(){return this.filter(((e,t,n)=>t===n.findIndex((t=>JSON.stringify(t)===JSON.stringify(e)))))},Array.prototype.flatten=function(e){let t=[];return Array.toFlatten(this,e,t),t},Array.prototype.get=function(e){return e<0||e>=this.length?"":this[e]},Array.prototype.index=function(e,t){const n=this.indexes(e,t);return n.length<=0?null:n[0]},Array.prototype.indexes=function(e,t){let n=[];for(let r=0;r<this.length;r++)null==e?this[r]==t&&n.push(r):void 0!==this[r][e]&&this[r][e]==t&&n.push(r);return n},Array.prototype.insert=function(e,t){return e<0?this.splice(0,0,t):e>=this.length?this.push(t):this.splice(e,0,t),this},Array.prototype.joinIfNotNullOrWhitespace=function(e){let t="";for(let n=0;n<this.length;n++)String.isNullOrWhitespace(this[n])||(String.isNullOrWhitespace(t)||(t+=e),t+=this[n]);return t},Array.prototype.first=function(e,t){for(let n=0;n<this.length;n++)if(void 0!==this[n][e]&&this[n][e]==t)return this[n];return null},Array.prototype.forEachTree=function(e,t){for(let n=0;n<this.length;n++){if(!1===t(this[n]))return;if(!(this[n][e].length<=0)&&!1===this[n][e].forEachTree(e,t))return}},Array.prototype.orderBy=function(e){return this.sort((function(t,n){return t[e]<n[e]?-1:t[e]>n[e]?1:0})),this},Array.prototype.orderByDesc=function(e){return this.sort((function(t,n){return t[e]<n[e]?1:t[e]>n[e]?-1:0})),this},Array.prototype.remove=function(e){let t=[];for(let n=0;n<this.length;n++)this[n]==e&&t.push(n);for(let e=t.length-1;e>=0;e--)this.removeAt(t[e]);return this},Array.prototype.removeAt=function(e){return e<0||e>=this.length||this.splice(e,1),this},Array.prototype.removeRange=function(e){for(let t=0;t<e.length;t++)this.remove(e[t]);return this},Array.prototype.notSelect=function(e,t){let n=[];for(let r=0;r<this.length;r++)void 0!==this[r][e]&&this[r][e]!=t&&n.push(this[r]);return n},Array.prototype.select=function(e,t){let n=[];for(let r=0;r<this.length;r++)void 0!==this[r][e]&&this[r][e]==t&&n.push(this[r]);return n},Array.prototype.selectMany=function(...e){let t=this;return e.forEach((e=>{t=t.select(e.propName,e.value)})),t},Array.prototype.toList=function(e){let t=[];return this.forEach((n=>{null!=typeof n[e]&&t.push(n[e])})),t},Array.prototype.sortTree=function(e,t){this.orderBy(t);for(let n=0;n<this.length;n++)this[n][e].length<=0||this[n][e].orderBy(t)}},523:()=>{Boolean.isFalse=function(e){return!!String.isNullOrUndefined(e)||e.toString().containsCI("false","f","y","0","x")},Boolean.isTrue=function(e){return!String.isNullOrUndefined(e)&&e.toString().containsCI("true","t","n","1","o")},Boolean.ifTrue=function(e,t,n){return Boolean.isTrue(e)?t:n}},579:()=>{Date.addDays=function(e,t){let n=new Date(e);return n.addDays(t),n},Date.addMonths=function(e,t){let n=new Date(e)
|