@esfaenza/extensions 11.2.44 → 11.2.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("ngx-toastr"),require("sweetalert2"),require("rxjs"),require("rxjs/operators"),require("cerialize")):"function"==typeof define&&define.amd?define("@esfaenza/extensions",["exports","@angular/core","ngx-toastr","sweetalert2","rxjs","rxjs/operators","cerialize"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).esfaenza=t.esfaenza||{},t.esfaenza.extensions={}),t.ng.core,t.ngxToastr,t.swal,t.rxjs,t.rxjs.operators,t.cerialize)}(this,(function(t,e,r,i,n,o,s){"use strict";function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=a(i),c=new e.InjectionToken("EXT_LOCALE"),u=new e.InjectionToken("EXT_FANCY_ALERTS"),p=new e.InjectionToken("APPSEARCH_PREFIX"),d=new e.InjectionToken("EXT_ALLOW_UTC"),f=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:c,useValue:(null==e?void 0:e.locale)||"it-IT"},{provide:u,useValue:(null==e?void 0:e.fancy_alerts)||!0},{provide:p,useValue:(null==e?void 0:e.appsearch_prefix)||"Hot"},{provide:d,useValue:null!=(null==e?void 0:e.allow_utc)&&(null==e?void 0:e.allow_utc)}]}},t}();f.decorators=[{type:e.NgModule}];var h=function(){function t(t,e,r){var i,n,o,s,a,c,u,p,d,f,h;this.toastr=t,this.FANCY_ALERTS=e,this.LOCALE=r,this.loc={Confirm:{"en-US":"Confirm","it-IT":"Conferma"},Cancel:{"en-US":"Cancel","it-IT":"Annulla"},Close:{"en-US":"Close","it-IT":"Chiudi"},Error:{"en-US":"Error","it-IT":"Errore"},Info:{"en-US":"Info","it-IT":"Informazione"},Success:{"en-US":"Success","it-IT":"Successo"},Warning:{"en-US":"Warning","it-IT":"Attenzione"}},this.expiredSessionSwal=l.default.mixin({showCancelButton:!1,confirmButtonText:"Login",customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!1,allowOutsideClick:!1,icon:"warning"}),this.warningSwalWithCancel=l.default.mixin({title:this.loc.Warning[null!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"],customClass:{confirmButton:"btn btn-primary",cancelButton:"btn btn-secondary app-margin-right-10",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!0,confirmButtonText:this.loc.Confirm[null!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"],cancelButtonText:this.loc.Cancel[null!==(o=this.LOCALE)&&void 0!==o?o:"it-IT"],icon:"warning"}),this.warningSwal=l.default.mixin({title:this.loc.Warning[null!==(s=this.LOCALE)&&void 0!==s?s:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(a=this.LOCALE)&&void 0!==a?a:"it-IT"],icon:"warning"}),this.successSwal=l.default.mixin({title:this.loc.Success[null!==(c=this.LOCALE)&&void 0!==c?c:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(u=this.LOCALE)&&void 0!==u?u:"it-IT"],icon:"success"}),this.errorSwal=l.default.mixin({title:this.loc.Error[null!==(p=this.LOCALE)&&void 0!==p?p:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(d=this.LOCALE)&&void 0!==d?d:"it-IT"],icon:"error"}),this.infoSwal=l.default.mixin({title:this.loc.Info[null!==(f=this.LOCALE)&&void 0!==f?f:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(h=this.LOCALE)&&void 0!==h?h:"it-IT"],icon:"info"})}return t.prototype.simpleSuccess=function(t,e,r){void 0===e&&(e=null),void 0===r&&(r=null);var i=this.toastrOrSwal(e);"swal"==i?this.successSwal.fire("",t):this.toastr.success(t,null,{positionClass:"toastr"==i?"toast-top-right":"toast-top-center",timeOut:r||("toastr"==i?0:5e3),extendedTimeOut:"toastr"==i?0:1e3})},t.prototype.simpleInfo=function(t,e,r){void 0===e&&(e=null),void 0===r&&(r=null);var i=this.toastrOrSwal(e);"swal"==i?this.infoSwal.fire("",t):this.toastr.info(t,null,{positionClass:"toastr"==i?"toast-top-right":"toast-top-center",timeOut:r||("toastr"==i?0:5e3),extendedTimeOut:"toastr"==i?0:1e3})},t.prototype.simpleError=function(t,e,r){void 0===e&&(e=null),void 0===r&&(r=null);var i=this.toastrOrSwal(e);"swal"==i?this.errorSwal.fire("",t):this.toastr.error(t,null,{positionClass:"toastr"==i?"toast-top-right":"toast-top-center",timeOut:r||("toastr"==i?0:5e3),extendedTimeOut:"toastr"==i?0:1e3})},t.prototype.simpleWarning=function(t,e,r){void 0===e&&(e=null),void 0===r&&(r=null);var i=this.toastrOrSwal(e);"swal"==i?this.warningSwal.fire("",t):this.toastr.warning(t,null,{positionClass:"toastr"==i?"toast-top-right":"toast-top-center",timeOut:r||("toastr"==i?0:5e3),extendedTimeOut:"toastr"==i?0:1e3})},t.prototype.clearMessages=function(){this.toastr.clear(),l.default.close()},t.prototype.promiseWarningWithChoice=function(t,e){return this.warningSwalWithCancel.fire(t,e)},t.prototype.toastrOrSwal=function(t){return null!=t?t:null==this.FANCY_ALERTS||this.FANCY_ALERTS?"swal":"toastr"},t.prototype.simpleWarningWithChoice=function(t,e,r,i){void 0===r&&(r=null),void 0===i&&(i=null),this.warningSwalWithCancel.fire(t,e).then((function(t){t.value&&r?r():i&&i()}))},t.prototype.observableSimpleWarningWithChoice=function(t,e){return n.of(this.warningSwalWithCancel.fire(t,e)).pipe(o.map((function(t){return!!t.value})))},t.prototype.expiredSessionMessage=function(t,e,r){void 0===r&&(r=null),this.expiredSessionSwal.fire(t,e).then((function(t){t.value&&r&&r()}))},t.prototype.manageCallResultResponse=function(t,e,r,i,n){void 0===i&&(i=null),void 0===n&&(n=null),t.success?(t.haswarning?this.simpleWarning(t.warning):e&&this.simpleSuccess(e),i&&i()):t.haserror&&(this.simpleError((r?r+": ":"")+t.error),n&&n())},t.prototype.manageStringResponse=function(t,e,r,i,n){void 0===i&&(i=null),void 0===n&&(n=null),t?(r&&this.simpleError(r+": "+t),n&&n()):(e&&this.simpleSuccess(e),i&&i())},t.prototype.manageStringResponseBool=function(t,e,r,i,n){void 0===i&&(i=null),void 0===n&&(n=null),t?(e&&this.simpleSuccess(e),i&&i()):(r&&this.simpleError(r),n&&n())},t}();h.decorators=[{type:e.Injectable}],h.ctorParameters=function(){return[{type:r.ToastrService},{type:Boolean,decorators:[{type:e.Optional},{type:e.Inject,args:[u]}]},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]}]};var g=function(){function t(t,e){this.msgService=t,this.LOCALE=e,this.loc={"Unfortunately Firefox doesn't yet support direct Clipboard access if not via extensions, Please use Chrome to do this operation":{"en-US":"Unfortunately Firefox doesn't yet support direct Clipboard access if not via extensions, Please use Chrome to do this operation","it-IT":"Mi dispiace ma Firefox non supporta l'accesso diretto alla Clipboard, se non attraverso le estensioni. Si prega di usare Chrome"},"Generic error during 'copy' command execution":{"en-US":"Generic error during 'copy' command execution","it-IT":"Errore generico durante l'esecuzione del comando 'copy'"},"Error during Clipboard content read operation":{"en-US":"Error during Clipboard content read operation","it-IT":"Errore nella lettura del contenuto della Clipboard"},"Error during Clipboard content copy operation":{"en-US":"Error during Clipboard content copy operation","it-IT":"Errore nella scrittura del contenuto nella Clipboard"}}}return t.prototype.getClipboard=function(t,e){var r,i=this;if(-1==navigator.userAgent.indexOf("Firefox"))if(window.clipboardData){console.log("[@esfaenza/extensions] Found clipboardData");var n=window.clipboardData.getData("Text");console.log("[@esfaenza/extensions] Retrieved clipboard values: "+n);var o="array"==t?this.getClipboardLines(n):"matrix"==t?this.getClipboardMatrix(n):[];console.log("[@esfaenza/extensions] Adapted for "+t+": "+JSON.stringify(o)),e&&e(o)}else window.navigator.clipboard&&(console.log("[@esfaenza/extensions] Found navigator clipboard"),window.navigator.permissions.query({name:"clipboard-read"}).then((function(r){if("granted"!==r.state&&"prompt"!==r.state)return console.error("[@esfaenza/extensions] Clipboard permission not granted"),void(e&&e([]));console.log("[@esfaenza/extensions] Clipboard permission granted, retrieving values"),window.navigator.clipboard.readText().then((function(r){console.log("[@esfaenza/extensions] Retrieved clipboard values: "+r);var n="array"==t?i.getClipboardLines(r):"matrix"==t?i.getClipboardMatrix(r):[];console.log("[@esfaenza/extensions] Adapted for "+t+": "+JSON.stringify(n)),e&&e(n)})).catch((function(t){var e;i.msgService.simpleError(i.loc["Error during Clipboard content read operation"][null!==(e=i.LOCALE)&&void 0!==e?e:"it-IT"]+": "+t)}))})));else this.msgService.simpleError(this.loc["Unfortunately Firefox doesn't yet support direct Clipboard access if not via extensions, Please use Chrome to do this operation"][null!==(r=this.LOCALE)&&void 0!==r?r:"it-IT"])},t.prototype.getClipboardLines=function(t){return t.trim().split("\r\n")},t.prototype.getClipboardMatrix=function(t){for(var e=[],r=t.split("\r\n"),i=0;i<r.length;i++)e.push(r[i].split("\t").map((function(t){return t.trim()})));return e},t.prototype.copyTextToClipboard=function(t){var e,r,i=document.createElement("textarea");i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="2em",i.style.height="2em",i.style.padding="0",i.style.border="none",i.style.outline="none",i.style.boxShadow="none",i.style.background="transparent",i.value=t,document.body.appendChild(i),i.focus(),i.select();try{document.execCommand("copy")||this.msgService.simpleError(this.loc["Generic error during 'copy' command execution"][null!==(e=this.LOCALE)&&void 0!==e?e:"it-IT"])}catch(t){this.msgService.simpleError(this.loc["Error during Clipboard content copy operation"][null!==(r=this.LOCALE)&&void 0!==r?r:"it-IT"]+": "+t)}document.body.removeChild(i)},t}();g.decorators=[{type:e.Injectable}],g.ctorParameters=function(){return[{type:h},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]}]};var v=function(){function t(t,e){var r,i,n,o,s,a,l,c;this.LOCALE=t,this.allowUtc=e,this.loc={SMALL_DATE_FORMAT:{"en-US":"MM/DD/YYYY","it-IT":"DD/MM/YYYY"},FULL_DATE_FORMAT:{"en-US":"MM/DD/YYYY HH:mm:ss","it-IT":"DD/MM/YYYY HH:mm:ss"},FULL_DATE_FORMAT_NO_SS:{"en-US":"MM/DD/YYYY HH:mm","it-IT":"DD/MM/YYYY HH:mm"},SMALL_DATE_DISPLAY_FORMAT:{"en-US":"DD/MM/YYYY","it-IT":"DD/MM/YYYY"},SMALL_DATE_DISPLAY_FORMAT_WITH_HOUR:{"en-US":"DD/MM/YYYY HH","it-IT":"DD/MM/YYYY HH"},SMALL_DATE_DISPLAY_FORMAT_WITH_MINUTE:{"en-US":"DD/MM/YYYY HH:mm","it-IT":"DD/MM/YYYY HH:mm"},FULL_DATE_DISPLAY_FORMAT:{"en-US":"DD/MM/YYYY HH:mm:ss","it-IT":"DD/MM/YYYY HH:mm:ss"},FULL_DATE_DISPLAY_FORMAT_NO_SS:{"en-US":"DD/MM/YYYY HH:mm","it-IT":"DD/MM/YYYY HH:mm"}},this.cfg={fulldate:"",fulldateDisplay:"",smallDate:"",fulldateNoSS:"",smallDateWithH:"",smallDateWithM:"",fulldateDisplayNoSS:""},this.cfg.smallDate=this.loc.SMALL_DATE_FORMAT[null!==(r=this.LOCALE)&&void 0!==r?r:"it-IT"],this.cfg.fulldate=this.loc.FULL_DATE_FORMAT[null!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"],this.cfg.fulldateNoSS=this.loc.FULL_DATE_FORMAT_NO_SS[null!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"],this.cfg.fulldateDisplay=this.loc.FULL_DATE_DISPLAY_FORMAT[null!==(o=this.LOCALE)&&void 0!==o?o:"it-IT"],this.cfg.fulldateDisplayNoSS=this.loc.FULL_DATE_DISPLAY_FORMAT_NO_SS[null!==(s=this.LOCALE)&&void 0!==s?s:"it-IT"],this.cfg.smallDate=this.loc.SMALL_DATE_DISPLAY_FORMAT[null!==(a=this.LOCALE)&&void 0!==a?a:"it-IT"],this.cfg.smallDateWithH=this.loc.SMALL_DATE_DISPLAY_FORMAT_WITH_HOUR[null!==(l=this.LOCALE)&&void 0!==l?l:"it-IT"],this.cfg.smallDateWithM=this.loc.SMALL_DATE_DISPLAY_FORMAT_WITH_MINUTE[null!==(c=this.LOCALE)&&void 0!==c?c:"it-IT"]}return t.prototype.adjustDateToFinalInstant=function(t,e,r){void 0===r&&(r=!0);var i=this.getDateConvertion(t);if(null==i)return"FE: Not a Date";if(!(i.startOf(e).valueOf()===i.valueOf()))return"day"==e&&i.subtract(1,"hour").hour()==i.hour()&&(i=i.add(1,"hour")),r?i.format(this.cfg.fulldateDisplay):i.format(this.cfg.fulldateDisplayNoSS);var n=i.subtract(1,e),o="";return"day"==e?o=n.format(this.cfg.smallDate)+" 24:00"+(r?":00":""):"hour"==e?o=n.format(this.cfg.smallDateWithH)+":60"+(r?":00":""):"minute"==e&&(o=n.format(this.cfg.smallDateWithM)+":60"),o},t.prototype.dateSort=function(t,e,r){return t<e?"asc"==r?1:-1:t>e?"asc"==r?-1:1:0},t.prototype.trimSeconds=function(t){return isNaN(t)&&/^\d\d\/\d\d\/\d\d\d\d \d\d:\d\d:\d\d$/g.test(t)?"'"+t.substr(0,t.length-3):t},t.prototype.getMinMaxDatesRange=function(t,e){for(var r=[],i=[],n=0;n<t.length;n++){var o=t[n];(s=this.getDateConvertion(o))&&r.push(s)}for(n=0;n<e.length;n++){var s;o=e[n];(s=this.getDateConvertion(o))&&i.push(s)}return{from:dayjs.min(r),to:dayjs.max(i)}},t.prototype.getDateConvertion=function(t,e){if(void 0===e&&(e=!1),!t)return null;if(this.isDayJs(t))return t;if(this.isJsDate(t))return e?dayjs.utc(t):dayjs(t);var r=t.length;if(!r)return null;if(e&&!this.allowUtc)throw"@esfaenza/extensions: Richiesta data UTC ma da configurazione la libreria non lo supporta";var i=null,n=e?dayjs.utc:dayjs;return t.includes("T")?i=n(t):r==this.cfg.fulldate.length?i=n(t,this.cfg.fulldate):r==this.cfg.smallDate.length?i=n(t,this.cfg.smallDate):r==this.cfg.fulldateNoSS.length&&(i=n(t,this.cfg.fulldateNoSS)),i&&i.isValid&&i.isValid()?i:null},t.prototype.isJsDate=function(t){return t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t)},t.prototype.isDayJs=function(t){return void 0!==t.$D&&void 0!==t.$M&&void 0!==t.$y},t.prototype.getFormatted=function(t,e,r){return(t=this.getDateConvertion(t))?t.format(e?this.cfg.smallDate:r?this.cfg.fulldateDisplay:this.cfg.fulldateDisplayNoSS):null},t}();v.decorators=[{type:e.Injectable}],v.ctorParameters=function(){return[{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]},{type:Boolean,decorators:[{type:e.Optional},{type:e.Inject,args:[d]}]}]};var y="_csvnav",m="_csvord",b="_csvvis",S="_csvhdr",C="_csvkey",T="_listcsvval",w="_listcsvhdr",x="_listcsvvalformat",A="_flatlistcsvval",O="_flatlistcsvhdr",L="_csvfmt",D="__export_list__",_=function(){function t(t){this.dates=t}return t.prototype.setupForExport=function(t,e){void 0===e&&(e=[]);var r=[],i={};if(!t||0==t.length)return r;var n={};if((null==e?void 0:e.length)>0)for(var o=0;o<(null==e?void 0:e.length);o++)n[e[o]]=!0;for(o=0;o<t.length;o++)for(var s=this.parseAndGetHeaders(t[o],n),a=0;a<s.length;a++)i[s[a].key]||(i[s[a].key]=!0,r.push(s[a]));if(e){var l=[];for(o=0;o<e.length;o++)for(var c=e[o],u=0;u<r.length;u++)if(r[u].propKey==c){l.push(r[u]);break}return l}return r.sort((function(t,e){return t.order-e.order}))},t.prototype.setupForGenericExport=function(t,e){var r=this,i=[];return t&&0!=t.length?(t.forEach((function(t,n){0==n?i=r.parseAndGetGenericHeaders(t,e):r.parseAndGetGenericHeaders(t,e)})),i):i},t.prototype.parseAndGetGenericHeaders=function(t,e){if(!t.properties)return null;var r=[];return e.forEach((function(e){var i=t.properties[e.key];Object.defineProperty(t,e.key+"_exp",{value:i,writable:!1,enumerable:!0}),r.push({label:e.label,key:e.key+"_exp",order:e.order,type:e.type,propKey:null})})),r.sort((function(t,e){return t.order-e.order}))},t.prototype.parseAndGetHeaders=function(t,e){var r=[],i=t[D]||[];0==i.length&&console.warn("[@esfaenza/extensions] Nessuna colonna configurata da esportare!");for(var n=0;n<i.length;n++){var o=i[n],s="",a=void 0;o.endsWith(w)?(s=o.replace(w,""),a=this.parseList.bind(this)):o.endsWith(O)?(a=this.parseDictionary.bind(this),s=o.replace(O,"")):o.endsWith(b)&&(a=void 0!==t[(s=o.replace(b,""))+y]?this.parseObject.bind(this):this.parseProperty.bind(this)),a&&a(t,s,r,e)}return r},t.prototype.parseProperty=function(t,e,r,i){var n=t[e+b],o=t[e+L],s=t[e+C];if(!s||i[s]){var a=t[e+S],l=t[e+m];if(n&&"undefined"!==a)if(o)if("F"==o){var c=null!=t[e]?t[e].toString():"",u=(c=c.replace(/,/,"")).replace(".",",");Object.defineProperty(t,e+"_fmt",{value:u,writable:!1,enumerable:!0}),r.push({label:a||e+"_fmt",key:e+"_fmt",order:l,type:"number",propKey:s})}else{var p=this.dates.getFormatted(t[e],o.length<=10,o.length>16);Object.defineProperty(t,e+"_fmt",{value:null!=p?p:"",writable:!1,enumerable:!0}),r.push({label:a||e+"_fmt",key:e+"_fmt",order:l,type:"date",propKey:s})}else{var d=t[e]?this.dates.trimSeconds(t[e].toString()):"";Object.defineProperty(t,e+"_nofmt",{value:d,writable:!1,enumerable:!0}),r.push({label:a||e+"_nofmt",key:e+"_nofmt",order:l,type:"string",propKey:s})}}else console.log("[@esfaenza/extensions] Colonna da non esportare: "+s)},t.prototype.parseObject=function(t,e,r){var i=t[e+y].split("."),n=JSON.parse(JSON.stringify(t));i.forEach((function(t){n=n[t]}));var o=n,s=t[e+S],a=t[e+m],l=t[e+L],c="string";if("F"==l){var u=o.toString();o=(u=u.replace(/,/,"")).replace(".",","),c="number"}else l&&(o=this.dates.getFormatted(o,l.length<=10,l.length>16),c="date");Object.defineProperty(t,e,{value:o,writable:!1,enumerable:!0}),r.push({label:s||e,key:e,order:a,type:c,propKey:null})},t.prototype.parseList=function(t,e,r){for(var i,n,o,s,a=t[e+w],l=t[e+T],c=t[e+x],u=t[e+m],p=t[e],d=function(d){var h=p[d];o=a.split(" "),s="",o.forEach((function(t){i=t.split("."),n=JSON.parse(JSON.stringify(h)),i.forEach((function(t){n=n[t]})),s?s+=" "+n:s=n})),i=l.split("."),n=JSON.parse(JSON.stringify(h)),i.forEach((function(t){n=n[t]}));var g=n,v="string";if("F"==c){var y=null!=g?g.toString():"";g=(y=y.replace(/,/,"")).replace(".",","),v="number"}else c&&(g=f.dates.getFormatted(t[e],c.length<=10,c.length>16),v="date");Object.defineProperty(t,e+d,{value:g,writable:!1}),r.push({label:s,key:e+d,order:u+d,type:v,propKey:null})},f=this,h=0;h<p.length;h++)d(h)},t.prototype.parseDictionary=function(t,e,r){for(var i,n,o,s,a=t[e+O],l=t[e+A],c=t[e+m],u=t[e],p=function(p){var d=u[p];o=a.split(" "),s="",o.forEach((function(t){i=t.split("."),n=JSON.parse(JSON.stringify(d)),i.forEach((function(t){n=n[t]})),s?s+=" "+n:s=n})),l.split(",").forEach((function(o,a){var l=o.split("-")[1],u=o.split("-")[0];i=l.split("."),n=JSON.parse(JSON.stringify(d)),i.forEach((function(t){n=n[t]}));var f=n,h=e+p.toString()+a.toString();Object.defineProperty(t,h,{value:f,writable:!1}),r.push({label:s+" "+u,key:h,order:c+p,type:"string",propKey:null})}))},d=0;d<u.length;d++)p(d)},t.prototype.deserializeForExport=function(t,e){return s.Deserialize(t,e)},t}();_.decorators=[{type:e.Injectable}],_.ctorParameters=function(){return[{type:v}]};var I,E=function(){function t(){this.objBlacklist={NgForm:!0,ElementRef:!0,ExtensionsService:!0,ToastrService:!0,LocaleService:!0,AppState:!0,Router:!0,ActivatedRoute:!0,HTTPService:!0,Location:!0,CanvasComponent:!0,ModalDirective:!0,ChangeDetectorRef:!0,DateService:!0,EventEmitter:!0,ViewRef_:!0,Subscriber:!0,ItemLocalization:!0},this.hex_chr="0123456789abcdef".split("")}return t.prototype.getGUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t.prototype.hashObject=function(t,e,r,i){void 0===e&&(e=0),void 0===r&&(r=!1),void 0===i&&(i=!1);var n=this.stringify(t,e,r);return i?this.md5(n):this.simpleHash(n)},t.prototype.simpleHash=function(t,e){void 0===e&&(e=0);for(var r=3735928559^e,i=1103547991^e,n=0,o=void 0;n<t.length;n++)o=t.charCodeAt(n),r=Math.imul(r^o,2654435761),i=Math.imul(i^o,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&(i=Math.imul(i^i>>>16,2246822507)^Math.imul(r^r>>>13,3266489909)))+(r>>>0)).toString()},t.prototype.stringify=function(t,e,r){var i,n;if(null===t)return"n";if(!0===t)return"t";if(!1===t)return"f";if(t instanceof Date)return"d:"+t.valueOf().toString();if("string"===(i=typeof t))return"s:"+t;if("number"===i)return"n:"+t;if(t instanceof Function)return"m:"+t.toString();if(t instanceof Array){for(n=[],i=0;i<t.length;i++){(s=this.stringify(t[i],e,r))&&n.push(s)}return n.length>0?"a:"+n.join(";"):""}if(n=[],t){var o=t.__proto__.constructor.name;if(!this.objBlacklist[o])for(i in t){var s;if(t.hasOwnProperty(i)&&(e<=2||r))(s=this.stringify(t[i],e+1,r))&&n.push(i+":"+s)}}return n.length>0?"o:"+n.join(";"):""},t.prototype.md5=function(t){return this.hex(this.md51(t))},t.prototype.md5cycle=function(t,e){var r=t[0],i=t[1],n=t[2],o=t[3];r=this.ff(r,i,n,o,e[0],7,-680876936),o=this.ff(o,r,i,n,e[1],12,-389564586),n=this.ff(n,o,r,i,e[2],17,606105819),i=this.ff(i,n,o,r,e[3],22,-1044525330),r=this.ff(r,i,n,o,e[4],7,-176418897),o=this.ff(o,r,i,n,e[5],12,1200080426),n=this.ff(n,o,r,i,e[6],17,-1473231341),i=this.ff(i,n,o,r,e[7],22,-45705983),r=this.ff(r,i,n,o,e[8],7,1770035416),o=this.ff(o,r,i,n,e[9],12,-1958414417),n=this.ff(n,o,r,i,e[10],17,-42063),i=this.ff(i,n,o,r,e[11],22,-1990404162),r=this.ff(r,i,n,o,e[12],7,1804603682),o=this.ff(o,r,i,n,e[13],12,-40341101),n=this.ff(n,o,r,i,e[14],17,-1502002290),i=this.ff(i,n,o,r,e[15],22,1236535329),r=this.gg(r,i,n,o,e[1],5,-165796510),o=this.gg(o,r,i,n,e[6],9,-1069501632),n=this.gg(n,o,r,i,e[11],14,643717713),i=this.gg(i,n,o,r,e[0],20,-373897302),r=this.gg(r,i,n,o,e[5],5,-701558691),o=this.gg(o,r,i,n,e[10],9,38016083),n=this.gg(n,o,r,i,e[15],14,-660478335),i=this.gg(i,n,o,r,e[4],20,-405537848),r=this.gg(r,i,n,o,e[9],5,568446438),o=this.gg(o,r,i,n,e[14],9,-1019803690),n=this.gg(n,o,r,i,e[3],14,-187363961),i=this.gg(i,n,o,r,e[8],20,1163531501),r=this.gg(r,i,n,o,e[13],5,-1444681467),o=this.gg(o,r,i,n,e[2],9,-51403784),n=this.gg(n,o,r,i,e[7],14,1735328473),i=this.gg(i,n,o,r,e[12],20,-1926607734),r=this.hh(r,i,n,o,e[5],4,-378558),o=this.hh(o,r,i,n,e[8],11,-2022574463),n=this.hh(n,o,r,i,e[11],16,1839030562),i=this.hh(i,n,o,r,e[14],23,-35309556),r=this.hh(r,i,n,o,e[1],4,-1530992060),o=this.hh(o,r,i,n,e[4],11,1272893353),n=this.hh(n,o,r,i,e[7],16,-155497632),i=this.hh(i,n,o,r,e[10],23,-1094730640),r=this.hh(r,i,n,o,e[13],4,681279174),o=this.hh(o,r,i,n,e[0],11,-358537222),n=this.hh(n,o,r,i,e[3],16,-722521979),i=this.hh(i,n,o,r,e[6],23,76029189),r=this.hh(r,i,n,o,e[9],4,-640364487),o=this.hh(o,r,i,n,e[12],11,-421815835),n=this.hh(n,o,r,i,e[15],16,530742520),i=this.hh(i,n,o,r,e[2],23,-995338651),r=this.ii(r,i,n,o,e[0],6,-198630844),o=this.ii(o,r,i,n,e[7],10,1126891415),n=this.ii(n,o,r,i,e[14],15,-1416354905),i=this.ii(i,n,o,r,e[5],21,-57434055),r=this.ii(r,i,n,o,e[12],6,1700485571),o=this.ii(o,r,i,n,e[3],10,-1894986606),n=this.ii(n,o,r,i,e[10],15,-1051523),i=this.ii(i,n,o,r,e[1],21,-2054922799),r=this.ii(r,i,n,o,e[8],6,1873313359),o=this.ii(o,r,i,n,e[15],10,-30611744),n=this.ii(n,o,r,i,e[6],15,-1560198380),i=this.ii(i,n,o,r,e[13],21,1309151649),r=this.ii(r,i,n,o,e[4],6,-145523070),o=this.ii(o,r,i,n,e[11],10,-1120210379),n=this.ii(n,o,r,i,e[2],15,718787259),i=this.ii(i,n,o,r,e[9],21,-343485551),t[0]=this.add32(r,t[0]),t[1]=this.add32(i,t[1]),t[2]=this.add32(n,t[2]),t[3]=this.add32(o,t[3])},t.prototype.cmn=function(t,e,r,i,n,o){return e=this.add32(this.add32(e,t),this.add32(i,o)),this.add32(e<<n|e>>>32-n,r)},t.prototype.ff=function(t,e,r,i,n,o,s){return this.cmn(e&r|~e&i,t,e,n,o,s)},t.prototype.gg=function(t,e,r,i,n,o,s){return this.cmn(e&i|r&~i,t,e,n,o,s)},t.prototype.hh=function(t,e,r,i,n,o,s){return this.cmn(e^r^i,t,e,n,o,s)},t.prototype.ii=function(t,e,r,i,n,o,s){return this.cmn(r^(e|~i),t,e,n,o,s)},t.prototype.md51=function(t){var e,r=t.length,i=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)this.md5cycle(i,this.md5blk(t.substring(e-64,e)));t=t.substring(e-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)n[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(n[e>>2]|=128<<(e%4<<3),e>55)for(this.md5cycle(i,n),e=0;e<16;e++)n[e]=0;return n[14]=8*r,this.md5cycle(i,n),i},t.prototype.md5blk=function(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r},t.prototype.rhex=function(t){for(var e="",r=0;r<4;r++)e+=this.hex_chr[t>>8*r+4&15]+this.hex_chr[t>>8*r&15];return e},t.prototype.hex=function(t){for(var e=0;e<t.length;e++)t[e]=this.rhex(t[e]);return t.join("")},t.prototype.add32=function(t,e){return t+e&4294967295},t}();E.decorators=[{type:e.Injectable}],function(t){t[t.Empty=0]="Empty",t[t.Obj=1]="Obj",t[t.DBNull=2]="DBNull",t[t.Boolean=3]="Boolean",t[t.Char=4]="Char",t[t.SByte=5]="SByte",t[t.Byte=6]="Byte",t[t.Int16=7]="Int16",t[t.UInt16=8]="UInt16",t[t.Int32=9]="Int32",t[t.UInt32=10]="UInt32",t[t.Int64=11]="Int64",t[t.UInt64=12]="UInt64",t[t.Single=13]="Single",t[t.Double=14]="Double",t[t.Decimal=15]="Decimal",t[t.DateTime=16]="DateTime",t[t.String=18]="String"}(I||(I={}));var M=function(){function t(){}return t.prototype.clearTextSelection=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()},t.prototype.getSelectedItem=function(t,e,r){for(var i=0;i<t.length;i++){var n=t[i];if(n[e]==r)return n}return null},t.prototype.cleanForm=function(t,e,r){for(var i in void 0===e&&(e=null),void 0===r&&(r=null),t.controls)i&&i!=e&&i!=e+"_internal"&&i!=r&&i!=r+"_internal"?t.controls[i].reset():(t.controls[i].markAsPristine(),t.controls[i].markAsUntouched());t.submitted=!1},t.prototype.fileDownload=function(t,e){var r=document.createElement("a");document.body.appendChild(r),r.className="ta-display-none",r.href=t,r.download=e,r.click(),window.URL.revokeObjectURL(t),document.body.removeChild(r)},t.prototype.msToTime=function(t){if(!t)return"";var e=parseInt((t%1e3/100).toString()),r=parseInt((t/1e3%60).toString()),i=parseInt((t/6e4%60).toString()),n=parseInt((t/36e5%24).toString());return(n<10?"0"+n:n)+":"+(i<10?"0"+i:i)+":"+(r<10?"0"+r:r)+"."+e},t.prototype.saveFile=function(t,e){var r=this.base64ToArrayBuffer(t);this.saveByteArray(r,e)},t.prototype.base64ToArrayBuffer=function(t){for(var e=window.atob(t),r=e.length,i=new Uint8Array(r),n=0;n<r;n++){var o=e.charCodeAt(n);i[n]=o}return i},t.prototype.saveByteArray=function(t,e){var r=new Blob([t]),i=document.createElement("a");document.body.appendChild(i),i.href=window.URL.createObjectURL(r);var n=e;i.download=n,i.click(),document.body.removeChild(i)},t.prototype.swap=function(t,e,r){var i=t[e];t[e]=t[r],t[r]=i},t.prototype.getJsTypeFromTypeCode=function(t){switch(t){case I.Boolean:return"boolean";case I.Decimal:case I.Double:case I.Single:case I.Int16:case I.Int32:case I.Int64:case I.Byte:case I.SByte:case I.UInt16:case I.UInt32:case I.UInt64:return"number";case I.Char:case I.String:return"string";case I.DateTime:return"date";default:return console.log("Unrecognized input type. Typecode:"+t),"string"}},t.prototype.deepClone=function(t){if(null==t||"object"!=typeof t)return t;switch(toString.call(t)){case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new t.constructor(t.valueOf())}return this.recursiveStep(t,Array.isArray(t)||t instanceof Array?[]:Object.create(Object.getPrototypeOf(t)))},t.prototype.recursiveStep=function(t,e){if(Array.isArray(t)||t instanceof Array)for(var r=0,i=t.length;r<i;r++)e.push(this.deepClone(t[r]));else if(t&&"function"==typeof t.hasOwnProperty)for(var n in t)t.hasOwnProperty(n)&&(e[n]=this.deepClone(t[n]));return e},t}();M.decorators=[{type:e.Injectable}];var j=function(t,e){this.type=t,this.message=e},Y=function(){function t(){this.outbounds={},this.inbounds=new n.Subject}return t.prototype.send=function(t,e,r){var i=new j(t,e);r?this.outbounds[r]?this.outbounds[r].next(i):console.warn("@esfaenza/extensions - InterComService: Impossibile inviare il messaggio al recipient "+r+" assicurarsi che il modulo sia caricato e che effettui la chiamata al metodo 'regisster'"):this.inbounds.next(i)},t.prototype.register=function(t){if(this.outbounds[t])throw"@esfaenza/extensions - InterComService: Impossibile registrare più volte lo stesso modulo";this.outbounds[t]=new n.Subject},t}();Y.decorators=[{type:e.Injectable}];var P=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[g,v,_,E,h,M,Y,{provide:c,useValue:(null==e?void 0:e.locale)||"it-IT"},{provide:u,useValue:(null==e?void 0:e.fancy_alerts)||!0},{provide:p,useValue:(null==e?void 0:e.appsearch_prefix)||"Hot"},{provide:d,useValue:null!=(null==e?void 0:e.allow_utc)&&(null==e?void 0:e.allow_utc)}]}},t}();P.decorators=[{type:e.NgModule}];var U,F=function(){},R=function(){},B=function(){};t.InboundMessageTypes=void 0,(U=t.InboundMessageTypes||(t.InboundMessageTypes={}))[U.Navigation=0]="Navigation",t.APPSEARCH_PREFIX=p,t.CallResult=F,t.ClipboardService=g,t.CsvHeaders=R,t.DateService=v,t.EXT_ALLOW_UTC=d,t.EXT_FANCY_ALERTS=u,t.EXT_LOCALE=c,t.Export=function(t,e,r,i){return void 0===r&&(r=null),void 0===i&&(i=null),function(n,o){r&&Object.defineProperty(n,o+L,{value:r,writable:!1}),Object.defineProperty(n,o+m,{value:t,writable:!1}),Object.defineProperty(n,o+b,{value:!!e,writable:!1}),Object.defineProperty(n,o+S,{value:e,writable:!1}),i&&Object.defineProperty(n,o+C,{value:i,writable:!1}),n[D]?n[D].push(o+b):n[D]=[o+b]}},t.ExportAs=function(t,e){return function(r,i){var n=new e;for(var o in n)if(void 0!==n[o+b]){var s=n[o+b],a=n[o+S],l=n[o+L],c=n[o+m];l&&Object.defineProperty(r,i+o+L,{value:l,writable:!1}),Object.defineProperty(r,i+o+m,{value:c+t,writable:!1}),Object.defineProperty(r,i+o,{value:null,writable:!0,enumerable:!0}),Object.defineProperty(r,i+o+y,{value:i+"."+o,writable:!1}),Object.defineProperty(r,i+o+b,{value:s,writable:!1}),Object.defineProperty(r,i+o+S,{value:a,writable:!1}),r[D]?r[D].push(i+o+b):r[D]=[i+o+b]}}},t.ExportDictionary=function(t,e,r){return function(i,n){Object.defineProperty(i,n+m,{value:t,writable:!1}),Object.defineProperty(i,n+A,{value:r,writable:!1}),Object.defineProperty(i,n+O,{value:e,writable:!1}),i[D]?i[D].push(n+O):i[D]=[n+O]}},t.ExportList=function(t,e,r,i){return void 0===i&&(i=null),function(n,o){Object.defineProperty(n,o+m,{value:t,writable:!1}),Object.defineProperty(n,o+T,{value:r,writable:!1}),Object.defineProperty(n,o+w,{value:e,writable:!1}),Object.defineProperty(n,o+x,{value:i,writable:!1}),n[D]?n[D].push(o+w):n[D]=[o+w]}},t.ExportService=_,t.ExtensionsModule=f,t.FullExtensionsModule=P,t.GenericItem=B,t.HashingService=E,t.InterComMessage=j,t.InterComService=Y,t.MessageService=h,t.UtilityService=M,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("ngx-toastr"),require("sweetalert2"),require("rxjs"),require("rxjs/operators"),require("cerialize")):"function"==typeof define&&define.amd?define("@esfaenza/extensions",["exports","@angular/core","ngx-toastr","sweetalert2","rxjs","rxjs/operators","cerialize"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).esfaenza=t.esfaenza||{},t.esfaenza.extensions={}),t.ng.core,t.ngxToastr,t.swal,t.rxjs,t.rxjs.operators,t.cerialize)}(this,(function(t,e,i,n,r,o,s){"use strict";function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=a(n),c=new e.InjectionToken("EXT_LOCALE"),u=new e.InjectionToken("EXT_FANCY_ALERTS"),p=new e.InjectionToken("APPSEARCH_PREFIX"),h=new e.InjectionToken("EXT_ALLOW_UTC"),d=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:c,useValue:(null==e?void 0:e.locale)||"it-IT"},{provide:u,useValue:(null==e?void 0:e.fancy_alerts)||!0},{provide:p,useValue:(null==e?void 0:e.appsearch_prefix)||"Hot"},{provide:h,useValue:null!=(null==e?void 0:e.allow_utc)&&(null==e?void 0:e.allow_utc)}]}},t}();d.decorators=[{type:e.NgModule}];var f=function(){function t(t,e,i){var n,r,o,s,a,c,u,p,h,d,f,v,g,y;this.toastr=t,this.FANCY_ALERTS=e,this.LOCALE=i,this.loc={Confirm:{"en-US":"Confirm","it-IT":"Conferma"},Cancel:{"en-US":"Cancel","it-IT":"Annulla"},Close:{"en-US":"Close","it-IT":"Chiudi"},Error:{"en-US":"Error","it-IT":"Errore"},Info:{"en-US":"Info","it-IT":"Informazione"},Success:{"en-US":"Success","it-IT":"Successo"},Warning:{"en-US":"Warning","it-IT":"Attenzione"}},this.expiredSessionSwal=l.default.mixin({showCancelButton:!1,confirmButtonText:"Login",customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!1,allowOutsideClick:!1,icon:"warning"}),this.successSwalWithCancel=l.default.mixin({title:this.loc.Success[null!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"],customClass:{confirmButton:"btn btn-primary",cancelButton:"btn btn-secondary app-margin-right-10",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!0,confirmButtonText:this.loc.Confirm[null!==(r=this.LOCALE)&&void 0!==r?r:"it-IT"],cancelButtonText:this.loc.Cancel[null!==(o=this.LOCALE)&&void 0!==o?o:"it-IT"],icon:"success"}),this.warningSwalWithCancel=l.default.mixin({title:this.loc.Warning[null!==(s=this.LOCALE)&&void 0!==s?s:"it-IT"],customClass:{confirmButton:"btn btn-primary",cancelButton:"btn btn-secondary app-margin-right-10",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!0,confirmButtonText:this.loc.Confirm[null!==(a=this.LOCALE)&&void 0!==a?a:"it-IT"],cancelButtonText:this.loc.Cancel[null!==(c=this.LOCALE)&&void 0!==c?c:"it-IT"],icon:"warning"}),this.warningSwal=l.default.mixin({title:this.loc.Warning[null!==(u=this.LOCALE)&&void 0!==u?u:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(p=this.LOCALE)&&void 0!==p?p:"it-IT"],icon:"warning"}),this.successSwal=l.default.mixin({title:this.loc.Success[null!==(h=this.LOCALE)&&void 0!==h?h:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(d=this.LOCALE)&&void 0!==d?d:"it-IT"],icon:"success"}),this.errorSwal=l.default.mixin({title:this.loc.Error[null!==(f=this.LOCALE)&&void 0!==f?f:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(v=this.LOCALE)&&void 0!==v?v:"it-IT"],icon:"error"}),this.infoSwal=l.default.mixin({title:this.loc.Info[null!==(g=this.LOCALE)&&void 0!==g?g:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(y=this.LOCALE)&&void 0!==y?y:"it-IT"],icon:"info"})}return t.prototype.simpleSuccess=function(t,e,i){void 0===e&&(e=null),void 0===i&&(i=null);var n=this.toastrOrSwal(e);"swal"==n?this.successSwal.fire("",t):this.toastr.success(t,null,{positionClass:"toastr"==n?"toast-top-right":"toast-top-center",timeOut:i||("toastr"==n?0:5e3),extendedTimeOut:"toastr"==n?0:1e3})},t.prototype.simpleInfo=function(t,e,i){void 0===e&&(e=null),void 0===i&&(i=null);var n=this.toastrOrSwal(e);"swal"==n?this.infoSwal.fire("",t):this.toastr.info(t,null,{positionClass:"toastr"==n?"toast-top-right":"toast-top-center",timeOut:i||("toastr"==n?0:5e3),extendedTimeOut:"toastr"==n?0:1e3})},t.prototype.simpleError=function(t,e,i){void 0===e&&(e=null),void 0===i&&(i=null);var n=this.toastrOrSwal(e);"swal"==n?this.errorSwal.fire("",t):this.toastr.error(t,null,{positionClass:"toastr"==n?"toast-top-right":"toast-top-center",timeOut:i||("toastr"==n?0:5e3),extendedTimeOut:"toastr"==n?0:1e3})},t.prototype.simpleWarning=function(t,e,i){void 0===e&&(e=null),void 0===i&&(i=null);var n=this.toastrOrSwal(e);"swal"==n?this.warningSwal.fire("",t):this.toastr.warning(t,null,{positionClass:"toastr"==n?"toast-top-right":"toast-top-center",timeOut:i||("toastr"==n?0:5e3),extendedTimeOut:"toastr"==n?0:1e3})},t.prototype.clearMessages=function(){this.toastr.clear(),l.default.close()},t.prototype.promiseWarningWithChoice=function(t,e){return this.warningSwalWithCancel.fire(t,e)},t.prototype.toastrOrSwal=function(t){return null!=t?t:null==this.FANCY_ALERTS||this.FANCY_ALERTS?"swal":"toastr"},t.prototype.simpleWarningWithChoice=function(t,e,i,n){void 0===i&&(i=null),void 0===n&&(n=null),this.warningSwalWithCancel.fire(t,e).then((function(t){t.value&&i?i():n&&n()}))},t.prototype.simpleSuccessWithChoice=function(t,e,i,n,r,o){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=""),void 0===o&&(o="");var s={title:t,html:e};r&&(s.confirmButtonText=r),o&&(s.cancelButtonText=o),this.successSwalWithCancel.fire(s).then((function(t){t.value&&i?i():n&&n()}))},t.prototype.observableSimpleWarningWithChoice=function(t,e){return r.of(this.warningSwalWithCancel.fire(t,e)).pipe(o.map((function(t){return!!t.value})))},t.prototype.expiredSessionMessage=function(t,e,i){void 0===i&&(i=null),this.expiredSessionSwal.fire(t,e).then((function(t){t.value&&i&&i()}))},t.prototype.manageCallResultResponse=function(t,e,i,n,r){void 0===n&&(n=null),void 0===r&&(r=null),t.success?(t.haswarning?this.simpleWarning(t.warning):e&&this.simpleSuccess(e),n&&n()):t.haserror&&(this.simpleError((i?i+": ":"")+t.error),r&&r())},t.prototype.manageStringResponse=function(t,e,i,n,r){void 0===n&&(n=null),void 0===r&&(r=null),t?(i&&this.simpleError(i+": "+t),r&&r()):(e&&this.simpleSuccess(e),n&&n())},t.prototype.manageStringResponseBool=function(t,e,i,n,r){void 0===n&&(n=null),void 0===r&&(r=null),t?(e&&this.simpleSuccess(e),n&&n()):(i&&this.simpleError(i),r&&r())},t}();f.decorators=[{type:e.Injectable}],f.ctorParameters=function(){return[{type:i.ToastrService},{type:Boolean,decorators:[{type:e.Optional},{type:e.Inject,args:[u]}]},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]}]};var v=function(){function t(t,e){this.msgService=t,this.LOCALE=e,this.loc={"Unfortunately Firefox doesn't yet support direct Clipboard access if not via extensions, Please use Chrome to do this operation":{"en-US":"Unfortunately Firefox doesn't yet support direct Clipboard access if not via extensions, Please use Chrome to do this operation","it-IT":"Mi dispiace ma Firefox non supporta l'accesso diretto alla Clipboard, se non attraverso le estensioni. Si prega di usare Chrome"},"Generic error during 'copy' command execution":{"en-US":"Generic error during 'copy' command execution","it-IT":"Errore generico durante l'esecuzione del comando 'copy'"},"Error during Clipboard content read operation":{"en-US":"Error during Clipboard content read operation","it-IT":"Errore nella lettura del contenuto della Clipboard"},"Error during Clipboard content copy operation":{"en-US":"Error during Clipboard content copy operation","it-IT":"Errore nella scrittura del contenuto nella Clipboard"}}}return t.prototype.getClipboard=function(t,e){var i,n=this;if(-1==navigator.userAgent.indexOf("Firefox"))if(window.clipboardData){console.log("[@esfaenza/extensions] Found clipboardData");var r=window.clipboardData.getData("Text");console.log("[@esfaenza/extensions] Retrieved clipboard values: "+r);var o="array"==t?this.getClipboardLines(r):"matrix"==t?this.getClipboardMatrix(r):[];console.log("[@esfaenza/extensions] Adapted for "+t+": "+JSON.stringify(o)),e&&e(o)}else window.navigator.clipboard&&(console.log("[@esfaenza/extensions] Found navigator clipboard"),window.navigator.permissions.query({name:"clipboard-read"}).then((function(i){if("granted"!==i.state&&"prompt"!==i.state)return console.error("[@esfaenza/extensions] Clipboard permission not granted"),void(e&&e([]));console.log("[@esfaenza/extensions] Clipboard permission granted, retrieving values"),window.navigator.clipboard.readText().then((function(i){console.log("[@esfaenza/extensions] Retrieved clipboard values: "+i);var r="array"==t?n.getClipboardLines(i):"matrix"==t?n.getClipboardMatrix(i):[];console.log("[@esfaenza/extensions] Adapted for "+t+": "+JSON.stringify(r)),e&&e(r)})).catch((function(t){var e;n.msgService.simpleError(n.loc["Error during Clipboard content read operation"][null!==(e=n.LOCALE)&&void 0!==e?e:"it-IT"]+": "+t)}))})));else this.msgService.simpleError(this.loc["Unfortunately Firefox doesn't yet support direct Clipboard access if not via extensions, Please use Chrome to do this operation"][null!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"])},t.prototype.getClipboardLines=function(t){return t.trim().split("\r\n")},t.prototype.getClipboardMatrix=function(t){for(var e=[],i=t.split("\r\n"),n=0;n<i.length;n++)e.push(i[n].split("\t").map((function(t){return t.trim()})));return e},t.prototype.copyTextToClipboard=function(t){var e,i,n=document.createElement("textarea");n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="2em",n.style.height="2em",n.style.padding="0",n.style.border="none",n.style.outline="none",n.style.boxShadow="none",n.style.background="transparent",n.value=t,document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")||this.msgService.simpleError(this.loc["Generic error during 'copy' command execution"][null!==(e=this.LOCALE)&&void 0!==e?e:"it-IT"])}catch(t){this.msgService.simpleError(this.loc["Error during Clipboard content copy operation"][null!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"]+": "+t)}document.body.removeChild(n)},t}();v.decorators=[{type:e.Injectable}],v.ctorParameters=function(){return[{type:f},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]}]};var g=function(){function t(t,e){var i,n,r,o,s,a,l,c;this.LOCALE=t,this.allowUtc=e,this.loc={SMALL_DATE_FORMAT:{"en-US":"MM/DD/YYYY","it-IT":"DD/MM/YYYY"},FULL_DATE_FORMAT:{"en-US":"MM/DD/YYYY HH:mm:ss","it-IT":"DD/MM/YYYY HH:mm:ss"},FULL_DATE_FORMAT_NO_SS:{"en-US":"MM/DD/YYYY HH:mm","it-IT":"DD/MM/YYYY HH:mm"},SMALL_DATE_DISPLAY_FORMAT:{"en-US":"DD/MM/YYYY","it-IT":"DD/MM/YYYY"},SMALL_DATE_DISPLAY_FORMAT_WITH_HOUR:{"en-US":"DD/MM/YYYY HH","it-IT":"DD/MM/YYYY HH"},SMALL_DATE_DISPLAY_FORMAT_WITH_MINUTE:{"en-US":"DD/MM/YYYY HH:mm","it-IT":"DD/MM/YYYY HH:mm"},FULL_DATE_DISPLAY_FORMAT:{"en-US":"DD/MM/YYYY HH:mm:ss","it-IT":"DD/MM/YYYY HH:mm:ss"},FULL_DATE_DISPLAY_FORMAT_NO_SS:{"en-US":"DD/MM/YYYY HH:mm","it-IT":"DD/MM/YYYY HH:mm"}},this.cfg={fulldate:"",fulldateDisplay:"",smallDate:"",fulldateNoSS:"",smallDateWithH:"",smallDateWithM:"",fulldateDisplayNoSS:""},this.cfg.smallDate=this.loc.SMALL_DATE_FORMAT[null!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"],this.cfg.fulldate=this.loc.FULL_DATE_FORMAT[null!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"],this.cfg.fulldateNoSS=this.loc.FULL_DATE_FORMAT_NO_SS[null!==(r=this.LOCALE)&&void 0!==r?r:"it-IT"],this.cfg.fulldateDisplay=this.loc.FULL_DATE_DISPLAY_FORMAT[null!==(o=this.LOCALE)&&void 0!==o?o:"it-IT"],this.cfg.fulldateDisplayNoSS=this.loc.FULL_DATE_DISPLAY_FORMAT_NO_SS[null!==(s=this.LOCALE)&&void 0!==s?s:"it-IT"],this.cfg.smallDate=this.loc.SMALL_DATE_DISPLAY_FORMAT[null!==(a=this.LOCALE)&&void 0!==a?a:"it-IT"],this.cfg.smallDateWithH=this.loc.SMALL_DATE_DISPLAY_FORMAT_WITH_HOUR[null!==(l=this.LOCALE)&&void 0!==l?l:"it-IT"],this.cfg.smallDateWithM=this.loc.SMALL_DATE_DISPLAY_FORMAT_WITH_MINUTE[null!==(c=this.LOCALE)&&void 0!==c?c:"it-IT"]}return t.prototype.adjustDateToFinalInstant=function(t,e,i){void 0===i&&(i=!0);var n=this.getDateConvertion(t);if(null==n)return"FE: Not a Date";if(!(n.startOf(e).valueOf()===n.valueOf()))return"day"==e&&n.subtract(1,"hour").hour()==n.hour()&&(n=n.add(1,"hour")),i?n.format(this.cfg.fulldateDisplay):n.format(this.cfg.fulldateDisplayNoSS);var r=n.subtract(1,e),o="";return"day"==e?o=r.format(this.cfg.smallDate)+" 24:00"+(i?":00":""):"hour"==e?o=r.format(this.cfg.smallDateWithH)+":60"+(i?":00":""):"minute"==e&&(o=r.format(this.cfg.smallDateWithM)+":60"),o},t.prototype.dateSort=function(t,e,i){return t<e?"asc"==i?1:-1:t>e?"asc"==i?-1:1:0},t.prototype.trimSeconds=function(t){return isNaN(t)&&/^\d\d\/\d\d\/\d\d\d\d \d\d:\d\d:\d\d$/g.test(t)?"'"+t.substr(0,t.length-3):t},t.prototype.getMinMaxDatesRange=function(t,e){for(var i=[],n=[],r=0;r<t.length;r++){var o=t[r];(s=this.getDateConvertion(o))&&i.push(s)}for(r=0;r<e.length;r++){var s;o=e[r];(s=this.getDateConvertion(o))&&n.push(s)}return{from:dayjs.min(i),to:dayjs.max(n)}},t.prototype.getDateConvertion=function(t,e){if(void 0===e&&(e=!1),!t)return null;if(this.isDayJs(t))return t;if(this.isJsDate(t))return e?dayjs.utc(t):dayjs(t);var i=t.length;if(!i)return null;if(e&&!this.allowUtc)throw"@esfaenza/extensions: Richiesta data UTC ma da configurazione la libreria non lo supporta";var n=null,r=e?dayjs.utc:dayjs;return t.includes("T")?n=r(t):i==this.cfg.fulldate.length?n=r(t,this.cfg.fulldate):i==this.cfg.smallDate.length?n=r(t,this.cfg.smallDate):i==this.cfg.fulldateNoSS.length&&(n=r(t,this.cfg.fulldateNoSS)),n&&n.isValid&&n.isValid()?n:null},t.prototype.isJsDate=function(t){return t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t)},t.prototype.isDayJs=function(t){return void 0!==t.$D&&void 0!==t.$M&&void 0!==t.$y},t.prototype.getFormatted=function(t,e,i){return(t=this.getDateConvertion(t))?t.format(e?this.cfg.smallDate:i?this.cfg.fulldateDisplay:this.cfg.fulldateDisplayNoSS):null},t}();g.decorators=[{type:e.Injectable}],g.ctorParameters=function(){return[{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]},{type:Boolean,decorators:[{type:e.Optional},{type:e.Inject,args:[h]}]}]};var y="_csvnav",m="_csvord",b="_csvvis",S="_csvhdr",C="_csvkey",T="_listcsvval",w="_listcsvhdr",x="_listcsvvalformat",A="_flatlistcsvval",O="_flatlistcsvhdr",L="_csvfmt",I="__export_list__",D=function(){function t(t){this.dates=t}return t.prototype.setupForExport=function(t,e){void 0===e&&(e=[]);var i=[],n={};if(!t||0==t.length)return i;var r={};if((null==e?void 0:e.length)>0)for(var o=0;o<(null==e?void 0:e.length);o++)r[e[o]]=!0;for(o=0;o<t.length;o++)for(var s=this.parseAndGetHeaders(t[o],r),a=0;a<s.length;a++)n[s[a].key]||(n[s[a].key]=!0,i.push(s[a]));if(e){var l=[];for(o=0;o<e.length;o++)for(var c=e[o],u=0;u<i.length;u++)if(i[u].propKey==c){l.push(i[u]);break}return l}return i.sort((function(t,e){return t.order-e.order}))},t.prototype.setupForGenericExport=function(t,e){var i=this,n=[];return t&&0!=t.length?(t.forEach((function(t,r){0==r?n=i.parseAndGetGenericHeaders(t,e):i.parseAndGetGenericHeaders(t,e)})),n):n},t.prototype.parseAndGetGenericHeaders=function(t,e){if(!t.properties)return null;var i=[];return e.forEach((function(e){var n=t.properties[e.key];Object.defineProperty(t,e.key+"_exp",{value:n,writable:!1,enumerable:!0}),i.push({label:e.label,key:e.key+"_exp",order:e.order,type:e.type,propKey:null})})),i.sort((function(t,e){return t.order-e.order}))},t.prototype.parseAndGetHeaders=function(t,e){var i=[],n=t[I]||[];0==n.length&&console.warn("[@esfaenza/extensions] Nessuna colonna configurata da esportare!");for(var r=0;r<n.length;r++){var o=n[r],s="",a=void 0;o.endsWith(w)?(s=o.replace(w,""),a=this.parseList.bind(this)):o.endsWith(O)?(a=this.parseDictionary.bind(this),s=o.replace(O,"")):o.endsWith(b)&&(a=void 0!==t[(s=o.replace(b,""))+y]?this.parseObject.bind(this):this.parseProperty.bind(this)),a&&a(t,s,i,e)}return i},t.prototype.parseProperty=function(t,e,i,n){var r=t[e+b],o=t[e+L],s=t[e+C];if(!s||n[s]){var a=t[e+S],l=t[e+m];if(r&&"undefined"!==a)if(o)if("F"==o){var c=null!=t[e]?t[e].toString():"",u=(c=c.replace(/,/,"")).replace(".",",");Object.defineProperty(t,e+"_fmt",{value:u,writable:!1,enumerable:!0}),i.push({label:a||e+"_fmt",key:e+"_fmt",order:l,type:"number",propKey:s})}else{var p=this.dates.getFormatted(t[e],o.length<=10,o.length>16);Object.defineProperty(t,e+"_fmt",{value:null!=p?p:"",writable:!1,enumerable:!0}),i.push({label:a||e+"_fmt",key:e+"_fmt",order:l,type:"date",propKey:s})}else{var h=t[e]?this.dates.trimSeconds(t[e].toString()):"";Object.defineProperty(t,e+"_nofmt",{value:h,writable:!1,enumerable:!0}),i.push({label:a||e+"_nofmt",key:e+"_nofmt",order:l,type:"string",propKey:s})}}else console.log("[@esfaenza/extensions] Colonna da non esportare: "+s)},t.prototype.parseObject=function(t,e,i){var n=t[e+y].split("."),r=JSON.parse(JSON.stringify(t));n.forEach((function(t){r=r[t]}));var o=r,s=t[e+S],a=t[e+m],l=t[e+L],c="string";if("F"==l){var u=o.toString();o=(u=u.replace(/,/,"")).replace(".",","),c="number"}else l&&(o=this.dates.getFormatted(o,l.length<=10,l.length>16),c="date");Object.defineProperty(t,e,{value:o,writable:!1,enumerable:!0}),i.push({label:s||e,key:e,order:a,type:c,propKey:null})},t.prototype.parseList=function(t,e,i){for(var n,r,o,s,a=t[e+w],l=t[e+T],c=t[e+x],u=t[e+m],p=t[e],h=function(h){var f=p[h];o=a.split(" "),s="",o.forEach((function(t){n=t.split("."),r=JSON.parse(JSON.stringify(f)),n.forEach((function(t){r=r[t]})),s?s+=" "+r:s=r})),n=l.split("."),r=JSON.parse(JSON.stringify(f)),n.forEach((function(t){r=r[t]}));var v=r,g="string";if("F"==c){var y=null!=v?v.toString():"";v=(y=y.replace(/,/,"")).replace(".",","),g="number"}else c&&(v=d.dates.getFormatted(t[e],c.length<=10,c.length>16),g="date");Object.defineProperty(t,e+h,{value:v,writable:!1}),i.push({label:s,key:e+h,order:u+h,type:g,propKey:null})},d=this,f=0;f<p.length;f++)h(f)},t.prototype.parseDictionary=function(t,e,i){for(var n,r,o,s,a=t[e+O],l=t[e+A],c=t[e+m],u=t[e],p=function(p){var h=u[p];o=a.split(" "),s="",o.forEach((function(t){n=t.split("."),r=JSON.parse(JSON.stringify(h)),n.forEach((function(t){r=r[t]})),s?s+=" "+r:s=r})),l.split(",").forEach((function(o,a){var l=o.split("-")[1],u=o.split("-")[0];n=l.split("."),r=JSON.parse(JSON.stringify(h)),n.forEach((function(t){r=r[t]}));var d=r,f=e+p.toString()+a.toString();Object.defineProperty(t,f,{value:d,writable:!1}),i.push({label:s+" "+u,key:f,order:c+p,type:"string",propKey:null})}))},h=0;h<u.length;h++)p(h)},t.prototype.deserializeForExport=function(t,e){return s.Deserialize(t,e)},t}();D.decorators=[{type:e.Injectable}],D.ctorParameters=function(){return[{type:g}]};var _,E=function(){function t(){this.objBlacklist={NgForm:!0,ElementRef:!0,ExtensionsService:!0,ToastrService:!0,LocaleService:!0,AppState:!0,Router:!0,ActivatedRoute:!0,HTTPService:!0,Location:!0,CanvasComponent:!0,ModalDirective:!0,ChangeDetectorRef:!0,DateService:!0,EventEmitter:!0,ViewRef_:!0,Subscriber:!0,ItemLocalization:!0},this.hex_chr="0123456789abcdef".split("")}return t.prototype.getGUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t.prototype.hashObject=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=!1),void 0===n&&(n=!1);var r=this.stringify(t,e,i);return n?this.md5(r):this.simpleHash(r)},t.prototype.simpleHash=function(t,e){void 0===e&&(e=0);for(var i=3735928559^e,n=1103547991^e,r=0,o=void 0;r<t.length;r++)o=t.charCodeAt(r),i=Math.imul(i^o,2654435761),n=Math.imul(n^o,1597334677);return i=Math.imul(i^i>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(i^i>>>13,3266489909)))+(i>>>0)).toString()},t.prototype.stringify=function(t,e,i){var n,r;if(null===t)return"n";if(!0===t)return"t";if(!1===t)return"f";if(t instanceof Date)return"d:"+t.valueOf().toString();if("string"===(n=typeof t))return"s:"+t;if("number"===n)return"n:"+t;if(t instanceof Function)return"m:"+t.toString();if(t instanceof Array){for(r=[],n=0;n<t.length;n++){(s=this.stringify(t[n],e,i))&&r.push(s)}return r.length>0?"a:"+r.join(";"):""}if(r=[],t){var o=t.__proto__.constructor.name;if(!this.objBlacklist[o])for(n in t){var s;if(t.hasOwnProperty(n)&&(e<=2||i))(s=this.stringify(t[n],e+1,i))&&r.push(n+":"+s)}}return r.length>0?"o:"+r.join(";"):""},t.prototype.md5=function(t){return this.hex(this.md51(t))},t.prototype.md5cycle=function(t,e){var i=t[0],n=t[1],r=t[2],o=t[3];i=this.ff(i,n,r,o,e[0],7,-680876936),o=this.ff(o,i,n,r,e[1],12,-389564586),r=this.ff(r,o,i,n,e[2],17,606105819),n=this.ff(n,r,o,i,e[3],22,-1044525330),i=this.ff(i,n,r,o,e[4],7,-176418897),o=this.ff(o,i,n,r,e[5],12,1200080426),r=this.ff(r,o,i,n,e[6],17,-1473231341),n=this.ff(n,r,o,i,e[7],22,-45705983),i=this.ff(i,n,r,o,e[8],7,1770035416),o=this.ff(o,i,n,r,e[9],12,-1958414417),r=this.ff(r,o,i,n,e[10],17,-42063),n=this.ff(n,r,o,i,e[11],22,-1990404162),i=this.ff(i,n,r,o,e[12],7,1804603682),o=this.ff(o,i,n,r,e[13],12,-40341101),r=this.ff(r,o,i,n,e[14],17,-1502002290),n=this.ff(n,r,o,i,e[15],22,1236535329),i=this.gg(i,n,r,o,e[1],5,-165796510),o=this.gg(o,i,n,r,e[6],9,-1069501632),r=this.gg(r,o,i,n,e[11],14,643717713),n=this.gg(n,r,o,i,e[0],20,-373897302),i=this.gg(i,n,r,o,e[5],5,-701558691),o=this.gg(o,i,n,r,e[10],9,38016083),r=this.gg(r,o,i,n,e[15],14,-660478335),n=this.gg(n,r,o,i,e[4],20,-405537848),i=this.gg(i,n,r,o,e[9],5,568446438),o=this.gg(o,i,n,r,e[14],9,-1019803690),r=this.gg(r,o,i,n,e[3],14,-187363961),n=this.gg(n,r,o,i,e[8],20,1163531501),i=this.gg(i,n,r,o,e[13],5,-1444681467),o=this.gg(o,i,n,r,e[2],9,-51403784),r=this.gg(r,o,i,n,e[7],14,1735328473),n=this.gg(n,r,o,i,e[12],20,-1926607734),i=this.hh(i,n,r,o,e[5],4,-378558),o=this.hh(o,i,n,r,e[8],11,-2022574463),r=this.hh(r,o,i,n,e[11],16,1839030562),n=this.hh(n,r,o,i,e[14],23,-35309556),i=this.hh(i,n,r,o,e[1],4,-1530992060),o=this.hh(o,i,n,r,e[4],11,1272893353),r=this.hh(r,o,i,n,e[7],16,-155497632),n=this.hh(n,r,o,i,e[10],23,-1094730640),i=this.hh(i,n,r,o,e[13],4,681279174),o=this.hh(o,i,n,r,e[0],11,-358537222),r=this.hh(r,o,i,n,e[3],16,-722521979),n=this.hh(n,r,o,i,e[6],23,76029189),i=this.hh(i,n,r,o,e[9],4,-640364487),o=this.hh(o,i,n,r,e[12],11,-421815835),r=this.hh(r,o,i,n,e[15],16,530742520),n=this.hh(n,r,o,i,e[2],23,-995338651),i=this.ii(i,n,r,o,e[0],6,-198630844),o=this.ii(o,i,n,r,e[7],10,1126891415),r=this.ii(r,o,i,n,e[14],15,-1416354905),n=this.ii(n,r,o,i,e[5],21,-57434055),i=this.ii(i,n,r,o,e[12],6,1700485571),o=this.ii(o,i,n,r,e[3],10,-1894986606),r=this.ii(r,o,i,n,e[10],15,-1051523),n=this.ii(n,r,o,i,e[1],21,-2054922799),i=this.ii(i,n,r,o,e[8],6,1873313359),o=this.ii(o,i,n,r,e[15],10,-30611744),r=this.ii(r,o,i,n,e[6],15,-1560198380),n=this.ii(n,r,o,i,e[13],21,1309151649),i=this.ii(i,n,r,o,e[4],6,-145523070),o=this.ii(o,i,n,r,e[11],10,-1120210379),r=this.ii(r,o,i,n,e[2],15,718787259),n=this.ii(n,r,o,i,e[9],21,-343485551),t[0]=this.add32(i,t[0]),t[1]=this.add32(n,t[1]),t[2]=this.add32(r,t[2]),t[3]=this.add32(o,t[3])},t.prototype.cmn=function(t,e,i,n,r,o){return e=this.add32(this.add32(e,t),this.add32(n,o)),this.add32(e<<r|e>>>32-r,i)},t.prototype.ff=function(t,e,i,n,r,o,s){return this.cmn(e&i|~e&n,t,e,r,o,s)},t.prototype.gg=function(t,e,i,n,r,o,s){return this.cmn(e&n|i&~n,t,e,r,o,s)},t.prototype.hh=function(t,e,i,n,r,o,s){return this.cmn(e^i^n,t,e,r,o,s)},t.prototype.ii=function(t,e,i,n,r,o,s){return this.cmn(i^(e|~n),t,e,r,o,s)},t.prototype.md51=function(t){var e,i=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)this.md5cycle(n,this.md5blk(t.substring(e-64,e)));t=t.substring(e-64);var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)r[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(this.md5cycle(n,r),e=0;e<16;e++)r[e]=0;return r[14]=8*i,this.md5cycle(n,r),n},t.prototype.md5blk=function(t){var e,i=[];for(e=0;e<64;e+=4)i[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return i},t.prototype.rhex=function(t){for(var e="",i=0;i<4;i++)e+=this.hex_chr[t>>8*i+4&15]+this.hex_chr[t>>8*i&15];return e},t.prototype.hex=function(t){for(var e=0;e<t.length;e++)t[e]=this.rhex(t[e]);return t.join("")},t.prototype.add32=function(t,e){return t+e&4294967295},t}();E.decorators=[{type:e.Injectable}],function(t){t[t.Empty=0]="Empty",t[t.Obj=1]="Obj",t[t.DBNull=2]="DBNull",t[t.Boolean=3]="Boolean",t[t.Char=4]="Char",t[t.SByte=5]="SByte",t[t.Byte=6]="Byte",t[t.Int16=7]="Int16",t[t.UInt16=8]="UInt16",t[t.Int32=9]="Int32",t[t.UInt32=10]="UInt32",t[t.Int64=11]="Int64",t[t.UInt64=12]="UInt64",t[t.Single=13]="Single",t[t.Double=14]="Double",t[t.Decimal=15]="Decimal",t[t.DateTime=16]="DateTime",t[t.String=18]="String"}(_||(_={}));var M=function(){function t(){}return t.prototype.clearTextSelection=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()},t.prototype.getSelectedItem=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];if(r[e]==i)return r}return null},t.prototype.cleanForm=function(t,e,i){for(var n in void 0===e&&(e=null),void 0===i&&(i=null),t.controls)n&&n!=e&&n!=e+"_internal"&&n!=i&&n!=i+"_internal"?t.controls[n].reset():(t.controls[n].markAsPristine(),t.controls[n].markAsUntouched());t.submitted=!1},t.prototype.fileDownload=function(t,e){var i=document.createElement("a");document.body.appendChild(i),i.className="ta-display-none",i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t),document.body.removeChild(i)},t.prototype.msToTime=function(t){if(!t)return"";var e=parseInt((t%1e3/100).toString()),i=parseInt((t/1e3%60).toString()),n=parseInt((t/6e4%60).toString()),r=parseInt((t/36e5%24).toString());return(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)+":"+(i<10?"0"+i:i)+"."+e},t.prototype.saveFile=function(t,e){var i=this.base64ToArrayBuffer(t);this.saveByteArray(i,e)},t.prototype.base64ToArrayBuffer=function(t){for(var e=window.atob(t),i=e.length,n=new Uint8Array(i),r=0;r<i;r++){var o=e.charCodeAt(r);n[r]=o}return n},t.prototype.saveByteArray=function(t,e){var i=new Blob([t]),n=document.createElement("a");document.body.appendChild(n),n.href=window.URL.createObjectURL(i);var r=e;n.download=r,n.click(),document.body.removeChild(n)},t.prototype.swap=function(t,e,i){var n=t[e];t[e]=t[i],t[i]=n},t.prototype.getJsTypeFromTypeCode=function(t){switch(t){case _.Boolean:return"boolean";case _.Decimal:case _.Double:case _.Single:case _.Int16:case _.Int32:case _.Int64:case _.Byte:case _.SByte:case _.UInt16:case _.UInt32:case _.UInt64:return"number";case _.Char:case _.String:return"string";case _.DateTime:return"date";default:return console.log("Unrecognized input type. Typecode:"+t),"string"}},t.prototype.deepClone=function(t){if(null==t||"object"!=typeof t)return t;switch(toString.call(t)){case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new t.constructor(t.valueOf())}return this.recursiveStep(t,Array.isArray(t)||t instanceof Array?[]:Object.create(Object.getPrototypeOf(t)))},t.prototype.recursiveStep=function(t,e){if(Array.isArray(t)||t instanceof Array)for(var i=0,n=t.length;i<n;i++)e.push(this.deepClone(t[i]));else if(t&&"function"==typeof t.hasOwnProperty)for(var r in t)t.hasOwnProperty(r)&&(e[r]=this.deepClone(t[r]));return e},t}();M.decorators=[{type:e.Injectable}];var j=function(t,e){this.type=t,this.message=e},Y=function(){function t(){this.outbounds={},this.inbounds=new r.Subject}return t.prototype.send=function(t,e,i){var n=new j(t,e);i?this.outbounds[i]?this.outbounds[i].next(n):console.warn("@esfaenza/extensions - InterComService: Impossibile inviare il messaggio al recipient "+i+" assicurarsi che il modulo sia caricato e che effettui la chiamata al metodo 'regisster'"):this.inbounds.next(n)},t.prototype.register=function(t){if(this.outbounds[t])throw"@esfaenza/extensions - InterComService: Impossibile registrare più volte lo stesso modulo";this.outbounds[t]=new r.Subject},t}();Y.decorators=[{type:e.Injectable}];var P=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[v,g,D,E,f,M,Y,{provide:c,useValue:(null==e?void 0:e.locale)||"it-IT"},{provide:u,useValue:(null==e?void 0:e.fancy_alerts)||!0},{provide:p,useValue:(null==e?void 0:e.appsearch_prefix)||"Hot"},{provide:h,useValue:null!=(null==e?void 0:e.allow_utc)&&(null==e?void 0:e.allow_utc)}]}},t}();P.decorators=[{type:e.NgModule}];var U,B=function(){},F=function(){},R=function(){};t.InboundMessageTypes=void 0,(U=t.InboundMessageTypes||(t.InboundMessageTypes={}))[U.Navigation=0]="Navigation",t.APPSEARCH_PREFIX=p,t.CallResult=B,t.ClipboardService=v,t.CsvHeaders=F,t.DateService=g,t.EXT_ALLOW_UTC=h,t.EXT_FANCY_ALERTS=u,t.EXT_LOCALE=c,t.Export=function(t,e,i,n){return void 0===i&&(i=null),void 0===n&&(n=null),function(r,o){i&&Object.defineProperty(r,o+L,{value:i,writable:!1}),Object.defineProperty(r,o+m,{value:t,writable:!1}),Object.defineProperty(r,o+b,{value:!!e,writable:!1}),Object.defineProperty(r,o+S,{value:e,writable:!1}),n&&Object.defineProperty(r,o+C,{value:n,writable:!1}),r[I]?r[I].push(o+b):r[I]=[o+b]}},t.ExportAs=function(t,e){return function(i,n){var r=new e;for(var o in r)if(void 0!==r[o+b]){var s=r[o+b],a=r[o+S],l=r[o+L],c=r[o+m];l&&Object.defineProperty(i,n+o+L,{value:l,writable:!1}),Object.defineProperty(i,n+o+m,{value:c+t,writable:!1}),Object.defineProperty(i,n+o,{value:null,writable:!0,enumerable:!0}),Object.defineProperty(i,n+o+y,{value:n+"."+o,writable:!1}),Object.defineProperty(i,n+o+b,{value:s,writable:!1}),Object.defineProperty(i,n+o+S,{value:a,writable:!1}),i[I]?i[I].push(n+o+b):i[I]=[n+o+b]}}},t.ExportDictionary=function(t,e,i){return function(n,r){Object.defineProperty(n,r+m,{value:t,writable:!1}),Object.defineProperty(n,r+A,{value:i,writable:!1}),Object.defineProperty(n,r+O,{value:e,writable:!1}),n[I]?n[I].push(r+O):n[I]=[r+O]}},t.ExportList=function(t,e,i,n){return void 0===n&&(n=null),function(r,o){Object.defineProperty(r,o+m,{value:t,writable:!1}),Object.defineProperty(r,o+T,{value:i,writable:!1}),Object.defineProperty(r,o+w,{value:e,writable:!1}),Object.defineProperty(r,o+x,{value:n,writable:!1}),r[I]?r[I].push(o+w):r[I]=[o+w]}},t.ExportService=D,t.ExtensionsModule=d,t.FullExtensionsModule=P,t.GenericItem=R,t.HashingService=E,t.InterComMessage=j,t.InterComService=Y,t.MessageService=f,t.UtilityService=M,Object.defineProperty(t,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=esfaenza-extensions.umd.min.js.map