@esfaenza/extensions 11.2.59 → 11.2.60

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,n,i,r,o,a){"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=s(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"),h=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}();h.decorators=[{type:e.NgModule}];var f=function(){function t(t){var n,i,r,o,a,s,p,d,h,f,g,v,y,m;this.injector=t,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.FANCY_ALERTS=this.injector.get(u,null,e.InjectFlags.Optional),this.LOCALE=this.injector.get(c,null,e.InjectFlags.Optional),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!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"],cancelButtonText:this.loc.Cancel[null!==(r=this.LOCALE)&&void 0!==r?r:"it-IT"],icon:"success"}),this.warningSwalWithCancel=l.default.mixin({title:this.loc.Warning[null!==(o=this.LOCALE)&&void 0!==o?o:"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!==(s=this.LOCALE)&&void 0!==s?s:"it-IT"],icon:"warning"}),this.warningSwal=l.default.mixin({title:this.loc.Warning[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:"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!==(f=this.LOCALE)&&void 0!==f?f:"it-IT"],icon:"success"}),this.errorSwal=l.default.mixin({title:this.loc.Error[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!==(v=this.LOCALE)&&void 0!==v?v:"it-IT"],icon:"error"}),this.infoSwal=l.default.mixin({title:this.loc.Info[null!==(y=this.LOCALE)&&void 0!==y?y:"it-IT"],customClass:{confirmButton:"btn btn-primary",container:"app-wrap"},buttonsStyling:!1,reverseButtons:!0,showCancelButton:!1,confirmButtonText:this.loc.Close[null!==(m=this.LOCALE)&&void 0!==m?m:"it-IT"],icon:"info"})}return Object.defineProperty(t.prototype,"toastr",{get:function(){return this.injector.get(n.ToastrService)},enumerable:!1,configurable:!0}),t.prototype.simpleSuccess=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=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:n||("toastr"==i?0:5e3),extendedTimeOut:"toastr"==i?0:1e3})},t.prototype.simpleInfo=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=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:n||("toastr"==i?0:5e3),extendedTimeOut:"toastr"==i?0:1e3})},t.prototype.simpleError=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=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:n||("toastr"==i?0:5e3),extendedTimeOut:"toastr"==i?0:1e3})},t.prototype.simpleWarning=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=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:n||("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,n,i){void 0===n&&(n=null),void 0===i&&(i=null),this.warningSwalWithCancel.fire(t,e).then((function(t){t.value&&n?n():i&&i()}))},t.prototype.simpleSuccessWithChoice=function(t,e,n,i,r,o){void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=""),void 0===o&&(o="");var a={title:t,html:e};r&&(a.confirmButtonText=r),o&&(a.cancelButtonText=o),this.successSwalWithCancel.fire(a).then((function(t){t.value&&n?n():i&&i()}))},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,n){void 0===n&&(n=null),this.expiredSessionSwal.fire(t,e).then((function(t){t.value&&n&&n()}))},t.prototype.manageCallResultResponse=function(t,e,n,i,r){void 0===i&&(i=null),void 0===r&&(r=null),t.success?(t.haswarning?this.simpleWarning(t.warning):e&&this.simpleSuccess(e),i&&i()):(this.simpleError((n?n+": ":"")+t.haserror?t.error:"[NO ERR.]"),r&&r())},t.prototype.manageStringResponse=function(t,e,n,i,r){void 0===i&&(i=null),void 0===r&&(r=null),t?(n&&this.simpleError(n+": "+t),r&&r()):(e&&this.simpleSuccess(e),i&&i())},t.prototype.manageStringResponseBool=function(t,e,n,i,r){void 0===i&&(i=null),void 0===r&&(r=null),t?(e&&this.simpleSuccess(e),i&&i()):(n&&this.simpleError(n),r&&r())},t}();f.decorators=[{type:e.Injectable}],f.ctorParameters=function(){return[{type:e.Injector,decorators:[{type:e.Inject,args:[e.Injector]}]}]};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"},"Please insert your clipboard content":{"en-US":"Please insert your clipboard content","it-IT":"Si prega di incollare il contenuto della Clipboard"},"User input required":{"en-US":"User input required","it-IT":"Richiesto Input utente"},"Your current browser does not support reading from the clipboard directly. Please paste your clipboard's content in this Input field and confirm the operation":{"en-US":"Your current browser does not support reading from the clipboard directly. Please paste your clipboard's content in this Input field and confirm the operation","it-IT":"Il browser corrente non supporta la lettura diretta dei dati della Clipboard, si prega di effettuare un'incolla (CTRL + V) nella casella di testo e confermare l'operazione"},Confirm:{"en-US":"Confirm","it-IT":"Conferma"},Cancel:{"en-US":"Cancel","it-IT":"Annulla"}}}return t.prototype.getClipboard=function(t,e){var n,i,r,o,a=this;if(-1==navigator.userAgent.indexOf("Firefox"))if(window.clipboardData){console.log("[@esfaenza/extensions] Found clipboardData");var s=window.clipboardData.getData("Text");this.doClipboardDataGet(s,t,e)}else window.navigator.clipboard&&(console.log("[@esfaenza/extensions] Found navigator clipboard"),window.navigator.permissions.query({name:"clipboard-read"}).then((function(n){if("granted"!==n.state&&"prompt"!==n.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(n){return a.doClipboardDataGet(n,t,e)})).catch((function(t){var e;return a.msgService.simpleError(a.loc["Error during Clipboard content read operation"][null!==(e=a.LOCALE)&&void 0!==e?e:"it-IT"]+": "+t)}))})));else l.default.fire({title:this.loc["User input required"][null!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"],text:this.loc["Your current browser does not support reading from the clipboard directly. Please paste your clipboard's content in this Input field and confirm the operation"][null!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"],input:"textarea",icon:"warning",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"],showCancelButton:!0,customClass:{confirmButton:"btn btn-primary",cancelButton:"btn btn-secondary app-margin-right-15",container:"app-wrap"},reverseButtons:!0,allowOutsideClick:!1,inputValidator:function(t){var e;if(!t)return a.loc["Please insert your clipboard content"][null!==(e=a.LOCALE)&&void 0!==e?e:"it-IT"]}}).then((function(n){n.isConfirmed&&(console.log("[@esfaenza/extensions] Retrieving input data from user input"),a.doClipboardDataGet(n.value,t,e))}))},t.prototype.doClipboardDataGet=function(t,e,n){console.log("[@esfaenza/extensions] Retrieved clipboard values: "+t);var i="array"==e?this.getClipboardLines(t):"matrix"==e?this.getClipboardMatrix(t):[];console.log("[@esfaenza/extensions] Adapted for "+e+": "+JSON.stringify(i)),n&&n(i)},t.prototype.getClipboardLines=function(t){var e=t.trim();return!e.includes("\r\n")&&e.includes("\n")?e.split("\n"):e.split("\r\n")},t.prototype.getClipboardMatrix=function(t){for(var e=[],n=!t.includes("\r\n")&&t.includes("\n")?t.split("\n"):t.split("\r\n"),i=0;i<n.length;i++)e.push(n[i].split("\t").map((function(t){return t.trim()})));return e},t.prototype.copyTextToClipboard=function(t){var e,n,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!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"]+": "+t)}document.body.removeChild(i)},t}();g.decorators=[{type:e.Injectable}],g.ctorParameters=function(){return[{type:f},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]}]};var v=function(){function t(t,e){var n,i,r,o,a,s,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!==(n=this.LOCALE)&&void 0!==n?n:"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!==(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!==(a=this.LOCALE)&&void 0!==a?a:"it-IT"],this.cfg.smallDate=this.loc.SMALL_DATE_DISPLAY_FORMAT[null!==(s=this.LOCALE)&&void 0!==s?s:"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,n){void 0===n&&(n=!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")),n?i.format(this.cfg.fulldateDisplay):i.format(this.cfg.fulldateDisplayNoSS);var r=i.subtract(1,e),o="";return"day"==e?o=r.format(this.cfg.smallDate)+" 24:00"+(n?":00":""):"hour"==e?o=r.format(this.cfg.smallDateWithH)+":60"+(n?":00":""):"minute"==e&&(o=r.format(this.cfg.smallDateWithM)+":60"),o},t.prototype.dateSort=function(t,e,n){return t<e?"asc"==n?1:-1:t>e?"asc"==n?-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 n=[],i=[],r=0;r<t.length;r++){var o=t[r];(a=this.getDateConvertion(o))&&n.push(a)}for(r=0;r<e.length;r++){var a;o=e[r];(a=this.getDateConvertion(o))&&i.push(a)}return{from:dayjs.min(n),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 n=t.length;if(!n)return null;if(e&&!this.allowUtc)throw"@esfaenza/extensions: Richiesta data UTC ma da configurazione la libreria non lo supporta";var i=null,r=e?dayjs.utc:dayjs;return t.includes("T")?i=r(t):n==this.cfg.fulldate.length?i=r(t,this.cfg.fulldate):n==this.cfg.smallDate.length?i=r(t,this.cfg.smallDate):n==this.cfg.fulldateNoSS.length&&(i=r(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,n){return(t=this.getDateConvertion(t))?t.format(e?this.cfg.smallDate:n?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",I="_listcsvvalformat",O="_flatlistcsvval",A="_flatlistcsvhdr",x="_csvfmt",L="__export_list__",D=function(){function t(t){this.dates=t}return t.prototype.setupForExport=function(t,e){void 0===e&&(e=[]);var n=[],i={};if(!t||0==t.length)return n;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 a=this.parseAndGetHeaders(t[o],r),s=0;s<a.length;s++)i[a[s].key]||(i[a[s].key]=!0,n.push(a[s]));if(e&&0!=e.length){var l=[];for(o=0;o<e.length;o++)for(var c=e[o],u=0;u<n.length;u++)if(n[u].propKey==c){l.push(n[u]);break}return l}return n.sort((function(t,e){return t.order-e.order}))},t.prototype.setupForGenericExport=function(t,e){var n=this,i=[];return t&&0!=t.length?(t.forEach((function(t,r){0==r?i=n.parseAndGetGenericHeaders(t,e):n.parseAndGetGenericHeaders(t,e)})),i):i},t.prototype.parseAndGetGenericHeaders=function(t,e){if(!t.properties)return null;var n=[];return e.forEach((function(e){var i=t.properties[e.key];Object.defineProperty(t,e.key+"_exp",{value:i,writable:!1,enumerable:!0}),n.push({label:e.label,key:e.key+"_exp",order:e.order,type:e.type,propKey:null})})),n.sort((function(t,e){return t.order-e.order}))},t.prototype.parseAndGetHeaders=function(t,e){var n=[],i=t[L]||[];0==i.length&&console.warn("[@esfaenza/extensions] Nessuna colonna configurata da esportare!");for(var r=0;r<i.length;r++){var o=i[r],a="",s=void 0;o.endsWith(w)?(a=o.replace(w,""),s=this.parseList.bind(this)):o.endsWith(A)?(s=this.parseDictionary.bind(this),a=o.replace(A,"")):o.endsWith(b)&&(s=void 0!==t[(a=o.replace(b,""))+y]?this.parseObject.bind(this):this.parseProperty.bind(this)),s&&s(t,a,n,e)}return n},t.prototype.parseProperty=function(t,e,n,i){var r=t[e+b],o=t[e+x],a=t[e+C];if(a&&!i[a]&&Object.keys(i).length>0)console.log("[@esfaenza/extensions] Colonna da non esportare: "+a);else{var s=t[e+S],l=t[e+m];if(r&&"undefined"!==s)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}),n.push({label:s||e+"_fmt",key:e+"_fmt",order:l,type:"number",propKey:a})}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}),n.push({label:s||e+"_fmt",key:e+"_fmt",order:l,type:"date",propKey:a})}else{var d=t[e]?this.dates.trimSeconds(t[e].toString()):"";Object.defineProperty(t,e+"_nofmt",{value:d,writable:!1,enumerable:!0}),n.push({label:s||e+"_nofmt",key:e+"_nofmt",order:l,type:"string",propKey:a})}}},t.prototype.parseObject=function(t,e,n){var i=t[e+y].split("."),r=JSON.parse(JSON.stringify(t));i.forEach((function(t){r=null==r?void 0:r[t]}));var o=r,a=t[e+S],s=t[e+m],l=t[e+x],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:null!=o?o:"",writable:!1,enumerable:!0}),n.push({label:a||e,key:e,order:s,type:c,propKey:null})},t.prototype.parseList=function(t,e,n){for(var i,r,o,a,s=t[e+w],l=t[e+T],c=t[e+I],u=t[e+m],p=t[e],d=function(d){var f=p[d];o=s.split(" "),a="",o.forEach((function(t){i=t.split("."),r=JSON.parse(JSON.stringify(f)),i.forEach((function(t){r=r[t]})),a?a+=" "+r:a=r})),i=l.split("."),r=JSON.parse(JSON.stringify(f)),i.forEach((function(t){r=r[t]}));var g=r,v="string";if("F"==c){var y=null!=g?g.toString():"";g=(y=y.replace(/,/,"")).replace(".",","),v="number"}else c&&(g=h.dates.getFormatted(t[e],c.length<=10,c.length>16),v="date");Object.defineProperty(t,e+d,{value:null!=g?g:"",writable:!1}),n.push({label:a,key:e+d,order:u+d,type:v,propKey:null})},h=this,f=0;f<p.length;f++)d(f)},t.prototype.parseDictionary=function(t,e,n){for(var i,r,o,a,s=t[e+A],l=t[e+O],c=t[e+m],u=t[e],p=function(p){var d=u[p];o=s.split(" "),a="",o.forEach((function(t){i=t.split("."),r=JSON.parse(JSON.stringify(d)),i.forEach((function(t){r=r[t]})),a?a+=" "+r:a=r})),l.split(",").forEach((function(o,s){var l=o.split("-")[1],u=o.split("-")[0];i=l.split("."),r=JSON.parse(JSON.stringify(d)),i.forEach((function(t){r=r[t]}));var h=r,f=e+p.toString()+s.toString();Object.defineProperty(t,f,{value:null!=h?h:"",writable:!1}),n.push({label:a+" "+u,key:f,order:c+p,type:"string",propKey:null})}))},d=0;d<u.length;d++)p(d)},t.prototype.deserializeForExport=function(t,e){return a.Deserialize(t,e)},t}();D.decorators=[{type:e.Injectable}],D.ctorParameters=function(){return[{type:v}]};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,n,i){void 0===e&&(e=0),void 0===n&&(n=!1),void 0===i&&(i=!1);var r=this.stringify(t,e,n);return i?this.md5(r):this.simpleHash(r)},t.prototype.simpleHash=function(t,e){void 0===e&&(e=0);for(var n=3735928559^e,i=1103547991^e,r=0,o=void 0;r<t.length;r++)o=t.charCodeAt(r),n=Math.imul(n^o,2654435761),i=Math.imul(i^o,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&(i=Math.imul(i^i>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)).toString()},t.prototype.stringify=function(t,e,n){var i,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"===(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(r=[],i=0;i<t.length;i++){(a=this.stringify(t[i],e,n))&&r.push(a)}return r.length>0?"a:"+r.join(";"):""}if(r=[],t){var o=t.__proto__.constructor.name;if(!this.objBlacklist[o])for(i in t){var a;if(t.hasOwnProperty(i)&&(e<=2||n))(a=this.stringify(t[i],e+1,n))&&r.push(i+":"+a)}}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 n=t[0],i=t[1],r=t[2],o=t[3];n=this.ff(n,i,r,o,e[0],7,-680876936),o=this.ff(o,n,i,r,e[1],12,-389564586),r=this.ff(r,o,n,i,e[2],17,606105819),i=this.ff(i,r,o,n,e[3],22,-1044525330),n=this.ff(n,i,r,o,e[4],7,-176418897),o=this.ff(o,n,i,r,e[5],12,1200080426),r=this.ff(r,o,n,i,e[6],17,-1473231341),i=this.ff(i,r,o,n,e[7],22,-45705983),n=this.ff(n,i,r,o,e[8],7,1770035416),o=this.ff(o,n,i,r,e[9],12,-1958414417),r=this.ff(r,o,n,i,e[10],17,-42063),i=this.ff(i,r,o,n,e[11],22,-1990404162),n=this.ff(n,i,r,o,e[12],7,1804603682),o=this.ff(o,n,i,r,e[13],12,-40341101),r=this.ff(r,o,n,i,e[14],17,-1502002290),i=this.ff(i,r,o,n,e[15],22,1236535329),n=this.gg(n,i,r,o,e[1],5,-165796510),o=this.gg(o,n,i,r,e[6],9,-1069501632),r=this.gg(r,o,n,i,e[11],14,643717713),i=this.gg(i,r,o,n,e[0],20,-373897302),n=this.gg(n,i,r,o,e[5],5,-701558691),o=this.gg(o,n,i,r,e[10],9,38016083),r=this.gg(r,o,n,i,e[15],14,-660478335),i=this.gg(i,r,o,n,e[4],20,-405537848),n=this.gg(n,i,r,o,e[9],5,568446438),o=this.gg(o,n,i,r,e[14],9,-1019803690),r=this.gg(r,o,n,i,e[3],14,-187363961),i=this.gg(i,r,o,n,e[8],20,1163531501),n=this.gg(n,i,r,o,e[13],5,-1444681467),o=this.gg(o,n,i,r,e[2],9,-51403784),r=this.gg(r,o,n,i,e[7],14,1735328473),i=this.gg(i,r,o,n,e[12],20,-1926607734),n=this.hh(n,i,r,o,e[5],4,-378558),o=this.hh(o,n,i,r,e[8],11,-2022574463),r=this.hh(r,o,n,i,e[11],16,1839030562),i=this.hh(i,r,o,n,e[14],23,-35309556),n=this.hh(n,i,r,o,e[1],4,-1530992060),o=this.hh(o,n,i,r,e[4],11,1272893353),r=this.hh(r,o,n,i,e[7],16,-155497632),i=this.hh(i,r,o,n,e[10],23,-1094730640),n=this.hh(n,i,r,o,e[13],4,681279174),o=this.hh(o,n,i,r,e[0],11,-358537222),r=this.hh(r,o,n,i,e[3],16,-722521979),i=this.hh(i,r,o,n,e[6],23,76029189),n=this.hh(n,i,r,o,e[9],4,-640364487),o=this.hh(o,n,i,r,e[12],11,-421815835),r=this.hh(r,o,n,i,e[15],16,530742520),i=this.hh(i,r,o,n,e[2],23,-995338651),n=this.ii(n,i,r,o,e[0],6,-198630844),o=this.ii(o,n,i,r,e[7],10,1126891415),r=this.ii(r,o,n,i,e[14],15,-1416354905),i=this.ii(i,r,o,n,e[5],21,-57434055),n=this.ii(n,i,r,o,e[12],6,1700485571),o=this.ii(o,n,i,r,e[3],10,-1894986606),r=this.ii(r,o,n,i,e[10],15,-1051523),i=this.ii(i,r,o,n,e[1],21,-2054922799),n=this.ii(n,i,r,o,e[8],6,1873313359),o=this.ii(o,n,i,r,e[15],10,-30611744),r=this.ii(r,o,n,i,e[6],15,-1560198380),i=this.ii(i,r,o,n,e[13],21,1309151649),n=this.ii(n,i,r,o,e[4],6,-145523070),o=this.ii(o,n,i,r,e[11],10,-1120210379),r=this.ii(r,o,n,i,e[2],15,718787259),i=this.ii(i,r,o,n,e[9],21,-343485551),t[0]=this.add32(n,t[0]),t[1]=this.add32(i,t[1]),t[2]=this.add32(r,t[2]),t[3]=this.add32(o,t[3])},t.prototype.cmn=function(t,e,n,i,r,o){return e=this.add32(this.add32(e,t),this.add32(i,o)),this.add32(e<<r|e>>>32-r,n)},t.prototype.ff=function(t,e,n,i,r,o,a){return this.cmn(e&n|~e&i,t,e,r,o,a)},t.prototype.gg=function(t,e,n,i,r,o,a){return this.cmn(e&i|n&~i,t,e,r,o,a)},t.prototype.hh=function(t,e,n,i,r,o,a){return this.cmn(e^n^i,t,e,r,o,a)},t.prototype.ii=function(t,e,n,i,r,o,a){return this.cmn(n^(e|~i),t,e,r,o,a)},t.prototype.md51=function(t){var e,n=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 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(i,r),e=0;e<16;e++)r[e]=0;return r[14]=8*n,this.md5cycle(i,r),i},t.prototype.md5blk=function(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n},t.prototype.rhex=function(t){for(var e="",n=0;n<4;n++)e+=this.hex_chr[t>>8*n+4&15]+this.hex_chr[t>>8*n&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 j=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,n){for(var i=0;i<t.length;i++){var r=t[i];if(r[e]==n)return r}return null},t.prototype.cleanForm=function(t,e,n){for(var i in void 0===e&&(e=null),void 0===n&&(n=null),t.controls)i&&i!=e&&i!=e+"_internal"&&i!=n&&i!=n+"_internal"?t.controls[i].reset():(t.controls[i].markAsPristine(),t.controls[i].markAsUntouched());t.submitted=!1},t.prototype.fileDownload=function(t,e){var n=document.createElement("a");document.body.appendChild(n),n.className="ta-display-none",n.href=t,n.download=e,n.click(),window.URL.revokeObjectURL(t),document.body.removeChild(n)},t.prototype.msToTime=function(t){if(!t)return"";var e=parseInt((t%1e3/100).toString()),n=parseInt((t/1e3%60).toString()),i=parseInt((t/6e4%60).toString()),r=parseInt((t/36e5%24).toString());return(r<10?"0"+r:r)+":"+(i<10?"0"+i:i)+":"+(n<10?"0"+n:n)+"."+e},t.prototype.saveFile=function(t,e){var n=this.base64ToArrayBuffer(t);this.saveByteArray(n,e)},t.prototype.base64ToArrayBuffer=function(t){for(var e=window.atob(t),n=e.length,i=new Uint8Array(n),r=0;r<n;r++){var o=e.charCodeAt(r);i[r]=o}return i},t.prototype.saveByteArray=function(t,e){var n=new Blob([t]),i=document.createElement("a");document.body.appendChild(i),i.href=window.URL.createObjectURL(n);var r=e;i.download=r,i.click(),document.body.removeChild(i)},t.prototype.swap=function(t,e,n){var i=t[e];t[e]=t[n],t[n]=i},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());case"[object File]":return t}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 n=0,i=t.length;n<i;n++)e.push(this.deepClone(t[n]));else if(t&&"function"==typeof t.hasOwnProperty)for(var r in t)t.hasOwnProperty(r)&&(e[r]=this.deepClone(t[r]));return e},t}();j.decorators=[{type:e.Injectable}];var M=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,n){var i=new M(t,e);n?this.outbounds[n]?this.outbounds[n].next(i):console.warn("@esfaenza/extensions - InterComService: Impossibile inviare il messaggio al recipient "+n+" 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 r.Subject},t}();Y.decorators=[{type:e.Injectable}];var U=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[g,v,D,E,f,j,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}();U.decorators=[{type:e.NgModule}];var P,B=function(){},F=function(){},R=function(){};t.InboundMessageTypes=void 0,(P=t.InboundMessageTypes||(t.InboundMessageTypes={}))[P.Navigation=0]="Navigation",t.APPSEARCH_PREFIX=p,t.CallResult=B,t.ClipboardService=g,t.CsvHeaders=F,t.DateService=v,t.EXT_ALLOW_UTC=d,t.EXT_FANCY_ALERTS=u,t.EXT_LOCALE=c,t.Export=function(t,e,n,i){return void 0===n&&(n=null),void 0===i&&(i=null),function(r,o){n&&Object.defineProperty(r,o+x,{value:n,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}),i&&Object.defineProperty(r,o+C,{value:i,writable:!1}),r[L]?r[L].push(o+b):r[L]=[o+b]}},t.ExportAs=function(t,e,n){return function(i,r){for(var o=new e,a=o[L],s=0;s<a.length;s++){var l=a[s].replace(b,"");if(void 0!==o[l+b]){var c=o[l+b],u=o[l+S],p=o[l+x],d=o[l+m];p&&Object.defineProperty(i,r+l+x,{value:p,writable:!1}),Object.defineProperty(i,r+l+m,{value:d+t,writable:!1}),Object.defineProperty(i,r+l,{value:null,writable:!0,enumerable:!0}),Object.defineProperty(i,r+l+y,{value:r+"."+l,writable:!1}),Object.defineProperty(i,r+l+b,{value:c,writable:!1}),Object.defineProperty(i,r+l+S,{value:(n?n+" ":"")+u,writable:!1}),i[L]?i[L].push(r+l+b):i[L]=[r+l+b]}}}},t.ExportDictionary=function(t,e,n){return function(i,r){Object.defineProperty(i,r+m,{value:t,writable:!1}),Object.defineProperty(i,r+O,{value:n,writable:!1}),Object.defineProperty(i,r+A,{value:e,writable:!1}),i[L]?i[L].push(r+A):i[L]=[r+A]}},t.ExportList=function(t,e,n,i){return void 0===i&&(i=null),function(r,o){Object.defineProperty(r,o+m,{value:t,writable:!1}),Object.defineProperty(r,o+T,{value:n,writable:!1}),Object.defineProperty(r,o+w,{value:e,writable:!1}),Object.defineProperty(r,o+I,{value:i,writable:!1}),r[L]?r[L].push(o+w):r[L]=[o+w]}},t.ExportService=D,t.ExtensionsModule=h,t.FullExtensionsModule=U,t.GenericItem=R,t.HashingService=E,t.InterComMessage=M,t.InterComService=Y,t.MessageService=f,t.UtilityService=j,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,n,r,i,o,a){"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=s(r),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"),h=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}();h.decorators=[{type:e.NgModule}];var f=function(){function t(t){var n,r,i,o,a,s,p,d,h,f,v,y,g,m;this.injector=t,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.FANCY_ALERTS=this.injector.get(u,null,e.InjectFlags.Optional),this.LOCALE=this.injector.get(c,null,e.InjectFlags.Optional),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!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"],icon:"success"}),this.warningSwalWithCancel=l.default.mixin({title:this.loc.Warning[null!==(o=this.LOCALE)&&void 0!==o?o:"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!==(s=this.LOCALE)&&void 0!==s?s:"it-IT"],icon:"warning"}),this.warningSwal=l.default.mixin({title:this.loc.Warning[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:"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!==(f=this.LOCALE)&&void 0!==f?f:"it-IT"],icon:"success"}),this.errorSwal=l.default.mixin({title:this.loc.Error[null!==(v=this.LOCALE)&&void 0!==v?v:"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:"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!==(m=this.LOCALE)&&void 0!==m?m:"it-IT"],icon:"info"})}return Object.defineProperty(t.prototype,"toastr",{get:function(){return this.injector.get(n.ToastrService)},enumerable:!1,configurable:!0}),t.prototype.simpleSuccess=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=this.toastrOrSwal(e);"swal"==r?this.successSwal.fire("",t):this.toastr.success(t,null,{positionClass:"toastr"==r?"toast-top-right":"toast-top-center",timeOut:n||("toastr"==r?0:5e3),extendedTimeOut:"toastr"==r?0:1e3})},t.prototype.simpleInfo=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=this.toastrOrSwal(e);"swal"==r?this.infoSwal.fire("",t):this.toastr.info(t,null,{positionClass:"toastr"==r?"toast-top-right":"toast-top-center",timeOut:n||("toastr"==r?0:5e3),extendedTimeOut:"toastr"==r?0:1e3})},t.prototype.simpleError=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=this.toastrOrSwal(e);"swal"==r?this.errorSwal.fire("",t):this.toastr.error(t,null,{positionClass:"toastr"==r?"toast-top-right":"toast-top-center",timeOut:n||("toastr"==r?0:5e3),extendedTimeOut:"toastr"==r?0:1e3})},t.prototype.simpleWarning=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=this.toastrOrSwal(e);"swal"==r?this.warningSwal.fire("",t):this.toastr.warning(t,null,{positionClass:"toastr"==r?"toast-top-right":"toast-top-center",timeOut:n||("toastr"==r?0:5e3),extendedTimeOut:"toastr"==r?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,n,r){void 0===n&&(n=null),void 0===r&&(r=null),this.warningSwalWithCancel.fire(t,e).then((function(t){t.value&&n?n():r&&r()}))},t.prototype.simpleSuccessWithChoice=function(t,e,n,r,i,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=""),void 0===o&&(o="");var a={title:t,html:e};i&&(a.confirmButtonText=i),o&&(a.cancelButtonText=o),this.successSwalWithCancel.fire(a).then((function(t){t.value&&n?n():r&&r()}))},t.prototype.observableSimpleWarningWithChoice=function(t,e){return i.of(this.warningSwalWithCancel.fire(t,e)).pipe(o.map((function(t){return!!t.value})))},t.prototype.expiredSessionMessage=function(t,e,n){void 0===n&&(n=null),this.expiredSessionSwal.fire(t,e).then((function(t){t.value&&n&&n()}))},t.prototype.manageCallResultResponse=function(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),t.success?(t.haswarning?this.simpleWarning(t.warning):e&&this.simpleSuccess(e),r&&r()):(this.simpleError((n?n+": ":"")+t.haserror?t.error:"[NO ERR.]"),i&&i())},t.prototype.manageStringResponse=function(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),t?(n&&this.simpleError(n+": "+t),i&&i()):(e&&this.simpleSuccess(e),r&&r())},t.prototype.manageStringResponseBool=function(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),t?(e&&this.simpleSuccess(e),r&&r()):(n&&this.simpleError(n),i&&i())},t}();f.decorators=[{type:e.Injectable}],f.ctorParameters=function(){return[{type:e.Injector,decorators:[{type:e.Inject,args:[e.Injector]}]}]};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"},"Please insert your clipboard content":{"en-US":"Please insert your clipboard content","it-IT":"Si prega di incollare il contenuto della Clipboard"},"User input required":{"en-US":"User input required","it-IT":"Richiesto Input utente"},"Your current browser does not support reading from the clipboard directly. Please paste your clipboard's content in this Input field and confirm the operation":{"en-US":"Your current browser does not support reading from the clipboard directly. Please paste your clipboard's content in this Input field and confirm the operation","it-IT":"Il browser corrente non supporta la lettura diretta dei dati della Clipboard, si prega di effettuare un'incolla (CTRL + V) nella casella di testo e confermare l'operazione"},Confirm:{"en-US":"Confirm","it-IT":"Conferma"},Cancel:{"en-US":"Cancel","it-IT":"Annulla"}}}return t.prototype.getClipboard=function(t,e){var n,r,i,o,a=this;if(-1==navigator.userAgent.indexOf("Firefox"))if(window.clipboardData){console.log("[@esfaenza/extensions] Found clipboardData");var s=window.clipboardData.getData("Text");this.doClipboardDataGet(s,t,e)}else window.navigator.clipboard&&(console.log("[@esfaenza/extensions] Found navigator clipboard"),window.navigator.permissions.query({name:"clipboard-read"}).then((function(n){if("granted"!==n.state&&"prompt"!==n.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(n){return a.doClipboardDataGet(n,t,e)})).catch((function(t){var e;return a.msgService.simpleError(a.loc["Error during Clipboard content read operation"][null!==(e=a.LOCALE)&&void 0!==e?e:"it-IT"]+": "+t)}))})));else l.default.fire({title:this.loc["User input required"][null!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"],text:this.loc["Your current browser does not support reading from the clipboard directly. Please paste your clipboard's content in this Input field and confirm the operation"][null!==(r=this.LOCALE)&&void 0!==r?r:"it-IT"],input:"textarea",icon:"warning",confirmButtonText:this.loc.Confirm[null!==(i=this.LOCALE)&&void 0!==i?i:"it-IT"],cancelButtonText:this.loc.Cancel[null!==(o=this.LOCALE)&&void 0!==o?o:"it-IT"],showCancelButton:!0,customClass:{confirmButton:"btn btn-primary",cancelButton:"btn btn-secondary app-margin-right-15",container:"app-wrap"},reverseButtons:!0,allowOutsideClick:!1,inputValidator:function(t){var e;if(!t)return a.loc["Please insert your clipboard content"][null!==(e=a.LOCALE)&&void 0!==e?e:"it-IT"]}}).then((function(n){n.isConfirmed&&(console.log("[@esfaenza/extensions] Retrieving input data from user input"),a.doClipboardDataGet(n.value,t,e))}))},t.prototype.doClipboardDataGet=function(t,e,n){console.log("[@esfaenza/extensions] Retrieved clipboard values: "+t);var r="array"==e?this.getClipboardLines(t):"matrix"==e?this.getClipboardMatrix(t):[];console.log("[@esfaenza/extensions] Adapted for "+e+": "+JSON.stringify(r)),n&&n(r)},t.prototype.getClipboardLines=function(t){var e=t.trim();return!e.includes("\r\n")&&e.includes("\n")?e.split("\n"):e.split("\r\n")},t.prototype.getClipboardMatrix=function(t){for(var e=[],n=!t.includes("\r\n")&&t.includes("\n")?t.split("\n"):t.split("\r\n"),r=0;r<n.length;r++)e.push(n[r].split("\t").map((function(t){return t.trim()})));return e},t.prototype.copyTextToClipboard=function(t){var e,n,r=document.createElement("textarea");r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="2em",r.style.height="2em",r.style.padding="0",r.style.border="none",r.style.outline="none",r.style.boxShadow="none",r.style.background="transparent",r.value=t,document.body.appendChild(r),r.focus(),r.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!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"]+": "+t)}document.body.removeChild(r)},t}();v.decorators=[{type:e.Injectable}],v.ctorParameters=function(){return[{type:f},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]}]};var y=function(){function t(t,e){var n,r,i,o,a,s,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!==(n=this.LOCALE)&&void 0!==n?n:"it-IT"],this.cfg.fulldate=this.loc.FULL_DATE_FORMAT[null!==(r=this.LOCALE)&&void 0!==r?r:"it-IT"],this.cfg.fulldateNoSS=this.loc.FULL_DATE_FORMAT_NO_SS[null!==(i=this.LOCALE)&&void 0!==i?i:"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!==(a=this.LOCALE)&&void 0!==a?a:"it-IT"],this.cfg.smallDate=this.loc.SMALL_DATE_DISPLAY_FORMAT[null!==(s=this.LOCALE)&&void 0!==s?s:"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,n){void 0===n&&(n=!0);var r=this.getDateConvertion(t);if(null==r)return"FE: Not a Date";if(!(r.startOf(e).valueOf()===r.valueOf()))return"day"==e&&r.subtract(1,"hour").hour()==r.hour()&&(r=r.add(1,"hour")),n?r.format(this.cfg.fulldateDisplay):r.format(this.cfg.fulldateDisplayNoSS);var i=r.subtract(1,e),o="";return"day"==e?o=i.format(this.cfg.smallDate)+" 24:00"+(n?":00":""):"hour"==e?o=i.format(this.cfg.smallDateWithH)+":60"+(n?":00":""):"minute"==e&&(o=i.format(this.cfg.smallDateWithM)+":60"),o},t.prototype.dateSort=function(t,e,n){return t<e?"asc"==n?1:-1:t>e?"asc"==n?-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 n=[],r=[],i=0;i<t.length;i++){var o=t[i];(a=this.getDateConvertion(o))&&n.push(a)}for(i=0;i<e.length;i++){var a;o=e[i];(a=this.getDateConvertion(o))&&r.push(a)}return{from:dayjs.min(n),to:dayjs.max(r)}},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 n=t.length;if(!n)return null;if(e&&!this.allowUtc)throw"@esfaenza/extensions: Richiesta data UTC ma da configurazione la libreria non lo supporta";var r=null,i=e?dayjs.utc:dayjs;return t.includes("T")?r=i(t):n==this.cfg.fulldate.length?r=i(t,this.cfg.fulldate):n==this.cfg.smallDate.length?r=i(t,this.cfg.smallDate):n==this.cfg.fulldateNoSS.length&&(r=i(t,this.cfg.fulldateNoSS)),r&&r.isValid&&r.isValid()?r: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,n){return(t=this.getDateConvertion(t))?t.format(e?this.cfg.smallDate:n?this.cfg.fulldateDisplay:this.cfg.fulldateDisplayNoSS):null},t}();y.decorators=[{type:e.Injectable}],y.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]}]}]};Object.create;function g(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}Object.create;var b="_csvnav",S="_csvord",C="_csvvis",T="_csvhdr",w="_csvkey",x="_listcsvval",I="_listcsvhdr",O="_listcsvvalformat",A="_flatlistcsvval",L="_flatlistcsvhdr",D="_csvfmt",_="__export_list__",E=function(){function t(t){this.dates=t}return t.prototype.setupForExport=function(t,e){void 0===e&&(e=[]);var n=[],r={};if(!t||0==t.length)return n;var i={};if((null==e?void 0:e.length)>0)for(var o=0;o<(null==e?void 0:e.length);o++)i[e[o]]=!0;for(o=0;o<t.length;o++)for(var a=this.parseAndGetHeaders(t[o],i),s=0;s<a.length;s++)r[a[s].key]||(r[a[s].key]=!0,n.push(a[s]));if(e&&0!=e.length){var l=[];for(o=0;o<e.length;o++)for(var c=e[o],u=0;u<n.length;u++)if(n[u].propKey==c){l.push(n[u]);break}return l}return n.sort((function(t,e){return t.order-e.order}))},t.prototype.setupForGenericExport=function(t,e){var n=this,r=[];return t&&0!=t.length?(t.forEach((function(t,i){0==i?r=n.parseAndGetGenericHeaders(t,e):n.parseAndGetGenericHeaders(t,e)})),r):r},t.prototype.parseAndGetGenericHeaders=function(t,e){if(!t.properties)return null;var n=[];return e.forEach((function(e){var r=t.properties[e.key];Object.defineProperty(t,e.key+"_exp",{value:r,writable:!1,enumerable:!0}),n.push({label:e.label,key:e.key+"_exp",order:e.order,type:e.type,propKey:null})})),n.sort((function(t,e){return t.order-e.order}))},t.prototype.parseAndGetHeaders=function(t,e){var n=[],r=t[_]||[];0==r.length&&console.warn("[@esfaenza/extensions] Nessuna colonna configurata da esportare!");for(var i=0;i<r.length;i++){var o=r[i],a="",s=void 0;o.endsWith(I)?(a=o.replace(I,""),s=this.parseList.bind(this)):o.endsWith(L)?(s=this.parseDictionary.bind(this),a=o.replace(L,"")):o.endsWith(C)&&(s=void 0!==t[(a=o.replace(C,""))+b]?this.parseObject.bind(this):this.parseProperty.bind(this)),s&&s(t,a,n,e)}return n},t.prototype.parseProperty=function(t,e,n,r){var i=t[e+C],o=t[e+D],a=t[e+w];if(a&&!r[a]&&Object.keys(r).length>0)console.log("[@esfaenza/extensions] Colonna da non esportare: "+a);else{var s=t[e+T],l=t[e+S];if(i&&"undefined"!==s)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}),n.push({label:s||e+"_fmt",key:e+"_fmt",order:l,type:"number",propKey:a})}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}),n.push({label:s||e+"_fmt",key:e+"_fmt",order:l,type:"date",propKey:a})}else{var d=t[e]?this.dates.trimSeconds(t[e].toString()):"";Object.defineProperty(t,e+"_nofmt",{value:d,writable:!1,enumerable:!0}),n.push({label:s||e+"_nofmt",key:e+"_nofmt",order:l,type:"string",propKey:a})}}},t.prototype.parseObject=function(t,e,n){var r=t[e+b].split("."),i=JSON.parse(JSON.stringify(t));r.forEach((function(t){i=null==i?void 0:i[t]}));var o=i,a=t[e+T],s=t[e+S],l=t[e+D],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:null!=o?o:"",writable:!1,enumerable:!0}),n.push({label:a||e,key:e,order:s,type:c,propKey:null})},t.prototype.parseList=function(t,e,n){for(var r,i,o,a,s=t[e+I],l=t[e+x],c=t[e+O],u=t[e+S],p=t[e],d=function(d){var f=p[d];o=s.split(" "),a="",o.forEach((function(t){r=t.split("."),i=JSON.parse(JSON.stringify(f)),r.forEach((function(t){i=i[t]})),a?a+=" "+i:a=i})),r=l.split("."),i=JSON.parse(JSON.stringify(f)),r.forEach((function(t){i=i[t]}));var v=i,y="string";if("F"==c){var g=null!=v?v.toString():"";v=(g=g.replace(/,/,"")).replace(".",","),y="number"}else c&&(v=h.dates.getFormatted(t[e],c.length<=10,c.length>16),y="date");Object.defineProperty(t,e+d,{value:null!=v?v:"",writable:!1}),n.push({label:a,key:e+d,order:u+d,type:y,propKey:null})},h=this,f=0;f<p.length;f++)d(f)},t.prototype.parseDictionary=function(t,e,n,r){var i,o,a=t[e+L],s=t[e+A],l=t[e+S],c=t[e],u=0;try{for(var p=g(Object.entries(c)),d=p.next();!d.done;d=p.next()){var h=m(d.value,2),f=h[0],v=h[1];if(!r||r[f]){var y=e+"_"+f,b=s?s+" "+v:v,C=a?a+" "+f:f;Object.defineProperty(t,y,{value:null!=b?b:"",writable:!1}),n.push({label:C,key:y,order:l+u++,type:"string",propKey:null})}}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}},t.prototype.deserializeForExport=function(t,e){return a.Deserialize(t,e)},t}();E.decorators=[{type:e.Injectable}],E.ctorParameters=function(){return[{type:y}]};var j,M=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,n,r){void 0===e&&(e=0),void 0===n&&(n=!1),void 0===r&&(r=!1);var i=this.stringify(t,e,n);return r?this.md5(i):this.simpleHash(i)},t.prototype.simpleHash=function(t,e){void 0===e&&(e=0);for(var n=3735928559^e,r=1103547991^e,i=0,o=void 0;i<t.length;i++)o=t.charCodeAt(i),n=Math.imul(n^o,2654435761),r=Math.imul(r^o,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),(4294967296*(2097151&(r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)).toString()},t.prototype.stringify=function(t,e,n){var r,i;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"===(r=typeof t))return"s:"+t;if("number"===r)return"n:"+t;if(t instanceof Function)return"m:"+t.toString();if(t instanceof Array){for(i=[],r=0;r<t.length;r++){(a=this.stringify(t[r],e,n))&&i.push(a)}return i.length>0?"a:"+i.join(";"):""}if(i=[],t){var o=t.__proto__.constructor.name;if(!this.objBlacklist[o])for(r in t){var a;if(t.hasOwnProperty(r)&&(e<=2||n))(a=this.stringify(t[r],e+1,n))&&i.push(r+":"+a)}}return i.length>0?"o:"+i.join(";"):""},t.prototype.md5=function(t){return this.hex(this.md51(t))},t.prototype.md5cycle=function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];n=this.ff(n,r,i,o,e[0],7,-680876936),o=this.ff(o,n,r,i,e[1],12,-389564586),i=this.ff(i,o,n,r,e[2],17,606105819),r=this.ff(r,i,o,n,e[3],22,-1044525330),n=this.ff(n,r,i,o,e[4],7,-176418897),o=this.ff(o,n,r,i,e[5],12,1200080426),i=this.ff(i,o,n,r,e[6],17,-1473231341),r=this.ff(r,i,o,n,e[7],22,-45705983),n=this.ff(n,r,i,o,e[8],7,1770035416),o=this.ff(o,n,r,i,e[9],12,-1958414417),i=this.ff(i,o,n,r,e[10],17,-42063),r=this.ff(r,i,o,n,e[11],22,-1990404162),n=this.ff(n,r,i,o,e[12],7,1804603682),o=this.ff(o,n,r,i,e[13],12,-40341101),i=this.ff(i,o,n,r,e[14],17,-1502002290),r=this.ff(r,i,o,n,e[15],22,1236535329),n=this.gg(n,r,i,o,e[1],5,-165796510),o=this.gg(o,n,r,i,e[6],9,-1069501632),i=this.gg(i,o,n,r,e[11],14,643717713),r=this.gg(r,i,o,n,e[0],20,-373897302),n=this.gg(n,r,i,o,e[5],5,-701558691),o=this.gg(o,n,r,i,e[10],9,38016083),i=this.gg(i,o,n,r,e[15],14,-660478335),r=this.gg(r,i,o,n,e[4],20,-405537848),n=this.gg(n,r,i,o,e[9],5,568446438),o=this.gg(o,n,r,i,e[14],9,-1019803690),i=this.gg(i,o,n,r,e[3],14,-187363961),r=this.gg(r,i,o,n,e[8],20,1163531501),n=this.gg(n,r,i,o,e[13],5,-1444681467),o=this.gg(o,n,r,i,e[2],9,-51403784),i=this.gg(i,o,n,r,e[7],14,1735328473),r=this.gg(r,i,o,n,e[12],20,-1926607734),n=this.hh(n,r,i,o,e[5],4,-378558),o=this.hh(o,n,r,i,e[8],11,-2022574463),i=this.hh(i,o,n,r,e[11],16,1839030562),r=this.hh(r,i,o,n,e[14],23,-35309556),n=this.hh(n,r,i,o,e[1],4,-1530992060),o=this.hh(o,n,r,i,e[4],11,1272893353),i=this.hh(i,o,n,r,e[7],16,-155497632),r=this.hh(r,i,o,n,e[10],23,-1094730640),n=this.hh(n,r,i,o,e[13],4,681279174),o=this.hh(o,n,r,i,e[0],11,-358537222),i=this.hh(i,o,n,r,e[3],16,-722521979),r=this.hh(r,i,o,n,e[6],23,76029189),n=this.hh(n,r,i,o,e[9],4,-640364487),o=this.hh(o,n,r,i,e[12],11,-421815835),i=this.hh(i,o,n,r,e[15],16,530742520),r=this.hh(r,i,o,n,e[2],23,-995338651),n=this.ii(n,r,i,o,e[0],6,-198630844),o=this.ii(o,n,r,i,e[7],10,1126891415),i=this.ii(i,o,n,r,e[14],15,-1416354905),r=this.ii(r,i,o,n,e[5],21,-57434055),n=this.ii(n,r,i,o,e[12],6,1700485571),o=this.ii(o,n,r,i,e[3],10,-1894986606),i=this.ii(i,o,n,r,e[10],15,-1051523),r=this.ii(r,i,o,n,e[1],21,-2054922799),n=this.ii(n,r,i,o,e[8],6,1873313359),o=this.ii(o,n,r,i,e[15],10,-30611744),i=this.ii(i,o,n,r,e[6],15,-1560198380),r=this.ii(r,i,o,n,e[13],21,1309151649),n=this.ii(n,r,i,o,e[4],6,-145523070),o=this.ii(o,n,r,i,e[11],10,-1120210379),i=this.ii(i,o,n,r,e[2],15,718787259),r=this.ii(r,i,o,n,e[9],21,-343485551),t[0]=this.add32(n,t[0]),t[1]=this.add32(r,t[1]),t[2]=this.add32(i,t[2]),t[3]=this.add32(o,t[3])},t.prototype.cmn=function(t,e,n,r,i,o){return e=this.add32(this.add32(e,t),this.add32(r,o)),this.add32(e<<i|e>>>32-i,n)},t.prototype.ff=function(t,e,n,r,i,o,a){return this.cmn(e&n|~e&r,t,e,i,o,a)},t.prototype.gg=function(t,e,n,r,i,o,a){return this.cmn(e&r|n&~r,t,e,i,o,a)},t.prototype.hh=function(t,e,n,r,i,o,a){return this.cmn(e^n^r,t,e,i,o,a)},t.prototype.ii=function(t,e,n,r,i,o,a){return this.cmn(n^(e|~r),t,e,i,o,a)},t.prototype.md51=function(t){var e,n=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)this.md5cycle(r,this.md5blk(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(this.md5cycle(r,i),e=0;e<16;e++)i[e]=0;return i[14]=8*n,this.md5cycle(r,i),r},t.prototype.md5blk=function(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n},t.prototype.rhex=function(t){for(var e="",n=0;n<4;n++)e+=this.hex_chr[t>>8*n+4&15]+this.hex_chr[t>>8*n&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}();M.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"}(j||(j={}));var Y=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,n){for(var r=0;r<t.length;r++){var i=t[r];if(i[e]==n)return i}return null},t.prototype.cleanForm=function(t,e,n){for(var r in void 0===e&&(e=null),void 0===n&&(n=null),t.controls)r&&r!=e&&r!=e+"_internal"&&r!=n&&r!=n+"_internal"?t.controls[r].reset():(t.controls[r].markAsPristine(),t.controls[r].markAsUntouched());t.submitted=!1},t.prototype.fileDownload=function(t,e){var n=document.createElement("a");document.body.appendChild(n),n.className="ta-display-none",n.href=t,n.download=e,n.click(),window.URL.revokeObjectURL(t),document.body.removeChild(n)},t.prototype.msToTime=function(t){if(!t)return"";var e=parseInt((t%1e3/100).toString()),n=parseInt((t/1e3%60).toString()),r=parseInt((t/6e4%60).toString()),i=parseInt((t/36e5%24).toString());return(i<10?"0"+i:i)+":"+(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)+"."+e},t.prototype.saveFile=function(t,e){var n=this.base64ToArrayBuffer(t);this.saveByteArray(n,e)},t.prototype.base64ToArrayBuffer=function(t){for(var e=window.atob(t),n=e.length,r=new Uint8Array(n),i=0;i<n;i++){var o=e.charCodeAt(i);r[i]=o}return r},t.prototype.saveByteArray=function(t,e){var n=new Blob([t]),r=document.createElement("a");document.body.appendChild(r),r.href=window.URL.createObjectURL(n);var i=e;r.download=i,r.click(),document.body.removeChild(r)},t.prototype.swap=function(t,e,n){var r=t[e];t[e]=t[n],t[n]=r},t.prototype.getJsTypeFromTypeCode=function(t){switch(t){case j.Boolean:return"boolean";case j.Decimal:case j.Double:case j.Single:case j.Int16:case j.Int32:case j.Int64:case j.Byte:case j.SByte:case j.UInt16:case j.UInt32:case j.UInt64:return"number";case j.Char:case j.String:return"string";case j.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());case"[object File]":return t}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 n=0,r=t.length;n<r;n++)e.push(this.deepClone(t[n]));else if(t&&"function"==typeof t.hasOwnProperty)for(var i in t)t.hasOwnProperty(i)&&(e[i]=this.deepClone(t[i]));return e},t}();Y.decorators=[{type:e.Injectable}];var U=function(t,e){this.type=t,this.message=e},P=function(){function t(){this.outbounds={},this.inbounds=new i.Subject}return t.prototype.send=function(t,e,n){var r=new U(t,e);n?this.outbounds[n]?this.outbounds[n].next(r):console.warn("@esfaenza/extensions - InterComService: Impossibile inviare il messaggio al recipient "+n+" assicurarsi che il modulo sia caricato e che effettui la chiamata al metodo 'regisster'"):this.inbounds.next(r)},t.prototype.register=function(t){if(this.outbounds[t])throw"@esfaenza/extensions - InterComService: Impossibile registrare più volte lo stesso modulo";this.outbounds[t]=new i.Subject},t}();P.decorators=[{type:e.Injectable}];var B=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[v,y,E,M,f,Y,P,{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}();B.decorators=[{type:e.NgModule}];var F,R=function(){},H=function(){},N=function(){};t.InboundMessageTypes=void 0,(F=t.InboundMessageTypes||(t.InboundMessageTypes={}))[F.Navigation=0]="Navigation",t.APPSEARCH_PREFIX=p,t.CallResult=R,t.ClipboardService=v,t.CsvHeaders=H,t.DateService=y,t.EXT_ALLOW_UTC=d,t.EXT_FANCY_ALERTS=u,t.EXT_LOCALE=c,t.Export=function(t,e,n,r){return void 0===n&&(n=null),void 0===r&&(r=null),function(i,o){n&&Object.defineProperty(i,o+D,{value:n,writable:!1}),Object.defineProperty(i,o+S,{value:t,writable:!1}),Object.defineProperty(i,o+C,{value:!!e,writable:!1}),Object.defineProperty(i,o+T,{value:e,writable:!1}),r&&Object.defineProperty(i,o+w,{value:r,writable:!1}),i[_]?i[_].push(o+C):i[_]=[o+C]}},t.ExportAs=function(t,e,n){return function(r,i){for(var o=new e,a=o[_],s=0;s<a.length;s++){var l=a[s].replace(C,"");if(void 0!==o[l+C]){var c=o[l+C],u=o[l+T],p=o[l+D],d=o[l+S];p&&Object.defineProperty(r,i+l+D,{value:p,writable:!1}),Object.defineProperty(r,i+l+S,{value:d+t,writable:!1}),Object.defineProperty(r,i+l,{value:null,writable:!0,enumerable:!0}),Object.defineProperty(r,i+l+b,{value:i+"."+l,writable:!1}),Object.defineProperty(r,i+l+C,{value:c,writable:!1}),Object.defineProperty(r,i+l+T,{value:(n?n+" ":"")+u,writable:!1}),r[_]?r[_].push(i+l+C):r[_]=[i+l+C]}}}},t.ExportDictionary=function(t,e,n){return function(r,i){Object.defineProperty(r,i+S,{value:t,writable:!1}),Object.defineProperty(r,i+A,{value:n,writable:!1}),Object.defineProperty(r,i+L,{value:e,writable:!1}),r[_]?r[_].push(i+L):r[_]=[i+L]}},t.ExportList=function(t,e,n,r){return void 0===r&&(r=null),function(i,o){Object.defineProperty(i,o+S,{value:t,writable:!1}),Object.defineProperty(i,o+x,{value:n,writable:!1}),Object.defineProperty(i,o+I,{value:e,writable:!1}),Object.defineProperty(i,o+O,{value:r,writable:!1}),i[_]?i[_].push(o+I):i[_]=[o+I]}},t.ExportService=E,t.ExtensionsModule=h,t.FullExtensionsModule=B,t.GenericItem=N,t.HashingService=M,t.InterComMessage=U,t.InterComService=P,t.MessageService=f,t.UtilityService=Y,Object.defineProperty(t,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=esfaenza-extensions.umd.min.js.map